gitbook主题改版

This commit is contained in:
tangly1024.com
2024-09-24 14:51:30 +08:00
parent c8fb59a1af
commit 72736d6808
15 changed files with 82 additions and 87 deletions

View File

@@ -1,9 +1,16 @@
/**
* 文章补充咨询
* @param {*} param0
* @returns
*/
export default function ArticleInfo({ post }) {
if (!post) {
return null
}
return <div className="pt-10 pb-6 text-gray-400 text-sm border-b">
<i className="fa-regular fa-clock mr-1" />
Last update: { post.date?.start_date}
return (
<div className='pt-10 pb-6 text-gray-400 text-sm'>
<i className='fa-regular fa-clock mr-1' />
Last update: {post.date?.start_date}
</div>
)
}

View File

@@ -12,7 +12,7 @@ export default function BottomMenuBar({ post, className }) {
return (
<>
{/* 移动端底部导航按钮 */}
<div className='dark:bg-hexo-black-gray bottom-button-group md:hidden w-screen h-14 px-4 fixed flex items-center justify-between right-left bottom-0 z-30 bg-white border-t dark:border-gray-800'>
<div className='pb-2 dark:bg-hexo-black-gray bottom-button-group md:hidden w-screen h-14 px-4 fixed flex items-center justify-between right-left bottom-0 z-30 bg-white border-t dark:border-gray-800'>
<div className='w-full'>
<MobileButtonPageNav />
</div>

View File

@@ -81,14 +81,15 @@ const Catalog = ({ post }) => {
<a
key={id}
href={`#${id}`}
className={`border-l pl-4 notion-table-of-contents-item duration-300 transform font-light dark:text-gray-300
// notion-table-of-contents-item
className={`${activeSection === id && 'border-green-500 text-green-500 font-bold'} border-l pl-4 block hover:text-green-500 border-lduration-300 transform font-light dark:text-gray-300
notion-table-of-contents-item-indent-level-${tocItem.indentLevel} `}>
<span
style={{
display: 'inline-block',
marginLeft: tocItem.indentLevel * 16
}}
className={`truncate ${activeSection === id ? 'border-green-500 font-bold text-gray-500 underline' : ''}`}>
className={`truncate`}>
{tocItem.text}
</span>
</a>

View File

@@ -13,12 +13,10 @@ const Footer = ({ siteInfo }) => {
parseInt(since) < currentYear ? since + '-' + currentYear : currentYear
return (
<footer className='z-20 bg:white dark:bg-hexo-black-gray justify-center text-center w-full text-sm relative'>
<hr className='pb-2' />
<footer className='z-20 border p-2 rounded-lg bg:white dark:border-black dark:bg-hexo-black-gray justify-center text-center w-full text-sm relative'>
<SocialButton />
<div className='flex justify-center pt-1'>
<div className='flex justify-center'>
<div>
<i className='mx-1 animate-pulse fas fa-heart' />{' '}
<a
@@ -31,15 +29,6 @@ const Footer = ({ siteInfo }) => {
© {`${copyrightDate}`}
</div>
<div className='text-xs font-serif'>
Powered By{' '}
<a
href='https://github.com/tangly1024/NotionNext'
className='underline text-gray-500 dark:text-gray-300'>
NotionNext {siteConfig('VERSION')}
</a>
</div>
{siteConfig('BEI_AN') && (
<>
<i className='fas fa-shield-alt' />{' '}
@@ -58,6 +47,14 @@ const Footer = ({ siteInfo }) => {
<i className='fas fa-users' />{' '}
<span className='px-1 busuanzi_value_site_uv'> </span>{' '}
</span>
<div className='text-xs font-serif'>
Powered By{' '}
<a
href='https://github.com/tangly1024/NotionNext'
className='underline text-gray-500 dark:text-gray-300'>
NotionNext {siteConfig('VERSION')}
</a>
</div>
{/* SEO title */}
<h1 className='pt-1 hidden'>{siteConfig('TITLE')}</h1>
</footer>

View File

@@ -62,7 +62,7 @@ export default function Header(props) {
return (
<div id='top-nav' className={'fixed top-0 w-full z-20 ' + className}>
{/* PC端菜单 */}
<div className='flex justify-center border-b items-center w-full h-14 glassmorphism bg-white dark:bg-hexo-black-gray px-7'>
<div className='px-5 flex justify-center border-b dark:border-black items-center w-full h-16 glassmorphism bg-white dark:bg-hexo-black-gray'>
<div className='max-w-screen-4xl w-full flex gap-x-3 justify-between items-center'>
{/* 左侧*/}
<div className='flex'>
@@ -78,7 +78,7 @@ export default function Header(props) {
</div>
{/* 右侧 */}
<div className='flex items-center gap-3'>
<div className='flex items-center gap-4'>
<SearchInput className='hidden md:flex md:w-52 lg:w-72' />
<DarkModeButton className='text-sm items-center h-full hidden md:flex' />
{/* 折叠按钮、仅移动端显示 */}

View File

@@ -14,7 +14,7 @@ const JumpToTopButton = ({ showPercent = false, percent, className }) => {
data-aos-duration='300'
data-aos-once='false'
data-aos-anchor-placement='top-center'
className='fixed xl:right-80 right-2 bottom-24 z-20'>
className='fixed xl:right-96 xl:mr-20 right-2 bottom-24 z-20'>
<i
className='shadow fas fa-chevron-up cursor-pointer p-2 rounded-full border bg-white dark:bg-hexo-black-gray'
onClick={() => {

View File

@@ -11,16 +11,16 @@ import CONFIG from '../config'
export default function LogoBar(props) {
const { siteInfo } = props
return (
<div id='top-wrapper' className='w-full flex items-center'>
<div id='logo-wrapper' className='w-full flex items-center mr-2'>
<Link
href={`/${siteConfig('GITBOOK_INDEX_PAGE', '', CONFIG)}`}
className='flex text-md md:text-xl dark:text-gray-200'>
className='flex text-md font-bold md:text-xl dark:text-gray-200'>
<LazyImage
src={siteInfo?.icon}
width={24}
height={24}
alt={siteConfig('AUTHOR')}
className='mr-2 hidden md:block'
className='mr-2 hidden md:block '
/>
{siteInfo?.title || siteConfig('TITLE')}
</Link>

View File

@@ -52,7 +52,7 @@ const NavPostItem = props => {
<div
onMouseEnter={onHoverToggle}
onClick={toggleOpenSubMenu}
className='cursor-pointer relative flex justify-between text-sm p-2 hover:bg-gray-50 rounded-md dark:hover:bg-yellow-100 dark:hover:text-yellow-600'
className='cursor-pointer relative flex justify-between text-md p-2 hover:bg-gray-50 rounded-md dark:hover:bg-yellow-100 dark:hover:text-yellow-600'
key={group?.category}>
<span className={`${expanded && 'font-semibold'}`}>
{group?.category}
@@ -68,7 +68,7 @@ const NavPostItem = props => {
<Collapse isOpen={expanded} onHeightChange={props.onHeightChange}>
{group?.items?.map((post, index) => (
<div key={index} className='ml-3 border-l'>
<BlogPostCard className='text-sm ml-3' post={post} />
<BlogPostCard className='ml-3' post={post} />
</div>
))}
</Collapse>
@@ -79,7 +79,7 @@ const NavPostItem = props => {
<>
{group?.items?.map((post, index) => (
<div key={index}>
<BlogPostCard className='text-sm py-2' post={post} />
<BlogPostCard className='text-md py-2' post={post} />
</div>
))}
</>

View File

@@ -95,7 +95,7 @@ const NavPostList = props => {
id='posts-wrapper'
className='w-full flex-grow space-y-0.5 pr-4 tracking-wider'>
{/* 当前文章 */}
<BlogPostCard className='text-sm py-2' post={homePost} />
<BlogPostCard className='mb-4' post={homePost} />
{/* 文章列表 */}
{categoryFolders?.map((group, index) => (

View File

@@ -107,7 +107,7 @@ const SearchInput = ({ currentSearch, cRef, className }) => {
<input
ref={searchInputRef}
type='text'
className={`rounded-md outline-none w-full text-sm pl-2 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-800 dark:text-white`}
className={`rounded-md outline-none w-full text-sm pl-2 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-black dark:text-white`}
onFocus={handleFocus}
onKeyUp={handleKeyUp}
placeholder='Search'

View File

@@ -144,6 +144,7 @@ const SocialButton = () => {
target='_blank'
rel='noreferrer'
title={'知识星球'}
className='flex justify-center items-center'
href={CONTACT_ZHISHIXINGQIU}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img