fixed isActive in sidebar
This commit is contained in:
@@ -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" />
|
||||
|
@@ -1,4 +1,5 @@
|
||||
.donation-callout {
|
||||
position: sticky;
|
||||
text-align: right;
|
||||
.donation-text {
|
||||
display: flex;
|
||||
|
Reference in New Issue
Block a user