Skip to content

Commit

Permalink
Hide TOC on mobile, make home a regular link
Browse files Browse the repository at this point in the history
  • Loading branch information
mthierman committed Aug 28, 2023
1 parent 4c34638 commit 4238c5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/components/nav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const { manual } = Astro.props;
}

<li>
<a id="nav_home">Home</a>
<a id="nav_home" href="/">Home</a>
</li>

<li>
Expand Down Expand Up @@ -119,12 +119,6 @@ const { manual } = Astro.props;
);
});

document
.getElementById("nav_home")
?.addEventListener("mousedown", () => {
window.location.href = "/";
});

document
.getElementById("nav_documentation")
?.addEventListener("mousedown", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/toc.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {} = Astro.props;

<style>
menu {
@apply sticky w-full flex-col gap-2 overflow-y-auto whitespace-pre-wrap rounded bg-neutral-50 p-2 text-neutral-900 shadow-lg shadow-black dark:bg-neutral-900 dark:text-neutral-200 md:left-auto md:w-fit md:max-w-[36ch];
@apply hidden md:flex sticky w-full flex-col gap-2 overflow-y-auto whitespace-pre-wrap rounded bg-neutral-50 p-2 text-neutral-900 shadow-lg shadow-black dark:bg-neutral-900 dark:text-neutral-200 md:left-auto md:w-fit md:max-w-[36ch];
}
</style>

Expand Down

0 comments on commit 4238c5b

Please sign in to comment.