mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 15:10:16 +00:00
微调样式
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { useCallback, useEffect } from 'react'
|
||||
import CommonHead from '@/components/CommonHead'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import throttle from 'lodash.throttle'
|
||||
import BLOG from '@/blog.config'
|
||||
import { useTheme } from '@/lib/theme'
|
||||
@@ -15,14 +14,14 @@ const Container = ({ children, layout, fullWidth, tags, meta, ...customMeta }) =
|
||||
const tagsBar = document.querySelector('#tags-bar')
|
||||
const rightToc = document.querySelector('#right-toc')
|
||||
if (scrollS >= windowTop && scrollS > 10) {
|
||||
nav && nav.classList.add('-mt-16')
|
||||
tagsBar && tagsBar.classList.add('-mt-32')
|
||||
nav && nav.classList.replace('top-0', '-top-16')
|
||||
tagsBar && tagsBar.classList.replace('top-16', 'top-0')
|
||||
sidebar && sidebar.classList.replace('top-20', 'top-2')
|
||||
rightToc && rightToc.classList.replace('top-16', 'top-0')
|
||||
windowTop = scrollS
|
||||
} else {
|
||||
nav && nav.classList.remove('-mt-16')
|
||||
tagsBar && tagsBar.classList.remove('-mt-32')
|
||||
nav && nav.classList.replace('-top-16', 'top-0')
|
||||
tagsBar && tagsBar.classList.replace('top-0', 'top-16')
|
||||
sidebar && sidebar.classList.replace('top-2', 'top-20')
|
||||
rightToc && rightToc.classList.replace('top-0', 'top-16')
|
||||
windowTop = scrollS
|
||||
|
||||
Reference in New Issue
Block a user