previewLine设置

This commit is contained in:
tangly1024
2022-01-25 17:44:49 +08:00
parent 13f53b2bad
commit ddd38a6745
10 changed files with 30 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
const FUKA_CONFIG = {
POST_LIST_COVER: true, // 文章列表显示图片封面
POST_LIST_PREVIEW: false, // 显示文章预览
// 菜单
MENU_ABOUT: true, // 显示关于
@@ -8,5 +9,6 @@ const FUKA_CONFIG = {
MENU_TAG: true, // 显示标签
MENU_ARCHIVE: true, // 显示归档
MENU_SEARCH: true // 显示搜索
}
export default FUKA_CONFIG

View File

@@ -33,7 +33,7 @@ const BlogPostCard = ({ post, showSummary }) => {
{post.summary}
</p>}
{showPreview && post?.blockMap && <div className='overflow-ellipsis truncate'>
{showPreview && <div className='overflow-ellipsis truncate'>
<NotionRenderer
bodyClassName='max-h-full'
recordMap={post.blockMap}
@@ -61,7 +61,7 @@ const BlogPostCard = ({ post, showSummary }) => {
</div>
{CONFIG_HEXO.POST_LIST_COVER && post?.page_cover && (
{CONFIG_HEXO.POST_LIST_COVER && !showPreview && post?.page_cover && (
<Link href={`${BLOG.PATH}/article/${post.slug}`} passHref>
<a className='w-full relative duration-200 rounded-t-xl lg:rounded-r-xl lg:rounded-t-none cursor-pointer transform overflow-hidden'>
{/* eslint-disable-next-line @next/next/no-img-element */}

View File

@@ -12,7 +12,7 @@ const CONFIG_HEXO = {
POST_LIST_COVER: true, // 文章封面
POST_LIST_SUMMARY: true, // 文章摘要
POST_LIST_PREVIEW: false,
POST_LIST_PREVIEW: false, // 读取文章预览
NAV_TYPE: 'autoCollapse', // ['fixed','autoCollapse','normal'] 分别是固定屏幕顶部、屏幕顶部自动折叠,不固定
WIDGET_TO_TOP: true,

View File

@@ -1,3 +1,4 @@
import CONFIG_HEXO from './config_hexo'
export { LayoutIndex } from './LayoutIndex'
export { LayoutSearch } from './LayoutSearch'
export { LayoutArchive } from './LayoutArchive'
@@ -8,3 +9,4 @@ export { LayoutCategoryIndex } from './LayoutCategoryIndex'
export { LayoutPage } from './LayoutPage'
export { LayoutTag } from './LayoutTag'
export { LayoutTagIndex } from './LayoutTagIndex'
export { CONFIG_HEXO as THEME_CONFIG }

View File

@@ -1,3 +1,4 @@
import CONFIG_NEXT from './config_next'
export { LayoutIndex } from './LayoutIndex'
export { LayoutSearch } from './LayoutSearch'
export { LayoutArchive } from './LayoutArchive'
@@ -8,3 +9,4 @@ export { LayoutCategoryIndex } from './LayoutCategoryIndex'
export { LayoutPage } from './LayoutPage'
export { LayoutTag } from './LayoutTag'
export { LayoutTagIndex } from './LayoutTagIndex'
export { CONFIG_NEXT as THEME_CONFIG }