mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
hexo主题菜单栏
This commit is contained in:
@@ -51,7 +51,7 @@ export default function Header () {
|
||||
const scrollS = window.scrollY
|
||||
const nav = document.querySelector('#sticky-nav')
|
||||
|
||||
if (scrollS < 300) {
|
||||
if (scrollS < 500) {
|
||||
nav && nav.classList.replace('bg-white', 'bg-none')
|
||||
nav && nav.classList.replace('text-black', 'text-white')
|
||||
} else {
|
||||
@@ -59,6 +59,7 @@ export default function Header () {
|
||||
nav && nav.classList.replace('text-white', 'text-black')
|
||||
}
|
||||
|
||||
// 自动滚动
|
||||
if ((scrollS > windowTop) & (scrollS < window.innerHeight) && !autoScroll
|
||||
) {
|
||||
autoScroll = true
|
||||
@@ -98,7 +99,7 @@ export default function Header () {
|
||||
return (
|
||||
<header
|
||||
id="header"
|
||||
className="duration-500 md:bg-fixed w-full bg-cover bg-center h-screen bg-black"
|
||||
className="duration-500 md:bg-fixed w-full bg-cover bg-center h-screen bg-black text-white"
|
||||
style={{
|
||||
backgroundImage:
|
||||
`linear-gradient(rgba(0, 0, 0, 0.8), rgba(0,0,0,0.2), rgba(0, 0, 0, 0.8) ),url("${CONFIG_HEXO.HOME_BANNER_IMAGE}")`
|
||||
|
||||
@@ -23,7 +23,7 @@ const MenuButtonGroupTop = (props) => {
|
||||
if (link.show) {
|
||||
return <Link key={`${link.to}`} title={link.to} href={link.to} >
|
||||
<a className={'py-1.5 my-1 px-2 duration-300 text-base justify-center items-center cursor-pointer'} >
|
||||
<div className='w-full flex dark:text-white text-sm items-center justify-center hover:scale-105 duration-200 transform'>
|
||||
<div className='w-full flex text-sm items-center justify-center hover:scale-105 transform'>
|
||||
<i className={`${link.icon} mr-1`}/>
|
||||
<div className='text-center'>{link.name}</div>
|
||||
</div>
|
||||
|
||||
@@ -98,7 +98,7 @@ const TopNav = (props) => {
|
||||
</div>
|
||||
|
||||
{/* 右侧功能 */}
|
||||
<div className='mr-1 justify-end items-center space-x-4 font-serif dark:text-gray-200'>
|
||||
<div className='mr-1 justify-end items-center space-x-4 font-serif'>
|
||||
<div className='hidden lg:flex'> <MenuButtonGroupTop {...props}/></div>
|
||||
<div onClick={toggleMenuOpen} className='w-8 justify-center items-center h-8 cursor-pointer flex lg:hidden'>
|
||||
{ isOpen ? <i className='fas fa-times'/> : <i className='fas fa-bars'/> }
|
||||
|
||||
Reference in New Issue
Block a user