Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
andyluss committed Jul 11, 2024
1 parent acd5d11 commit 4dcbeef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/layouts/IndexLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ const { posts, tags, levels } = await getAll(collection, tag, level);
<body>
<Header />
<main>
<section class="levels">
<section>
<ul class="list-none p-0 m-0 flex flex-wrap">
{
levels.map(([lvl, count]) => (
<li
class={
"mr-1 mb-1 px-1 rounded text-sm " +
`${level === lvl ? "bg-blue-300" : "bg-gray-200"}`
`${level === lvl ? "bg-orange-300" : "bg-gray-200"}`
}
>
<a
href={`/${collection}/filter/${lvl}-${tag ?? "All"}`}
class="text-blue-500"
class="text-orange-500 hover:text-orange-900"
>
{lvl === "All" ? "全部" : "⭐️".repeat(lvl) || ""}({count})
</a>
Expand All @@ -50,7 +50,7 @@ const { posts, tags, levels } = await getAll(collection, tag, level);
}
</ul>
</section>
<section class="tags">
<section>
<ul class="list-none p-0 m-0 flex flex-wrap">
{
tags.map(([tg, count]) => (
Expand All @@ -62,7 +62,7 @@ const { posts, tags, levels } = await getAll(collection, tag, level);
>
<a
href={`/${collection}/filter/${level ?? "All"}-${tg}`}
class="text-blue-500"
class="text-blue-500 hover:text-blue-900"
>
{tg === "All" ? "全部" : tg}({count})
</a>
Expand Down

0 comments on commit 4dcbeef

Please sign in to comment.