Skip to content

Commit

Permalink
fix: add href path
Browse files Browse the repository at this point in the history
  • Loading branch information
ihoey committed Mar 6, 2024
1 parent 1a8ba3a commit bb80616
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
const navs = [
{
path: "home",
path: "/",
name: "首页",
},
{
path: "team",
path: "/team",
name: "团队介绍",
},
{
path: "about",
path: "/about",
name: "关于",
},
];
---

<div class='ds-header container'>
<a href='/home' class='ds-logo'>
<a href='/' class='ds-logo'>
<img src='/logo.png' alt='吃货指南' class='ds-logo-img' />
</a>
<ul class='ds-navs'>
Expand Down
10 changes: 6 additions & 4 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ const poem = "所爱隔山海,山海不可平。若为美食往,千里皆可
{
classify.map((item) => {
return (
<div class='classify_logo'>
<img src={item.img} />
<p>{item.title}</p>
</div>
<a href={item.path}>
<div class='classify_logo'>
<img src={item.img} />
<p>{item.title}</p>
</div>
</a>
);
})
}
Expand Down

0 comments on commit bb80616

Please sign in to comment.