Merge pull request #581 from tangly1024/main

发布 tangly1024.com
This commit is contained in:
tangly1024
2022-12-10 16:09:13 +08:00
committed by GitHub
23 changed files with 29 additions and 24 deletions

View File

@@ -1,2 +1,2 @@
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
NEXT_PUBLIC_VERSION=3.6.4
NEXT_PUBLIC_VERSION=3.6.5

View File

@@ -1,6 +1,6 @@
{
"name": "notion-next",
"version": "3.6.4",
"version": "3.6.5",
"homepage": "https://github.com/tangly1024/NotionNext.git",
"license": "MIT",
"repository": {

View File

@@ -1993,3 +1993,7 @@ thead, tbody tr {
width:100%;
table-layout:fixed;
}
.notion-collection-card{
@apply dark:hover:text-gray-200
}

View File

@@ -1,7 +1,7 @@
import React from 'react'
import { RecentComments } from '@waline/client'
import BLOG from '@/blog.config'
import Link from 'next/link'
import { RecentComments } from '@waline/client'
/**
* @see https://waline.js.org/guide/get-started.html

View File

@@ -2,7 +2,8 @@ import BLOG from '@/blog.config'
import Live2D from '@/components/Live2D'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import ExampleRecentComments from './ExampleRecentComments'
import dynamic from 'next/dynamic'
const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments'))
export const SideBar = (props) => {
const { locale } = useGlobal()

View File

@@ -4,7 +4,6 @@ const FUKA_CONFIG = {
POST_LIST_PREVIEW: false, // 显示文章预览
// 菜单
MENU_ABOUT: true, // 显示关于
MENU_CATEGORY: true, // 显示分类
MENU_TAG: true, // 显示标签
MENU_ARCHIVE: true, // 显示归档

View File

@@ -1,9 +1,9 @@
import React from 'react'
import { RecentComments } from '@waline/client'
import BLOG from '@/blog.config'
import Card from '@/themes/hexo/components/Card'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import { RecentComments } from '@waline/client'
/**
* @see https://waline.js.org/guide/get-started.html

View File

@@ -6,9 +6,10 @@ import Catalog from './Catalog'
import { InfoCard } from './InfoCard'
import { AnalyticsCard } from './AnalyticsCard'
import CONFIG_HEXO from '../config_hexo'
import HexoRecentComments from './HexoRecentComments'
import BLOG from '@/blog.config'
import dynamic from 'next/dynamic'
const HexoRecentComments = dynamic(() => import('./HexoRecentComments'))
/**
* Hexo主题右侧栏
* @param {*} props

View File

@@ -9,7 +9,6 @@ const CONFIG_MEDIUM = {
POST_DETAIL_TAG: true, // 文章显示标签
// 菜单
MENU_ABOUT: true, // 显示关于
MENU_CATEGORY: true, // 显示分类
MENU_TAG: true, // 显示标签
MENU_ARCHIVE: true, // 显示归档

View File

@@ -39,7 +39,7 @@ export const LayoutArchive = (props) => {
return (
<LayoutBase {...props}>
<div className="mb-10 pb-20 bg-white md:p-12 p-3 dark:bg-gray-800 shadow-md min-h-full">
<div className="mb-10 pb-20 bg-white md:p-12 p-3 dark:bg-hexo-black-gray shadow-md min-h-full">
{Object.keys(archivePosts).map(archiveTitle => (
<BlogPostArchive
key={archiveTitle}

View File

@@ -6,7 +6,7 @@ export const LayoutCategoryIndex = (props) => {
const { allPosts, categories } = props
const { locale } = useGlobal()
return <LayoutBase totalPosts={allPosts} {...props}>
<div className='bg-white dark:bg-gray-700 px-10 py-10 shadow h-full'>
<div className='bg-white dark:bg-hexo-black-gray px-10 py-10 shadow h-full'>
<div className='dark:text-gray-200 mb-5'>
<i className='mr-4 fas faTh' />{locale.COMMON.CATEGORY}:
</div>

View File

@@ -6,7 +6,7 @@ export const LayoutTagIndex = (props) => {
const { tags } = props
const { locale } = useGlobal()
return <LayoutBase {...props}>
<div className='bg-white dark:bg-gray-700 px-10 py-10 shadow h-full'>
<div className='bg-white dark:bg-hexo-black-gray px-10 py-10 shadow h-full'>
<div className='dark:text-gray-200 mb-5'><i className='fas fa-tags mr-4'/>{locale.COMMON.TAGS}:</div>
<div id='tags-list' className='duration-200 flex flex-wrap'>
{ tags.map(tag => {

View File

@@ -86,7 +86,7 @@ const BlogPostCard = ({ post, showSummary }) => {
<div className="text-right border-t pt-8 border-dashed">
<Link href={`${BLOG.SUB_PATH}/${post.slug}`}>
<a className="hover:bg-opacity-100 hover:underline transform duration-300 p-3 text-white bg-gray-800 dark:bg-black cursor-pointer">
<a className="hover:bg-opacity-100 hover:underline transform duration-300 p-3 text-white bg-gray-800 cursor-pointer">
{locale.COMMON.ARTICLE_DETAIL}
<i className="ml-1 fas fa-angle-right" />
</a>

View File

@@ -14,7 +14,7 @@ const Footer = ({ title }) => {
return (
<footer
className='dark:bg-gray-900 flex-shrink-0 justify-center text-center m-auto w-full leading-6 text-sm p-6 dark:text-gray-400'
className='dark:bg-gray-800 flex-shrink-0 justify-center text-center m-auto w-full leading-6 text-sm p-6 bg-white dark:text-gray-400'
>
<DarkModeButton/>
<span>

View File

@@ -4,7 +4,7 @@ import React from 'react'
const Logo = props => {
const { siteInfo, className } = props
return <Link href='/' passHref>
<div className={'flex flex-col justify-center items-center cursor-pointer bg-black space-y-3 font-bold ' + className}>
<div className={'flex flex-col justify-center items-center cursor-pointer bg-black dark:bg-gray-800 space-y-3 font-bold ' + className}>
<div className='font-serif text-xl text-white'> {siteInfo?.title}</div>
<div className='text-sm text-gray-300 font-light text-center'> {siteInfo?.description}</div>
</div>

View File

@@ -14,8 +14,7 @@ const MenuButtonGroup = (props) => {
{ icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true },
{ icon: 'fas fa-th', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_NEXT.MENU_CATEGORY },
{ icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_NEXT.MENU_TAG },
{ icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_NEXT.MENU_ARCHIVE },
{ icon: 'fas fa-user', name: locale.NAV.ABOUT, to: '/about', show: CONFIG_NEXT.MENU_ABOUT }
{ icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_NEXT.MENU_ARCHIVE }
]
let links = [].concat(defaultLinks)
if (customNav) {

View File

@@ -1,7 +1,7 @@
import React from 'react'
import { RecentComments } from '@waline/client'
import BLOG from '@/blog.config'
import Link from 'next/link'
import { RecentComments } from '@waline/client'
/**
* @see https://waline.js.org/guide/get-started.html

View File

@@ -16,7 +16,7 @@ const PaginationNumber = ({ page, totalPage }) => {
const pages = generatePages(pagePrefix, page, currentPage, totalPage)
return (
<div className="my-5 flex justify-center items-end font-medium text-black hover:shadow-xl duration-500 bg-white dark:bg-gray-700 dark:text-gray-300 py-3 shadow space-x-2">
<div className="my-5 flex justify-center items-end font-medium text-black hover:shadow-xl duration-500 bg-white dark:bg-hexo-black-gray dark:text-gray-300 py-3 shadow space-x-2">
{/* 上一页 */}
<Link
href={{

View File

@@ -66,7 +66,7 @@ const SearchInput = ({ currentTag, currentSearch, cRef }) => {
ref={searchInputRef}
type='text'
placeholder={currentTag ? `${locale.SEARCH.TAGS} #${currentTag}` : `${locale.SEARCH.ARTICLES}`}
className={'w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-900 dark:text-white'}
className={'w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-800 dark:text-white'}
onKeyUp={handleKeyUp}
onCompositionStart={lockSearchInput}
onCompositionUpdate={lockSearchInput}

View File

@@ -6,8 +6,9 @@ import CategoryGroup from './CategoryGroup'
import TagGroups from './TagGroups'
import CONFIG_NEXT from '../config_next'
import { useRouter } from 'next/router'
import NextRecentComments from './NextRecentComments'
import BLOG from '@/blog.config'
import dynamic from 'next/dynamic'
const NextRecentComments = dynamic(() => import('./NextRecentComments'))
/**
* 侧边平铺

View File

@@ -11,7 +11,7 @@ let windowTop = 0
* @constructor
*/
const StickyBar = ({ children }) => {
if (!children) return <></>
// 滚动页面时导航条样式调整
const scrollTrigger = useCallback(throttle(() => {
if (CONFIG_NEXT.NAV_TYPE === 'normal') {
return
@@ -37,9 +37,11 @@ const StickyBar = ({ children }) => {
}
}, [])
if (!children) return <></>
return (
<div id='sticky-bar' className='sticky flex-grow justify-center top-0 duration-500 z-10 pb-16'>
<div className='bg-white dark:bg-black px-5 absolute shadow-md w-full scroll-hidden'>
<div className='bg-white dark:bg-hexo-black-gray px-5 absolute shadow-md w-full scroll-hidden'>
<div id='tag-container' className="md:pl-3 overflow-x-auto">
{children}
</div>

View File

@@ -89,7 +89,7 @@ const TopNav = (props) => {
{/* 导航栏 */}
<div id='sticky-nav' className={`${CONFIG_NEXT.NAV_TYPE !== 'normal' ? 'fixed' : ''} lg:relative w-full top-0 z-20 transform duration-500`}>
<div className='w-full flex justify-between items-center p-4 bg-black text-white'>
<div className='w-full flex justify-between items-center p-4 bg-black dark:bg-gray-800 text-white'>
{/* 左侧LOGO 标题 */}
<div className='flex flex-none flex-grow-0'>
<div onClick={toggleMenuOpen} className='w-8 cursor-pointer'>

View File

@@ -23,7 +23,6 @@ const CONFIG_NEXT = {
MENU_CATEGORY: true, // 显示分类
MENU_TAG: true, // 显示标签
MENU_ARCHIVE: true, // 显示归档
MENU_ABOUT: false, // 显示关于
MENU_SEARCH: true, // 显示搜索
WIDGET_TO_TOP: true, // 是否显示回顶