matery主题 调整 tag/category

This commit is contained in:
tangly1024.com
2023-02-03 14:00:59 +08:00
parent d5eb6f8940
commit 80f4656021
4 changed files with 8 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ import Link from 'next/link'
import HeaderArticle from './components/HeaderArticle'
export const LayoutCategory = props => {
const { category, categories } = props
const { category, categoryOptions } = props
return (
<LayoutBase {...props} headerSlot={<HeaderArticle {...props} />} >
@@ -15,7 +15,7 @@ export const LayoutCategory = props => {
<div className="drop-shadow-xl -mt-32 rounded-md mx-3 px-5 lg:border lg:rounded-xl lg:px-2 lg:py-4 bg-white dark:bg-hexo-black-gray dark:border-black">
<div className='flex justify-center flex-wrap'>
{categories.map(e => {
{categoryOptions.map(e => {
const selected = e.name === category
return (
<Link key={e.name} href={`/category/${e.name}`} passHref legacyBehavior>

View File

@@ -3,7 +3,7 @@ import HeaderArticle from './components/HeaderArticle'
import LayoutBase from './LayoutBase'
export const LayoutCategoryIndex = props => {
const { categories } = props
const { categoryOptions } = props
return (
<LayoutBase {...props} headerSlot={<HeaderArticle {...props} />} >
@@ -13,7 +13,7 @@ export const LayoutCategoryIndex = props => {
<div className="drop-shadow-xl -mt-32 rounded-md mx-3 px-5 lg:border lg:rounded-xl lg:px-2 lg:py-4 bg-white dark:bg-hexo-black-gray dark:border-black">
<div className='flex justify-center flex-wrap'>
{categories.map(e => {
{categoryOptions.map(e => {
return (
<Link key={e.name} href={`/category/${e.name}`} passHref legacyBehavior>
<div className='duration-300 text-md whitespace-nowrap dark:hover:text-white px-5 cursor-pointer py-2 hover:text-indigo-400' >

View File

@@ -8,7 +8,7 @@ import { useGlobal } from '@/lib/global'
import TagItemMiddle from './components/TagItemMiddle'
export const LayoutTag = (props) => {
const { tags, tag } = props
const { tagOptions, tag } = props
const { locale } = useGlobal()
@@ -23,7 +23,7 @@ export const LayoutTag = (props) => {
</div>
<div id="tags-list" className="duration-200 flex flex-wrap justify-center pb-12">
{tags.map(e => {
{tagOptions.map(e => {
const selected = tag === e.name
return (
<div key={e.id} className="p-2">

View File

@@ -4,7 +4,7 @@ import TagItemMiddle from './components/TagItemMiddle'
import LayoutBase from './LayoutBase'
export const LayoutTagIndex = props => {
const { tags } = props
const { tagOptions } = props
const { locale } = useGlobal()
return (
<LayoutBase {...props} headerSlot={<HeaderArticle {...props} />} >
@@ -17,7 +17,7 @@ export const LayoutTagIndex = props => {
</div>
<div id="tags-list" className="duration-200 flex flex-wrap justify-center pb-12">
{tags.map(tag => {
{tagOptions.map(tag => {
return (
<div key={tag.name} className="p-2">
<TagItemMiddle key={tag.name} tag={tag} />