fixed isActive in sidebar
This commit is contained in:
@@ -32,9 +32,9 @@ const docs = unsortedDocs.sort((a) =>
|
|||||||
{
|
{
|
||||||
docs.map((page) => {
|
docs.map((page) => {
|
||||||
const isActive =
|
const isActive =
|
||||||
|
Astro.url.pathname == page.url ||
|
||||||
(Astro.url.pathname.startsWith(page.url) &&
|
(Astro.url.pathname.startsWith(page.url) &&
|
||||||
page.url !== "/docs/" + page.frontmatter.repo) ||
|
page.url !== "/docs/" + page.frontmatter.repo + "/");
|
||||||
Astro.url.pathname === page.url;
|
|
||||||
return (
|
return (
|
||||||
<a href={page.url} class={isActive ? "active" : ""}>
|
<a href={page.url} class={isActive ? "active" : ""}>
|
||||||
<Icon name="mdi:file-outline" />
|
<Icon name="mdi:file-outline" />
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.donation-callout {
|
.donation-callout {
|
||||||
|
position: sticky;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
.donation-text {
|
.donation-text {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Reference in New Issue
Block a user