From 9497e9fb0ac69e453448b69ec93cfb70f832cb70 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 3 Feb 2023 14:24:16 +0800 Subject: [PATCH] nobelium tag/category --- themes/nobelium/LayoutBase.js | 2 +- themes/nobelium/LayoutCategoryIndex.js | 8 ++++---- themes/nobelium/LayoutTagIndex.js | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/themes/nobelium/LayoutBase.js b/themes/nobelium/LayoutBase.js index 7e6ec817..598a9b9b 100644 --- a/themes/nobelium/LayoutBase.js +++ b/themes/nobelium/LayoutBase.js @@ -16,7 +16,7 @@ const LayoutBase = props => { const fullWidth = post?.fullWidth ?? false return ( -
+
{/* 顶部导航栏 */} diff --git a/themes/nobelium/LayoutCategoryIndex.js b/themes/nobelium/LayoutCategoryIndex.js index 6d1884ab..3cf9c10d 100644 --- a/themes/nobelium/LayoutCategoryIndex.js +++ b/themes/nobelium/LayoutCategoryIndex.js @@ -2,12 +2,12 @@ import Link from 'next/link' import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { - const { categories } = props + const { categoryOptions } = props return (
- {categories && categories.map(category => { + {categoryOptions?.map(category => { return ( { {category.name}({category.count})
- ); + ) })}
- ); + ) } diff --git a/themes/nobelium/LayoutTagIndex.js b/themes/nobelium/LayoutTagIndex.js index 6d2873a8..0705c2d6 100644 --- a/themes/nobelium/LayoutTagIndex.js +++ b/themes/nobelium/LayoutTagIndex.js @@ -2,12 +2,12 @@ import Link from 'next/link' import LayoutBase from './LayoutBase' export const LayoutTagIndex = (props) => { - const { tags } = props + const { tagOptions } = props return (
- {tags.map(tag => { + {tagOptions.map(tag => { return (
{
- ); + ) })}
- ); + ) }