Skip to content

Commit

Permalink
微調整
Browse files Browse the repository at this point in the history
  • Loading branch information
yamader committed May 3, 2024
1 parent 93f2dd4 commit d714cc6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ const links = [

<!-- prettier-ignore -->
<nav>{
links.map(({ href, name }) =>
// prettier-ignore
<a href={href} class:list={[Astro.url.pathname === href && "active"]}>{name}</a>,
)
links.map(({ href, name }) => {
const active = href == "/"
? Astro.url.pathname == href
: Astro.url.pathname.startsWith(href)
return <a href={href} class:list={[active && "active"]}>{name}</a>
})
}</nav>

{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about/anime.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { data } = await getEntry("data", "anime")

<Layout title="Anime" description="アニメ">
<h1>アニメ</h1>
<p>主にサブスク等で観たやつ。漏れあり。2024年5月時点。</p>
<p>主にサブスクで観たやつ。漏れあり。2024年5月時点。</p>
<ul>
{
data.map((e: any) => {
Expand Down
11 changes: 11 additions & 0 deletions src/pages/about/manga.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import Layout from "~/layouts/Layout.astro"
import { getEntry } from "astro:content"
// const { data } = await getEntry("data", "manga")
---

<Layout title="Manga" description="漫画">
<h1>漫画</h1>
<p>覚えてねーーーー</p>
</Layout>
2 changes: 1 addition & 1 deletion src/pages/about/movie.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { data } = await getEntry("data", "movie")

<Layout title="Movie" description="映画">
<h1>映画</h1>
<p>主にサブスク等で観たやつ。漏れあり。2024年5月時点。</p>
<p>主にサブスクで観たやつ。漏れあり。2024年5月時点。</p>
<ul>
{
data.map((e: any) => {
Expand Down

0 comments on commit d714cc6

Please sign in to comment.