simple theme

This commit is contained in:
tangly1024.com
2023-12-01 17:17:45 +08:00
parent 0ebddba378
commit fc04a01356
5 changed files with 40 additions and 36 deletions

View File

@@ -39,7 +39,7 @@ const Tabs = ({ className, children }) => {
<ul className='flex justify-center space-x-5 pb-4 dark:text-gray-400 text-gray-600 overflow-auto'>
{children.map((item, index) => {
return <li key={index}
className={(currentTab === index ? 'font-black border-b-2 border-red-500 text-red-500 animate__animated animate__jello ' : 'font-extralight cursor-pointer') + ' text-sm font-sans '}
className={(currentTab === index ? 'font-black border-b-2 border-red-600 text-red-600 animate__animated animate__jello ' : 'font-extralight cursor-pointer') + ' text-sm font-sans '}
onClick={() => {
tabClickHandle(index)
}}>

View File

@@ -1130,9 +1130,10 @@ code[class*='language-'] {
transition: background 20ms ease-in 0s;
cursor: pointer;
width: 100%;
opacity: 0.9;
padding: 6px 2px;
font-size: 14px;
font-size: 15px;
line-height: 1.2;
display: flex;
align-items: center;

View File

@@ -11,21 +11,21 @@ export const ArticleInfo = (props) => {
return (
<section className="mt-2 text-gray-600 dark:text-gray-400 leading-8">
<h2
className="blog-item-title mb-5 font-bold text-black text-xl md:text-2xl no-underline">
{post?.title}
</h2>
<h2
className="blog-item-title mb-5 font-bold text-black text-xl md:text-2xl no-underline">
{post?.title}
</h2>
{post?.type !== 'Page' && (<>
<div className="mb-4 text-sm text-gray-700 dark:text-gray-300">
<div className='flex flex-wrap text-gray-700 dark:text-gray-300'>
{post?.type !== 'Page' && (
<div className="space-x-3 mr-4">
<span> <i className="fa-regular fa-user"></i> <a href={siteConfig('SIMPLE_AUTHOR_LINK', null, CONFIG)}>{siteConfig('AUTHOR')}</a></span>
<span> - <i className="fa-regular fa-clock"></i> {post?.publishDay}</span>
{post?.category && <span> - <i className="fa-regular fa-folder"></i> <a href={`/category/${post?.category}`} className="hover:text-red-400 transition-all duration-200">{post?.category}</a></span>}
<span> <i className="fa-regular fa-clock"></i> {post?.publishDay}</span>
{post?.category && <span> <i className="fa-regular fa-folder"></i> <a href={`/category/${post?.category}`} className="hover:text-red-400 transition-all duration-200">{post?.category}</a></span>}
{post?.tags && post?.tags?.length > 0 && post?.tags.map(t => <span key={t}> / <Link href={`/tag/${t}`}><span className=' hover:text-red-400 transition-all duration-200'>{t}</span></Link></span>)}
</div>
</>)}
</div>)}
{post?.type !== 'Page' && (<>
{post?.type !== 'Page' && (<div className=''>
<span>{locale.COMMON.POST_TIME}:
<Link
href={`/archive#${formatDateFmt(post?.publishDate, 'yyyy-MM')}`}
@@ -44,8 +44,9 @@ export const ArticleInfo = (props) => {
&nbsp;
<span className="mr-2 busuanzi_value_page_pv" />
</span>
</>)}
</div>)}
</div>
</section>
)
}

View File

@@ -57,31 +57,33 @@ const Catalog = ({ post }) => {
}
return <div className='px-3 '>
<div className='dark:text-white'><i className='mr-1 fas fa-stream' />{locale.COMMON.TABLE_OF_CONTENTS}</div>
<div className='dark:text-white mb-2'>
<i className='mr-1 fas fa-stream' />{locale.COMMON.TABLE_OF_CONTENTS}
</div>
<div className='overflow-y-auto overscroll-none max-h-36 lg:max-h-96 scroll-hidden' ref={tRef}>
<nav className='h-full text-black'>
{post?.toc?.map((tocItem) => {
const id = uuidToId(tocItem.id)
return (
<a
key={id}
href={`#${id}`}
className={`notion-table-of-contents-item duration-300 transform font-light dark:text-gray-200
<div className='overflow-y-auto overscroll-none max-h-36 lg:max-h-96 scroll-hidden' ref={tRef}>
<nav className='h-full text-black'>
{post?.toc?.map((tocItem) => {
const id = uuidToId(tocItem.id)
return (
<a
key={id}
href={`#${id}`}
className={`notion-table-of-contents-item duration-300 transform dark:text-gray-200
notion-table-of-contents-item-indent-level-${tocItem.indentLevel} `}
>
<span style={{ display: 'inline-block', marginLeft: tocItem.indentLevel * 16 }}
className={`${activeSection === id && ' font-bold text-red-500 underline overflow-ellipsis truncate'}`}
>
{tocItem.text}
</span>
</a>
)
})}
</nav>
>
<span style={{ display: 'inline-block', marginLeft: tocItem.indentLevel * 16 }}
className={`${activeSection === id && ' font-bold text-red-600 underline overflow-ellipsis truncate'}`}
>
{tocItem.text}
</span>
</a>
)
})}
</nav>
</div>
</div>
</div>
}
export default Catalog

View File

@@ -17,4 +17,4 @@ const CONFIG = {
SIMPLE_MENU_ARCHIVE: true, // 显示归档
SIMPLE_MENU_SEARCH: true // 显示搜索
}
export default CO
export default CONFIG