fixed isActive in sidebar

This commit is contained in:
2024-02-11 02:37:59 +01:00
parent af2aab301c
commit 058533eb82
2 changed files with 3 additions and 2 deletions

View File

@@ -32,9 +32,9 @@ const docs = unsortedDocs.sort((a) =>
{
docs.map((page) => {
const isActive =
Astro.url.pathname == page.url ||
(Astro.url.pathname.startsWith(page.url) &&
page.url !== "/docs/" + page.frontmatter.repo) ||
Astro.url.pathname === page.url;
page.url !== "/docs/" + page.frontmatter.repo + "/");
return (
<a href={page.url} class={isActive ? "active" : ""}>
<Icon name="mdi:file-outline" />

View File

@@ -1,4 +1,5 @@
.donation-callout {
position: sticky;
text-align: right;
.donation-text {
display: flex;