检查build

This commit is contained in:
tangly1024.com
2023-07-05 12:50:57 +08:00
parent a2b593d9db
commit 705e15a202
14 changed files with 36 additions and 276 deletions

View File

@@ -1,6 +1,6 @@
import Link from 'next/link'
import { useGlobal } from '@/lib/global'
import TagItemMiddle from './components/TagItemMiddle'
import TagItemMiddle from './TagItemMiddle'
export default function BlogListBar(props) {
const { category, categoryOptions, tag, tagOptions } = props
@@ -8,8 +8,7 @@ export default function BlogListBar(props) {
if (category) {
return (
<div className="drop-shadow-xl -mt-32 rounded-md mx-3 px-5 lg:border lg:rounded-xl lg:px-2 lg:py-4 bg-white dark:bg-hexo-black-gray dark:border-black">
<div className="drop-shadow-xl w-full mt-14 lg:mt-6 rounded-md mx-3 px-5 lg:border lg:rounded-xl lg:px-2 lg:py-4 bg-white dark:bg-hexo-black-gray dark:border-black">
<div className='flex justify-center flex-wrap'>
{categoryOptions?.map(e => {
const selected = e.name === category
@@ -27,12 +26,10 @@ export default function BlogListBar(props) {
)
} else if (tag) {
return <div className="drop-shadow-xl -mt-32 rounded-md mx-3 px-5 lg:border lg:rounded-xl lg:px-2 lg:py-4 bg-white dark:bg-hexo-black-gray dark:border-black">
return <div className="drop-shadow-xl w-full mt-14 lg:mt-6 rounded-md mx-3 px-5 lg:border lg:rounded-xl lg:px-2 lg:py-4 bg-white dark:bg-hexo-black-gray dark:border-black">
<div className="dark:text-gray-200 py-5 text-center text-2xl">
<i className="fas fa-tags" /> {locale.COMMON.TAGS}
</div>
<div id="tags-list" className="duration-200 flex flex-wrap justify-center pb-12">
{tagOptions?.map(e => {
const selected = tag === e.name

View File

@@ -1,4 +1,4 @@
import { useEffect, useRef } from 'react'
import { useCallback, useEffect, useRef, useState } from 'react'
import throttle from 'lodash.throttle'
import { uuidToId } from 'notion-utils'
import Progress from './Progress'
@@ -26,9 +26,9 @@ const Catalog = ({ toc }) => {
const tocIds = []
// 同步选中目录事件
const [activeSection, setActiveSection] = React.useState(null)
const [activeSection, setActiveSection] = useState(null)
const throttleMs = 200
const actionSectionScrollSpy = React.useCallback(throttle(() => {
const actionSectionScrollSpy = useCallback(throttle(() => {
const sections = document.getElementsByClassName('notion-h')
let prevBBox = null
let currentSectionId = activeSection

View File

@@ -13,7 +13,7 @@ const PaginationSimple = ({ page, totalPage }) => {
const currentPage = +page
const showNext = currentPage < totalPage
const pagePrefix = router.asPath.split('?')[0].replace(/\/page\/[1-9]\d*/, '').replace(/\/$/, '')
console.log(currentPage, showNext)
return (
<div className="my-10 mx-6 flex justify-between font-medium text-black dark:text-gray-100 space-x-2">
<Link
@@ -29,7 +29,7 @@ const PaginationSimple = ({ page, totalPage }) => {
<button
rel="prev"
className={`${
currentPage === 1 ? ' bg-gray-300 text-gray-500 pointer-events-none ' : 'block text-white bg-indigo-700'
currentPage === 1 ? 'opacity-20 bg-gray-200 text-gray-500 pointer-events-none ' : 'block text-white bg-indigo-700'
} duration-200 px-3.5 py-2 hover:border-black rounded-full`} >
<i className='fas fa-angle-left text-2xl'/>
</button>
@@ -44,7 +44,7 @@ const PaginationSimple = ({ page, totalPage }) => {
<button
rel="next"
className={`${
+showNext ? 'text-white bg-indigo-700 ' : ' bg-gray-300 text-gray-500 pointer-events-none '
+showNext ? 'text-white bg-indigo-700 ' : ' opacity-20 bg-gray-200 text-gray-500 pointer-events-none '
} duration-200 px-4 py-2 hover:border-black rounded-full`}
>
<i className='fas fa-angle-right text-2xl'/>

View File

@@ -1,13 +1,13 @@
import JumpToTopButton from './components/JumpToTopButton'
import FloatDarkModeButton from './components/FloatDarkModeButton'
import SocialButton from './components/SocialButton'
import JumpToTopButton from './JumpToTopButton'
import FloatDarkModeButton from './FloatDarkModeButton'
import SocialButton from './SocialButton'
/**
* 右下角悬浮按钮
* @param {*} param0
* @returns
*/
export default function RightFloatButtons({ props }) {
export default function RightFloatButtons(props) {
const { floatRightBottom } = props
return <div className="bottom-40 right-2 fixed justify-end space-y-2 z-20">
<FloatDarkModeButton />

View File

@@ -1,7 +1,7 @@
import SearchInput from './components/SearchInput'
import TagItemMini from './components/TagItemMini'
import Card from './components/Card'
import SearchInput from './SearchInput'
import TagItemMini from './TagItemMini'
import Card from './Card'
import Link from 'next/link'
import { useEffect, useRef } from 'react'
import { useGlobal } from '@/lib/global'