theme-gitbook

This commit is contained in:
tangly1024.com
2023-07-04 18:17:33 +08:00
parent 900d1c847b
commit 77c13a4448
24 changed files with 280 additions and 468 deletions

View File

@@ -1,5 +1,5 @@
import { useGitBookGlobal } from '@/themes/gitbook'
import React from 'react'
import { useGitBookGlobal } from '../LayoutBase'
import JumpToTopButton from './JumpToTopButton'
export default function BottomMenuBar({ post, className }) {

View File

@@ -1,4 +1,4 @@
import { useGitBookGlobal } from '../LayoutBase'
import { useGitBookGlobal } from '@/themes/gitbook'
export default function FloatTocButton () {
const { tocVisible, changeTocVisible } = useGitBookGlobal()

View File

@@ -0,0 +1,7 @@
export default function LoadingCover() {
return <div id='cover-loading' className={'z-50 opacity-50pointer-events-none transition-all duration-300'}>
<div className='w-full h-screen flex justify-center items-center'>
<i className="fa-solid fa-spinner text-2xl text-black dark:text-white animate-spin"> </i>
</div>
</div>
}

View File

@@ -1,6 +1,6 @@
import BLOG from '@/blog.config'
import { useGitBookGlobal } from '@/themes/gitbook'
import Link from 'next/link'
import { useGitBookGlobal } from '../LayoutBase'
/**
* Logo区域

View File

@@ -37,8 +37,8 @@ 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 `}>
{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'>
{link?.subMenus?.map((sLink, index) => {
return <li key={index} 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}>
<span className='text-xs font-extralight'>{link?.icon && <i className={sLink?.icon} > &nbsp; </i>}{sLink.title}</span>
</Link>

View File

@@ -1,4 +1,4 @@
import { useGitBookGlobal } from '../LayoutBase'
import { useGitBookGlobal } from '@/themes/gitbook'
import NavPostList from './NavPostList'
/**

View File

@@ -1,6 +1,6 @@
import { useImperativeHandle, useRef, useState } from 'react'
import { useGitBookGlobal } from '../LayoutBase'
import { deepClone } from '@/lib/utils'
import { useGitBookGlobal } from '@/themes/gitbook'
let lock = false
const SearchInput = ({ currentSearch, cRef, className }) => {

View File

@@ -1,5 +1,5 @@
import { useGitBookGlobal } from '@/themes/gitbook'
import Catalog from './Catalog'
import { useGitBookGlobal } from '../LayoutBase'
/**
* 悬浮抽屉目录