Skip to content

Commit

Permalink
fix: make the last part of breadcrumb lowercase in specific tag page
Browse files Browse the repository at this point in the history
  • Loading branch information
satnaing committed Jan 29, 2023
1 parent c192cd8 commit c556202
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/Breadcrumbs.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ breadcrumbList[0] === "posts" &&
breadcrumbList.map((breadcrumb, index) =>
index + 1 === breadcrumbList.length ? (
<li>
<span class={`${index > 0 ? "lowercase" : ""}`} aria-current="page">
<span
class={`${index > 0 ? "lowercase" : "capitalize"}`}
aria-current="page"
>
{/* make the last part lowercase in Home > Tags > some-tag */}
{breadcrumb}
</span>
</li>
Expand All @@ -44,10 +48,12 @@ breadcrumbList[0] === "posts" &&
.breadcrumb ul li {
@apply inline;
}
.breadcrumb ul li a,
.breadcrumb ul li span {
.breadcrumb ul li a {
@apply opacity-70 capitalize;
}
.breadcrumb ul li span {
@apply opacity-70;
}
.breadcrumb ul li:not(:last-child) a {
@apply hover:opacity-100;
}
Expand Down

0 comments on commit c556202

Please sign in to comment.