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:
tangly1024
2022-12-10 15:29:41 +08:00
12 changed files with 15 additions and 13 deletions

View File

@@ -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 })

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

@@ -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

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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}:

View File

@@ -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={

View File

@@ -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} />

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

@@ -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

@@ -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, // 是否显示回顶