fix: invalid class name in menu

This commit is contained in:
Yufan Sheng 2024-10-20 17:52:32 +08:00
parent 31520ff6ca
commit a33b3fe29a
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ const Options = z
description: z.string().max(100), description: z.string().max(100),
keywords: z.array(z.string()), keywords: z.array(z.string()),
author: z.object({ name: z.string(), email: z.string().email(), url: z.string().url() }), author: z.object({ name: z.string(), email: z.string().email(), url: z.string().url() }),
navigation: z.array(z.object({ text: z.string(), link: z.string(), target: z.string().optional() })), navigation: z.array(z.object({ text: z.string().trim(), link: z.string(), target: z.string().optional() })),
socials: z.array( socials: z.array(
z.object({ z.object({
name: z.string(), name: z.string(),

View File

@ -18,7 +18,7 @@ import options from '@/options';
<ul> <ul>
{ {
options.navigation.map((menu, i) => ( options.navigation.map((menu, i) => (
<li id={`menu-item-${i}`} class={`menu-item ${i === 0 ? 'menu-item-home}' : ''}`}> <li id={`menu-item-${i}`} class={`menu-item${i === 0 ? ' menu-item-home' : ''}`}>
<a href={menu.link} target={menu.target}> <a href={menu.link} target={menu.target}>
{menu.text} {menu.text}
</a> </a>