fix: invalid class name in menu

This commit is contained in:
Yufan Sheng 2024-10-20 17:52:32 +08:00
parent ff15cea6fe
commit 7179ae5779
Signed by: syhily
GPG Key ID: DEB186763C308C31
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>