mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-06 07:26:45 +00:00
优化css
This commit is contained in:
@@ -7,8 +7,8 @@ import Link from 'next/link'
|
|||||||
*/
|
*/
|
||||||
export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
|
export default function BlogArchiveItem({ archiveTitle, archivePosts }) {
|
||||||
return (
|
return (
|
||||||
<div key={archiveTitle}>
|
<div key={archiveTitle} className='pb-16'>
|
||||||
<div id={archiveTitle} className='pt-16 pb-4 text-3xl dark:text-gray-300'>
|
<div id={archiveTitle} className='pb-2 text-3xl dark:text-gray-300'>
|
||||||
{archiveTitle}
|
{archiveTitle}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -15,21 +15,21 @@ export default function Footer(props) {
|
|||||||
parseInt(since) < currentYear ? since + '-' + currentYear : currentYear
|
parseInt(since) < currentYear ? since + '-' + currentYear : currentYear
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer >
|
<footer>
|
||||||
<DarkModeButton className='pt-4' />
|
<DarkModeButton className='pt-4' />
|
||||||
|
|
||||||
<div className='font-bold text-[var(--primary-color)] py-6 text-sm flex flex-col gap-2'>
|
<div className='font-bold text-[var(--primary-color)] py-6 text-sm flex flex-col gap-2 items-center'>
|
||||||
<div>
|
<div>
|
||||||
©{`${copyrightDate}`} {siteConfig('AUTHOR')}.
|
©{`${copyrightDate}`} {siteConfig('AUTHOR')}.
|
||||||
</div>
|
</div>
|
||||||
<div>All rights reserved.</div>
|
<div>All rights reserved.</div>
|
||||||
<div>
|
<div>
|
||||||
Powered by
|
Powered by
|
||||||
<a
|
<a
|
||||||
href='https://github.com/tangly1024/NotionNext'
|
href='https://github.com/tangly1024/NotionNext'
|
||||||
className=' hover:underline'>
|
className=' hover:underline'>
|
||||||
NotionNext {siteConfig('VERSION')}
|
NotionNext {siteConfig('VERSION')}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -63,11 +63,10 @@ export const useSimpleGlobal = () => useContext(ThemeGlobalSimple)
|
|||||||
*/
|
*/
|
||||||
const LayoutBase = props => {
|
const LayoutBase = props => {
|
||||||
const { children, slotTop } = props
|
const { children, slotTop } = props
|
||||||
// const { onLoading, fullWidth } = useGlobal()
|
const { onLoading, fullWidth } = useGlobal()
|
||||||
const onLoading = true
|
// const onLoading = true
|
||||||
const searchModal = useRef(null)
|
const searchModal = useRef(null)
|
||||||
|
|
||||||
console.log('aa', props)
|
|
||||||
return (
|
return (
|
||||||
<ThemeGlobalSimple.Provider value={{ searchModal }}>
|
<ThemeGlobalSimple.Provider value={{ searchModal }}>
|
||||||
<div
|
<div
|
||||||
@@ -77,47 +76,33 @@ const LayoutBase = props => {
|
|||||||
|
|
||||||
{siteConfig('SIMPLE_TOP_BAR', null, CONFIG) && <TopBar {...props} />}
|
{siteConfig('SIMPLE_TOP_BAR', null, CONFIG) && <TopBar {...props} />}
|
||||||
|
|
||||||
<div className='flex flex-1 mx-auto overflow-hidden p-8 md:p-0 md:max-w-7xl md:w-8/12 w-screen'>
|
<div className='flex flex-1 mx-auto overflow-hidden py-8 md:p-0 md:max-w-7xl md:px-24 w-screen'>
|
||||||
{/* 主体 - 使用 flex 布局 */}
|
{/* 主体 - 使用 flex 布局 */}
|
||||||
{/* 文章详情才显示 */}
|
{/* 文章详情才显示 */}
|
||||||
{props.post && (
|
{/* {props.post && (
|
||||||
<div className='mt-20 hidden md:block'>
|
<div className='mt-20 hidden md:block md:fixed md:left-5 md:w-[300px]'>
|
||||||
<Catalog {...props} />
|
<Catalog {...props} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)} */}
|
||||||
<div className='overflow-hidden mt-20'>
|
<div className='overflow-hidden md:mt-20 flex-1 '>
|
||||||
{/* 左侧内容区域 - 可滚动 */}
|
{/* 左侧内容区域 - 可滚动 */}
|
||||||
<div
|
<div
|
||||||
id='container-inner'
|
id='container-inner'
|
||||||
className='flex-1 h-full w-full px-24 overflow-y-auto scroll-hidden'>
|
className='h-full w-full md:px-24 overflow-y-auto scroll-hidden relative'>
|
||||||
{/* 移动端导航 - 显示在顶部 */}
|
{/* 移动端导航 - 显示在顶部 */}
|
||||||
<div className='md:hidden'>
|
<div className='md:hidden'>
|
||||||
<NavBar {...props} />
|
<NavBar {...props} />
|
||||||
</div>
|
</div>
|
||||||
<Transition
|
{onLoading ? (
|
||||||
show={!onLoading}
|
// loading 时显示 spinner
|
||||||
appear={true}
|
<div className='flex items-center justify-center min-h-[500px] w-full'>
|
||||||
enter='transition ease-in-out duration-700 transform order-first'
|
<div className='animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-gray-900'></div>
|
||||||
enterFrom='opacity-0 translate-y-16'
|
|
||||||
enterTo='opacity-100'
|
|
||||||
leave='transition ease-in-out duration-300 transform'
|
|
||||||
leaveFrom='opacity-100 translate-y-0'
|
|
||||||
leaveTo='opacity-0 -translate-y-16'
|
|
||||||
unmount={false}>
|
|
||||||
{slotTop}
|
|
||||||
|
|
||||||
{children}
|
|
||||||
</Transition>
|
|
||||||
|
|
||||||
{onLoading && (
|
|
||||||
<div className="flex flex-col justify-center items-center min-h-[50vh]">
|
|
||||||
<div className="flex space-x-2">
|
|
||||||
<div className="w-2 h-2 bg-gray-500 dark:bg-gray-300 rounded-full animate-bounce [animation-delay:-0.3s]"></div>
|
|
||||||
<div className="w-2 h-2 bg-gray-500 dark:bg-gray-300 rounded-full animate-bounce [animation-delay:-0.15s]"></div>
|
|
||||||
<div className="w-2 h-2 bg-gray-500 dark:bg-gray-300 rounded-full animate-bounce"></div>
|
|
||||||
</div>
|
|
||||||
<div className="text-xl font-medium text-gray-600 dark:text-gray-300">别着急,坐和放宽</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
{slotTop}
|
||||||
|
{children}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
<AdSlot type='native' />
|
<AdSlot type='native' />
|
||||||
{/* 移动端页脚 - 显示在底部 */}
|
{/* 移动端页脚 - 显示在底部 */}
|
||||||
@@ -206,7 +191,7 @@ const LayoutArchive = props => {
|
|||||||
const { archivePosts } = props
|
const { archivePosts } = props
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='mb-10 pb-20 md:py-12 p-3 min-h-screen w-full'>
|
<div className='mb-10 pb-20 md:pb-12 p-3 min-h-screen w-full'>
|
||||||
{Object.keys(archivePosts).map(archiveTitle => (
|
{Object.keys(archivePosts).map(archiveTitle => (
|
||||||
<BlogArchiveItem
|
<BlogArchiveItem
|
||||||
key={archiveTitle}
|
key={archiveTitle}
|
||||||
|
|||||||
Reference in New Issue
Block a user