mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-18 23:16:49 +00:00
feature:
添加大量可配置项
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faListOl } from '@fortawesome/free-solid-svg-icons'
|
||||
import BLOG from '@/blog.config'
|
||||
|
||||
/**
|
||||
* 点击召唤目录抽屉
|
||||
@@ -11,6 +12,9 @@ import { faListOl } from '@fortawesome/free-solid-svg-icons'
|
||||
* @constructor
|
||||
*/
|
||||
const TocDrawerButton = (props) => {
|
||||
if (!BLOG.widget?.showToc) {
|
||||
return <></>
|
||||
}
|
||||
const { locale } = useGlobal()
|
||||
const [show, switchShow] = useState(false)
|
||||
const scrollListener = () => {
|
||||
@@ -27,10 +31,10 @@ const TocDrawerButton = (props) => {
|
||||
})
|
||||
|
||||
return (
|
||||
<div id='toc-drawer-button' className='right-3 fixed bottom-60 duration-500 z-20'>
|
||||
<div onClick={props.onClick} className={(show ? 'animate__fadeInRight' : 'hidden') + ' py-3 px-3.5 animate__animated glassmorphism rounded-xl cursor-pointer shadow-card' }>
|
||||
<div className='dark:text-gray-200 text-center transform hover:scale-150 duration-200 text-xs' title={locale.POST.TOP} >
|
||||
<FontAwesomeIcon icon={faListOl} />
|
||||
<div id='toc-drawer-button' className='right-1 fixed bottom-52 duration-500 z-20'>
|
||||
<div onClick={props.onClick} className={(show ? 'animate__fadeInRight' : 'hidden') + ' animate__animated glassmorphism cursor-pointer' }>
|
||||
<div className='dark:text-gray-200 text-center transform hover:scale-150 duration-200 text-xs flex justify-center items-center w-8 h-8' title={locale.POST.TOP} >
|
||||
<FontAwesomeIcon icon={faListOl}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user