mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-30 15:10:11 +00:00
gitbook 改版
This commit is contained in:
@@ -3,6 +3,7 @@ import { useGlobal } from '@/lib/global'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useEffect, useState } from 'react'
|
||||
import CONFIG from '../config'
|
||||
import BlogPostCard from './BlogPostCard'
|
||||
import NavPostItem from './NavPostItem'
|
||||
|
||||
/**
|
||||
@@ -13,7 +14,7 @@ import NavPostItem from './NavPostItem'
|
||||
* @constructor
|
||||
*/
|
||||
const NavPostList = props => {
|
||||
const { filteredNavPages } = props
|
||||
const { filteredNavPages, post } = props
|
||||
const { locale, currentSearch } = useGlobal()
|
||||
const router = useRouter()
|
||||
|
||||
@@ -80,11 +81,22 @@ const NavPostList = props => {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
// 如果href
|
||||
const href = siteConfig('GITBOOK_INDEX_PAGE') + ''
|
||||
|
||||
const homePost = {
|
||||
id: '-1',
|
||||
title: siteConfig('DESCRIPTION'),
|
||||
href: href.indexOf('/') !== 0 ? '/' + href : href
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
id='posts-wrapper'
|
||||
className='w-full flex-grow space-y-0.5 tracking-wider'>
|
||||
className='w-full flex-grow space-y-0.5 pr-4 tracking-wider'>
|
||||
{/* 当前文章 */}
|
||||
<BlogPostCard className='text-sm py-2' post={homePost} />
|
||||
|
||||
{/* 文章列表 */}
|
||||
{categoryFolders?.map((group, index) => (
|
||||
<NavPostItem
|
||||
|
||||
Reference in New Issue
Block a user