mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-28 07:26:57 +00:00
css fix
This commit is contained in:
@@ -13,7 +13,7 @@ const DarkModeButton = (props) => {
|
|||||||
htmlElement.classList?.add(newStatus ? 'dark' : 'light')
|
htmlElement.classList?.add(newStatus ? 'dark' : 'light')
|
||||||
}
|
}
|
||||||
|
|
||||||
return <div className={'text-white z-10 duration-200 text-xl py-2 ' + props.className}>
|
return <div className={'dark:text-gray-200 z-10 duration-200 text-xl py-2 ' + props.className}>
|
||||||
<i id='darkModeButton' className={`hover:scale-125 cursor-pointer transform duration-200 fas ${isDarkMode ? 'fa-sun' : 'fa-moon'}`}
|
<i id='darkModeButton' className={`hover:scale-125 cursor-pointer transform duration-200 fas ${isDarkMode ? 'fa-sun' : 'fa-moon'}`}
|
||||||
onClick={handleChangeDarkMode} />
|
onClick={handleChangeDarkMode} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export const LayoutArchive = props => {
|
|||||||
return (
|
return (
|
||||||
<LayoutBase {...props}>
|
<LayoutBase {...props}>
|
||||||
<div className="mb-10 pb-20 md:py-12 py-3 min-h-full">
|
<div className="mb-10 pb-20 md:py-12 py-3 min-h-full">
|
||||||
{Object.keys(archivePosts).map(archiveTitle => (
|
{Object.keys(archivePosts)?.map(archiveTitle => (
|
||||||
<div key={archiveTitle}>
|
<div key={archiveTitle}>
|
||||||
<div
|
<div
|
||||||
className="pt-16 pb-4 text-3xl dark:text-gray-300"
|
className="pt-16 pb-4 text-3xl dark:text-gray-300"
|
||||||
@@ -17,7 +17,7 @@ export const LayoutArchive = props => {
|
|||||||
{archiveTitle}
|
{archiveTitle}
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
{archivePosts[archiveTitle].map(post => (
|
{archivePosts[archiveTitle]?.map(post => (
|
||||||
<li
|
<li
|
||||||
key={post.id}
|
key={post.id}
|
||||||
className="border-l-2 p-1 text-xs md:text-base items-center hover:scale-x-105 hover:border-gray-500 dark:hover:border-gray-300 dark:border-gray-400 transform duration-500"
|
className="border-l-2 p-1 text-xs md:text-base items-center hover:scale-x-105 hover:border-gray-500 dark:hover:border-gray-300 dark:border-gray-400 transform duration-500"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const LayoutTagIndex = props => {
|
|||||||
{locale.COMMON.TAGS}:
|
{locale.COMMON.TAGS}:
|
||||||
</div>
|
</div>
|
||||||
<div id="tags-list" className="duration-200 flex flex-wrap">
|
<div id="tags-list" className="duration-200 flex flex-wrap">
|
||||||
{tagOptions.map(tag => {
|
{tagOptions?.map(tag => {
|
||||||
return (
|
return (
|
||||||
<div key={tag.name} className="p-2">
|
<div key={tag.name} className="p-2">
|
||||||
<TagItemMini key={tag.name} tag={tag} />
|
<TagItemMini key={tag.name} tag={tag} />
|
||||||
|
|||||||
@@ -16,8 +16,9 @@ const BlogPostListPage = ({ page = 1, posts = [], postCount }) => {
|
|||||||
|
|
||||||
if (!posts || posts.length === 0) {
|
if (!posts || posts.length === 0) {
|
||||||
return <BlogPostListEmpty />
|
return <BlogPostListEmpty />
|
||||||
} else {
|
}
|
||||||
return (
|
|
||||||
|
return (
|
||||||
<div className='w-full justify-center'>
|
<div className='w-full justify-center'>
|
||||||
<div id='container'>
|
<div id='container'>
|
||||||
{/* 文章列表 */}
|
{/* 文章列表 */}
|
||||||
@@ -27,8 +28,7 @@ const BlogPostListPage = ({ page = 1, posts = [], postCount }) => {
|
|||||||
</div>
|
</div>
|
||||||
<PaginationSimple page={page} totalPage={totalPage} />
|
<PaginationSimple page={page} totalPage={totalPage} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BlogPostListPage
|
export default BlogPostListPage
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const Footer = ({ title }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<footer
|
<footer
|
||||||
className='z-10 dark:bg-hexo-black-gray flex-shrink-0 justify-center text-center m-auto w-full leading-6 text-gray-400 text-sm p-6 relative'
|
className='z-10 dark:bg-hexo-black-gray flex-shrink-0 justify-center text-center m-auto w-full leading-6 text-sm p-6 relative'
|
||||||
>
|
>
|
||||||
<DarkModeButton/>
|
<DarkModeButton/>
|
||||||
<i className='fas fa-copyright' /> {`${copyrightDate}`} <span><i className='mx-1 animate-pulse fas fa-heart'/> <a href={BLOG.LINK} className='underline font-bold text-gray-500 dark:text-gray-300 '>{BLOG.AUTHOR}</a>.<br/>
|
<i className='fas fa-copyright' /> {`${copyrightDate}`} <span><i className='mx-1 animate-pulse fas fa-heart'/> <a href={BLOG.LINK} className='underline font-bold text-gray-500 dark:text-gray-300 '>{BLOG.AUTHOR}</a>.<br/>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export const MenuBarMobile = (props) => {
|
|||||||
return (
|
return (
|
||||||
<nav id='nav' className=' text-md'>
|
<nav id='nav' className=' text-md'>
|
||||||
{/* {links.map(link => <NormalMenu key={link.id} link={link}/>)} */}
|
{/* {links.map(link => <NormalMenu key={link.id} link={link}/>)} */}
|
||||||
{links.map(link => <MenuItemCollapse onHeightChange={props.onHeightChange} key={link.id} link={link}/>)}
|
{links?.map(link => <MenuItemCollapse onHeightChange={props.onHeightChange} key={link.id} link={link}/>)}
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export const MenuItemCollapse = (props) => {
|
|||||||
|
|
||||||
{/* 折叠子菜单 */}
|
{/* 折叠子菜单 */}
|
||||||
{hasSubMenu && <Collapse isOpen={isOpen} onHeightChange={props.onHeightChange}>
|
{hasSubMenu && <Collapse isOpen={isOpen} onHeightChange={props.onHeightChange}>
|
||||||
{link.subMenus.map(sLink => {
|
{link?.subMenus?.map(sLink => {
|
||||||
return <div key={sLink.id} className='
|
return <div key={sLink.id} className='
|
||||||
not:last-child:border-b-0 border-b dark:border-gray-800 py-2 px-14 cursor-pointer hover:bg-gray-100 dark:text-gray-200
|
not:last-child:border-b-0 border-b dark:border-gray-800 py-2 px-14 cursor-pointer hover:bg-gray-100 dark:text-gray-200
|
||||||
font-extralight dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'>
|
font-extralight dark:bg-black text-left justify-start text-gray-600 bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200'>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export const MenuItemDrop = ({ link }) => {
|
|||||||
|
|
||||||
{/* 子菜单 */}
|
{/* 子菜单 */}
|
||||||
{hasSubMenu && <ul className={`${show ? 'visible opacity-100 top-12 ' : 'invisible opacity-0 top-10 '} border-gray-100 bg-white dark:bg-black dark:border-gray-800 transition-all duration-300 z-20 absolute block drop-shadow-lg `}>
|
{hasSubMenu && <ul className={`${show ? 'visible opacity-100 top-12 ' : 'invisible opacity-0 top-10 '} border-gray-100 bg-white dark:bg-black dark:border-gray-800 transition-all duration-300 z-20 absolute block drop-shadow-lg `}>
|
||||||
{link.subMenus.map(sLink => {
|
{link?.subMenus?.map(sLink => {
|
||||||
return <li key={sLink.id} className='not:last-child:border-b-0 border-b text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200 dark:border-gray-800 py-3 pr-6 pl-2'>
|
return <li key={sLink.id} className='not:last-child:border-b-0 border-b text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200 dark:border-gray-800 py-3 pr-6 pl-2'>
|
||||||
<Link href={sLink.to}>
|
<Link href={sLink.to}>
|
||||||
<span className='text-xs font-extralight'>{link?.icon && <i className={sLink?.icon} > </i>}{sLink.title}</span>
|
<span className='text-xs font-extralight'>{link?.icon && <i className={sLink?.icon} > </i>}{sLink.title}</span>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export default function TopNavBar(props) {
|
|||||||
|
|
||||||
{/* 桌面端顶部菜单 */}
|
{/* 桌面端顶部菜单 */}
|
||||||
<div className='hidden md:flex'>
|
<div className='hidden md:flex'>
|
||||||
{links && links.map(link => <MenuItemDrop key={link.id} link={link}/>)}
|
{links && links?.map(link => <MenuItemDrop key={link.id} link={link}/>)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ const NavBar = props => {
|
|||||||
<ul className=" hidden md:flex flex-row">
|
<ul className=" hidden md:flex flex-row">
|
||||||
{links.map(link => <MenuItemDrop key={link.id} link={link} />)}
|
{links.map(link => <MenuItemDrop key={link.id} link={link} />)}
|
||||||
</ul>
|
</ul>
|
||||||
<div><i onClick={toggleOpen} className='fas fa-bars cursor-pointer px-5'></i>
|
<div className='md:hidden'><i onClick={toggleOpen} className='fas fa-bars cursor-pointer px-5 block md:hidden'></i>
|
||||||
<Collapse collapseRef={collapseRef} isOpen={isOpen} type='vertical' className='fixed top-16 right-6'>
|
<Collapse collapseRef={collapseRef} isOpen={isOpen} type='vertical' className='fixed top-16 right-6'>
|
||||||
<div className='dark:border-black bg-white dark:bg-black rounded border p-2 text-sm'>
|
<div className='dark:border-black bg-white dark:bg-black rounded border p-2 text-sm'>
|
||||||
{links.map(link => <MenuItemCollapse key={link.id} link={link} onHeightChange={(param) => collapseRef.current?.updateCollapseHeight(param)}/>)}
|
{links.map(link => <MenuItemCollapse key={link.id} link={link} onHeightChange={(param) => collapseRef.current?.updateCollapseHeight(param)}/>)}
|
||||||
|
|||||||
Reference in New Issue
Block a user