mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
Merge branch 'develop' of https://github.com/tangly1024/NotionNext; branch 'main' of https://github.com/hscpro/notionnext into pr/Hscpro/572
This commit is contained in:
@@ -215,6 +215,9 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) {
|
||||
// 读取映射 配置
|
||||
let postCount = 0
|
||||
|
||||
// 获取page作为自定义菜单
|
||||
const customNav = getCustomNav({ allPages: collectionData.filter(post => post.type === 'Page' && post.status === 'Published') })
|
||||
|
||||
const allPages = collectionData.filter(post => {
|
||||
if (post.type === 'Post' && post.status === 'Published') {
|
||||
postCount++
|
||||
@@ -236,7 +239,6 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) {
|
||||
})
|
||||
}
|
||||
|
||||
const customNav = getCustomNav({ allPages })
|
||||
const categories = getAllCategories({ allPages, categoryOptions, sliceCount: BLOG.PREVIEW_CATEGORY_COUNT })
|
||||
const tags = getAllTags({ allPages, sliceCount: BLOG.PREVIEW_TAG_COUNT, tagOptions })
|
||||
const latestPosts = getLatestPosts({ allPages, from, latestPostCount: 5 })
|
||||
|
||||
@@ -1993,3 +1993,7 @@ thead, tbody tr {
|
||||
width:100%;
|
||||
table-layout:fixed;
|
||||
}
|
||||
|
||||
.notion-collection-card{
|
||||
@apply dark:hover:text-gray-200
|
||||
}
|
||||
@@ -4,7 +4,6 @@ const FUKA_CONFIG = {
|
||||
POST_LIST_PREVIEW: false, // 显示文章预览
|
||||
|
||||
// 菜单
|
||||
MENU_ABOUT: true, // 显示关于
|
||||
MENU_CATEGORY: true, // 显示分类
|
||||
MENU_TAG: true, // 显示标签
|
||||
MENU_ARCHIVE: true, // 显示归档
|
||||
|
||||
@@ -24,7 +24,7 @@ export const LayoutArchive = props => {
|
||||
})
|
||||
return (
|
||||
<LayoutBase {...props}>
|
||||
<div className="mb-10 pb-20 md:p-12 p-3 min-h-full">
|
||||
<div className="mb-10 pb-20 md:py-12 py-3 min-h-full">
|
||||
{Object.keys(archivePosts).map(archiveTitle => (
|
||||
<div key={archiveTitle}>
|
||||
<div
|
||||
|
||||
@@ -33,7 +33,7 @@ const LayoutBase = props => {
|
||||
<div id='container-inner' className='w-full'>
|
||||
{/* 移动端顶部菜单 */}
|
||||
<TopNavBar {...props}/>
|
||||
<div className='px-5 max-w-5xl justify-center mx-auto min-h-screen'>
|
||||
<div className='px-7 max-w-5xl justify-center mx-auto min-h-screen'>
|
||||
{slotTop}
|
||||
{children}
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@ export const LayoutCategoryIndex = (props) => {
|
||||
const { categories } = props
|
||||
const { locale } = useGlobal()
|
||||
return <LayoutBase {...props}>
|
||||
<div className='bg-white dark:bg-gray-700 p-10'>
|
||||
<div className='bg-white dark:bg-gray-700 py-10'>
|
||||
<div className='dark:text-gray-200 mb-5'>
|
||||
<i className='mr-4 fas fa-th' />{locale.COMMON.CATEGORY}:
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ export const LayoutTagIndex = props => {
|
||||
const { locale } = useGlobal()
|
||||
return (
|
||||
<LayoutBase {...props}>
|
||||
<div className="bg-white dark:bg-gray-700 p-10">
|
||||
<div className="bg-white dark:bg-gray-700 py-10">
|
||||
<div className="dark:text-gray-200 mb-5">
|
||||
<i className="mr-4 fas fa-tag" />
|
||||
{locale.COMMON.TAGS}:
|
||||
|
||||
@@ -15,7 +15,7 @@ const BlogPostCard = ({ post, showSummary }) => {
|
||||
key={post.id}
|
||||
className="animate__animated animate__fadeIn duration-300 mb-6 max-w-7xl border-b dark:border-gray-800 "
|
||||
>
|
||||
<div className="lg:p-8 p-4 flex flex-col w-full">
|
||||
<div className="lg:py-8 py-4 flex flex-col w-full">
|
||||
<Link href={`${BLOG.SUB_PATH}/${post.slug}`} passHref>
|
||||
<a
|
||||
className={
|
||||
|
||||
@@ -35,12 +35,12 @@ export default function TopNavBar(props) {
|
||||
return <div id='top-nav' className={'sticky top-0 lg:relative w-full z-40 ' + className}>
|
||||
{/* 折叠菜单 */}
|
||||
<Collapse type='vertical' isOpen={isOpen} className='md:hidden'>
|
||||
<div className='bg-white dark:bg-hexo-black-gray pt-1 py-2 px-5 lg:hidden '>
|
||||
<div className='bg-white dark:bg-hexo-black-gray pt-1 py-2 px-7 lg:hidden '>
|
||||
<GroupMenu {...props} />
|
||||
</div>
|
||||
</Collapse>
|
||||
|
||||
<div className='flex w-full h-12 shadow bg-white dark:bg-hexo-black-gray px-5 items-between'>
|
||||
<div className='flex w-full h-12 shadow bg-white dark:bg-hexo-black-gray px-7 items-between'>
|
||||
|
||||
{/* 图标Logo */}
|
||||
<LogoBar {...props} />
|
||||
|
||||
@@ -9,7 +9,6 @@ const CONFIG_MEDIUM = {
|
||||
POST_DETAIL_TAG: true, // 文章显示标签
|
||||
|
||||
// 菜单
|
||||
MENU_ABOUT: true, // 显示关于
|
||||
MENU_CATEGORY: true, // 显示分类
|
||||
MENU_TAG: true, // 显示标签
|
||||
MENU_ARCHIVE: true, // 显示归档
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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, // 是否显示回顶
|
||||
|
||||
Reference in New Issue
Block a user