mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-07 15:10:32 +00:00
hexo 主题微调
This commit is contained in:
@@ -55,7 +55,7 @@ const LayoutBase = (props) => {
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
{/* 右下角悬浮 */}
|
{/* 右下角悬浮 */}
|
||||||
<div className='bottom-12 right-2 fixed justify-end z-20 font-sans'>
|
<div className='bottom-12 right-0 fixed justify-end z-20 font-sans'>
|
||||||
<div className={(show ? 'animate__animated ' : 'hidden') + ' animate__fadeInUp justify-center duration-500 animate__faster flex flex-col items-center cursor-pointer '}>
|
<div className={(show ? 'animate__animated ' : 'hidden') + ' animate__fadeInUp justify-center duration-500 animate__faster flex flex-col items-center cursor-pointer '}>
|
||||||
<FloatDarkModeButton/>
|
<FloatDarkModeButton/>
|
||||||
{floatSlot}
|
{floatSlot}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default function FloatDarkModeButton () {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
onClick={handleChangeDarkMode}
|
onClick={handleChangeDarkMode}
|
||||||
className={'justify-center items-center text-white bg-blue-400 w-7 h-7 text-center transform hover:scale-105 duration-200'
|
className={'justify-center items-center text-white bg-gray-400 w-7 h-7 text-center transform hover:scale-105 duration-200'
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<i id="darkModeButton" className={`${isDarkMode ? 'fa-sun' : 'fa-moon'} fas text-xs`}/>
|
<i id="darkModeButton" className={`${isDarkMode ? 'fa-sun' : 'fa-moon'} fas text-xs`}/>
|
||||||
|
|||||||
@@ -7,14 +7,15 @@ const Footer = ({ title }) => {
|
|||||||
const startYear = BLOG.SINCE && BLOG.SINCE !== currentYear && BLOG.SINCE + '-'
|
const startYear = BLOG.SINCE && BLOG.SINCE !== currentYear && BLOG.SINCE + '-'
|
||||||
return (
|
return (
|
||||||
<footer
|
<footer
|
||||||
className='dark:bg-gray-900 flex-shrink-0 justify-center text-center m-auto w-full leading-6 text-gray-400 text-sm p-6'
|
className='font-sans dark:bg-gray-900 flex-shrink-0 bg-blue-400 justify-center text-center m-auto w-full leading-6 text-gray-100 text-sm p-6'
|
||||||
>
|
>
|
||||||
<i className='fas fa-copyright' /> {`${startYear}${currentYear}`} <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>.
|
<i className='fas fa-copyright' /> {`${startYear}${currentYear}`} <span><i className='mx-1 animate-pulse fas fa-heart'/> <a href={BLOG.LINK} className='underline font-bold text-gray-50 dark:text-gray-300 '>{BLOG.AUTHOR}</a>.
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<span>Powered by <a href='https://notion.so' className='underline font-bold text-gray-500 dark:text-gray-300'>Notion</a> & <a href='https://github.com/tangly1024/NotionNext' className='underline font-bold text-gray-500 dark:text-gray-300'>NotionNext</a>.</span></span>
|
<span>Powered by <a href='https://notion.so' className='underline font-bold text-gray-50 dark:text-gray-300'>Notion</a> & <a href='https://github.com/tangly1024/NotionNext' className='underline font-bold text-gray-50 dark:text-gray-300'>NotionNext</a>.</span></span>
|
||||||
|
|
||||||
{BLOG.BEI_AN && <><br /><i className='fas fa-shield-alt' /> <a href='https://beian.miit.gov.cn/' className='mr-2'>{BLOG.BEI_AN}</a><br/></>}
|
{BLOG.BEI_AN && <><br /><i className='fas fa-shield-alt' /> <a href='https://beian.miit.gov.cn/' className='mr-2'>{BLOG.BEI_AN}</a><br/></>}
|
||||||
|
<br/>
|
||||||
<span className='hidden busuanzi_container_site_pv'>
|
<span className='hidden busuanzi_container_site_pv'>
|
||||||
<i className='fas fa-eye'/><span className='px-1 busuanzi_value_site_pv'> </span> </span>
|
<i className='fas fa-eye'/><span className='px-1 busuanzi_value_site_pv'> </span> </span>
|
||||||
<span className='pl-2 hidden busuanzi_container_site_uv'>
|
<span className='pl-2 hidden busuanzi_container_site_uv'>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Image from 'next/image'
|
|||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import Card from './Card'
|
import Card from './Card'
|
||||||
import SocialButton from './SocialButton'
|
import SocialButton from './SocialButton'
|
||||||
import MenuButtonGroup from './MenuButtonGroup'
|
import MenuGroupCard from './MenuGroupCard'
|
||||||
export function InfoCard (props) {
|
export function InfoCard (props) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
return <Card>
|
return <Card>
|
||||||
@@ -23,7 +23,7 @@ export function InfoCard (props) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='text-center font-sans text-xl pb-4 dark:text-gray-300'>{BLOG.TITLE}</div>
|
<div className='text-center font-sans text-xl pb-4 dark:text-gray-300'>{BLOG.TITLE}</div>
|
||||||
<MenuButtonGroup {...props}/>
|
<MenuGroupCard {...props}/>
|
||||||
<SocialButton />
|
<SocialButton />
|
||||||
</Card>
|
</Card>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const JumpToCommentButton = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (<div className='flex space-x-1 items-center justify-center transform hover:scale-105 duration-200 text-white bg-blue-400 w-7 h-7 text-center' onClick={navToComment} >
|
return (<div className='flex space-x-1 items-center justify-center transform hover:scale-105 duration-200 text-white bg-gray-400 w-7 h-7 text-center' onClick={navToComment} >
|
||||||
<i className='fas fa-comment text-xs' />
|
<i className='fas fa-comment text-xs' />
|
||||||
</div>)
|
</div>)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ const JumpToTopButton = ({ showPercent = true, percent }) => {
|
|||||||
return <></>
|
return <></>
|
||||||
}
|
}
|
||||||
const { locale } = useGlobal()
|
const { locale } = useGlobal()
|
||||||
return (<div className='flex space-x-1 items-center justify-center transform hover:scale-105 duration-200 text-white bg-blue-400 w-7 h-7 text-center' onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })} >
|
return (<div className='space-x-1 items-center justify-center transform hover:scale-105 duration-200 text-white bg-gray-400 w-7 h-auto pb-1 text-center' onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })} >
|
||||||
{!showPercent && <div title={locale.POST.TOP} ><i className='fas fa-arrow-up text-xs' /></div>}
|
<div title={locale.POST.TOP} ><i className='fas fa-arrow-up text-xs' /></div>
|
||||||
{showPercent && (<div className='text-xs block lg:hidden'>{percent}</div>)}
|
{showPercent && (<div className='text-xs hidden lg:block'>{percent}</div>)}
|
||||||
</div>)
|
</div>)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Link from 'next/link'
|
|||||||
import { useGlobal } from '@/lib/global'
|
import { useGlobal } from '@/lib/global'
|
||||||
import CONFIG_HEXO from '../config_hexo'
|
import CONFIG_HEXO from '../config_hexo'
|
||||||
|
|
||||||
const MenuButtonGroup = (props) => {
|
const MenuGroupCard = (props) => {
|
||||||
const { postCount, categories, tags } = props
|
const { postCount, categories, tags } = props
|
||||||
const { locale } = useGlobal()
|
const { locale } = useGlobal()
|
||||||
const archiveSlot = <div className='text-center'>{postCount}</div>
|
const archiveSlot = <div className='text-center'>{postCount}</div>
|
||||||
@@ -33,4 +33,4 @@ const MenuButtonGroup = (props) => {
|
|||||||
})}
|
})}
|
||||||
</nav>
|
</nav>
|
||||||
}
|
}
|
||||||
export default MenuButtonGroup
|
export default MenuGroupCard
|
||||||
@@ -48,7 +48,7 @@ const PaginationNumber = ({ page, totalPage }) => {
|
|||||||
|
|
||||||
function getPageElement (page, currentPage) {
|
function getPageElement (page, currentPage) {
|
||||||
return <Link href={page === 1 ? '/' : `/page/${page}`} key={page} passHref>
|
return <Link href={page === 1 ? '/' : `/page/${page}`} key={page} passHref>
|
||||||
<a className={(page + '' === currentPage + '' ? 'font-bold bg-blue-500 dark:bg-blue-400 text-white ' : 'border-t-2 duration-500 border-white hover:border-blue-400 ') +
|
<a className={(page + '' === currentPage + '' ? 'font-bold bg-blue-400 dark:bg-blue-500 text-white ' : 'border-t-2 duration-500 border-white hover:border-blue-400 ') +
|
||||||
' border-white dark:border-blue-700 dark:hover:border-blue-400 cursor-pointer pb-0.5 w-6 text-center font-light hover:font-bold'}>
|
' border-white dark:border-blue-700 dark:hover:border-blue-400 cursor-pointer pb-0.5 w-6 text-center font-light hover:font-bold'}>
|
||||||
{page}
|
{page}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ const TocDrawerButton = (props) => {
|
|||||||
return <></>
|
return <></>
|
||||||
}
|
}
|
||||||
const { locale } = useGlobal()
|
const { locale } = useGlobal()
|
||||||
return (<div onClick={props.onClick} className='py-2 px-3 cursor-pointer text-white transform duration-200 flex justify-center items-center bg-blue-400 w-7 h-7 text-center' title={locale.POST.TOP} >
|
return (<div onClick={props.onClick} className='py-2 px-3 cursor-pointer text-white transform duration-200 flex justify-center items-center bg-gray-400 w-7 h-7 text-center' title={locale.POST.TOP} >
|
||||||
<i className='fas fa-list-ol'/>
|
<i className='fas fa-list-ol text-xs'/>
|
||||||
</div>)
|
</div>)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const TopNav = (props) => {
|
|||||||
const scrollS = window.scrollY
|
const scrollS = window.scrollY
|
||||||
const nav = document.querySelector('#sticky-nav')
|
const nav = document.querySelector('#sticky-nav')
|
||||||
const header = document.querySelector('#header')
|
const header = document.querySelector('#header')
|
||||||
const showNav = (scrollS > 10 && scrollS < windowTop) || (header && scrollS < 5) // 非首页无大图时影藏顶部 滚动条置顶时隐藏
|
const showNav = (scrollS > 0 && scrollS < windowTop) || (header && scrollS < 5) // 非首页无大图时影藏顶部 滚动条置顶时隐藏
|
||||||
|
|
||||||
if (!showNav) {
|
if (!showNav) {
|
||||||
nav && nav.classList.replace('top-0', '-top-20')
|
nav && nav.classList.replace('top-0', '-top-20')
|
||||||
|
|||||||
Reference in New Issue
Block a user