Skip to content

Commit

Permalink
Merge branch 'tangly1024:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
expoli authored Dec 10, 2022
2 parents 117526a + e46756a commit a88d254
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 10 deletions.
4 changes: 3 additions & 1 deletion lib/notion/getNotionData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand All @@ -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 })
Expand Down
4 changes: 4 additions & 0 deletions styles/notion.css
Original file line number Diff line number Diff line change
Expand Up @@ -1993,3 +1993,7 @@ thead, tbody tr {
width:100%;
table-layout:fixed;
}

.notion-collection-card{
@apply dark:hover:text-gray-200
}
2 changes: 1 addition & 1 deletion themes/medium/LayoutArchive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion themes/medium/LayoutBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion themes/medium/LayoutCategoryIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion themes/medium/LayoutTagIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}:
Expand Down
2 changes: 1 addition & 1 deletion themes/medium/components/BlogPostCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
4 changes: 2 additions & 2 deletions themes/medium/components/TopNavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
Expand Down
4 changes: 2 additions & 2 deletions themes/next/components/ArticleDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function ArticleDetail(props) {
<section className="flex justify-between">
{/* 分类 */}
{post.category && <>
<div className="cursor-pointer my-auto text-md mr-2 hover:text-black dark:hover:text-white border-b dark:border-gray-500 border-dashed">
<div className="cursor-pointer my-auto text-md mr-2 hover:text-black dark:hover:text-white border-b dark:text-gray-500 border-dashed">
<Link href={`/category/${post.category}`} passHref>
<><i className="mr-1 far fa-folder-open" /> {post.category}</>
</Link>
Expand Down Expand Up @@ -123,7 +123,7 @@ export default function ArticleDetail(props) {
</>}

{/* 评论互动 */}
<div className="duration-200 w-full dark:border-gray-700 bg-white dark:bg-gray-800">
<div className="duration-200 w-full dark:border-gray-700 bg-white dark:bg-hexo-black-gray">
<Comment frontMatter={post} />
</div>
</div>
Expand Down

1 comment on commit a88d254

@vercel
Copy link

@vercel vercel bot commented on a88d254 Dec 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.