mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
🌜 适配夜间模式
This commit is contained in:
@@ -3,11 +3,11 @@ import BLOG from '@/blog.config'
|
||||
const BlogPost = ({ post }) => {
|
||||
return (
|
||||
<article key={post.id}
|
||||
className='md:mx-2 w-full md:max-w-md duration-200 transform hover:scale-105 hover:shadow-2xl bg-white dark:bg-gray-800 dark:hover:bg-gray-600 overflow-hidden'>
|
||||
className='md:mx-2 w-full md:max-w-md duration-200 transform hover:scale-105 hover:shadow-2xl rounded-3xl bg-white dark:bg-gray-800 dark:hover:bg-gray-600 overflow-hidden'>
|
||||
{/* 封面图 */}
|
||||
{post.page_cover && post.page_cover.length > 1 && (
|
||||
<a href={`${BLOG.path}/article/${post.slug}`} className='md:flex-shrink-0 md:w-52 md:h-52 rounded-lg'>
|
||||
<img className='w-full max-h-60 object-cover p-3 cursor-pointer' src={post.page_cover} alt={post.title} />
|
||||
<img className='w-full max-h-60 object-cover cursor-pointer' src={post.page_cover} alt={post.title} />
|
||||
</a>
|
||||
)}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ const RightAside = ({ toc }) => {
|
||||
// 无目录就直接返回空
|
||||
if (toc.length < 1) return <></>
|
||||
|
||||
return <aside className='bg-gray-800 px-5 hidden lg:block py-5 hover:shadow-2xl duration-200'>
|
||||
return <aside className='bg-gray-700 px-5 hidden lg:block py-5 hover:shadow-2xl duration-200'>
|
||||
<div className='sticky top-8 w-60 overflow-x-auto'>
|
||||
<Toc toc={toc}/>
|
||||
</div>
|
||||
|
||||
@@ -21,13 +21,13 @@ const SideBar = ({ tags, currentTag }) => {
|
||||
const [collapse, changeCollapse] = useState(false)
|
||||
|
||||
return <aside
|
||||
className={(collapse ? '' : '') + ' z-50 bg-gray-100 dark:bg-gray-800 dark:border-black duration-500 ease-in-out'}
|
||||
className={(collapse ? '' : '') + ' z-10 bg-white dark:bg-gray-800 dark:border-black duration-500 ease-in-out'}
|
||||
>
|
||||
|
||||
<div className={(collapse ? '-ml-80 ' : 'shadow-2xl xl:shadow-none') + ' sidebar bg-gray-100 h-full w-60 md:w-80 duration-500 ease-in-out'}>
|
||||
<div className={(collapse ? '-ml-80 ' : 'shadow-2xl xl:shadow-none') + ' sidebar h-full w-60 md:w-80 duration-500 ease-in-out'}>
|
||||
|
||||
{/* 搜索框 */}
|
||||
<div className='flex justify-center items-center py-5 pr-5 pl-2 bg-gray-200'>
|
||||
<div className='flex justify-center items-center py-5 pr-5 pl-2 bg-gray-100 dark:bg-black'>
|
||||
<input
|
||||
type='text'
|
||||
placeholder={
|
||||
|
||||
@@ -59,7 +59,7 @@ const DefaultLayout = ({ tags, posts, page, currentTag, ...customMeta }) => {
|
||||
{/* <TopNav tags={tags} currentTag={currentTag} /> */}
|
||||
{/* <Header navBarTitle={meta.title} fullWidth={true}/> */}
|
||||
|
||||
<div className={`${BLOG.font} flex bg-gray-50`}>
|
||||
<div className={`${BLOG.font} flex bg-gray-100 dark:bg-black`}>
|
||||
<SideBar tags={tags} currentTag={currentTag} />
|
||||
|
||||
<main className='md:pb-10 md:px-24 p-5 flex-grow'>
|
||||
|
||||
@@ -106,7 +106,7 @@ nav {
|
||||
}
|
||||
|
||||
#waifu {
|
||||
@apply left-auto right-0 hidden lg:block !important
|
||||
@apply right-auto left-0 hidden lg:block z-10 !important
|
||||
}
|
||||
|
||||
@media (max-width: 1300px){
|
||||
|
||||
Reference in New Issue
Block a user