Skip to content

Commit 315ecd9

Browse files
committed
Make sidebar page buttons similar to other buttons
1 parent 9fe6da3 commit 315ecd9

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/lib/sidebar/Sidebar.svelte

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@
2424
page = sessionStorage.getItem("page") || "wiki";
2525
});
2626
27-
export async function handleKeyInput(e: KeyboardEvent & {
28-
currentTarget: EventTarget & Window;
29-
}) {
27+
export async function handleKeyInput(
28+
e: KeyboardEvent & {
29+
currentTarget: EventTarget & Window;
30+
}
31+
) {
3032
const doc = e.currentTarget.document;
31-
const notAnInput = !(doc.activeElement instanceof HTMLInputElement) && !(doc.activeElement instanceof HTMLTextAreaElement);
33+
const notAnInput =
34+
!(doc.activeElement instanceof HTMLInputElement) && !(doc.activeElement instanceof HTMLTextAreaElement);
3235
if (e.key == "ArrowLeft" && windowInfo.isNavOpen && notAnInput) {
3336
windowInfo.isNavOpen = false;
3437
}
@@ -52,7 +55,7 @@
5255
<button
5356
class="{page == 'wiki'
5457
? 'bg-stone-700'
55-
: 'bg-stone-800'} hover:text-stone-400 px-2 py-1 rounded-md flex items-center gap-1 focus-visible:outline-2 focus-visible:outline-dph-orange"
58+
: 'bg-stone-800'} cursor-pointer hover:text-white hover:font-medium px-2 py-1 rounded-md flex items-center gap-1 focus-visible:outline-2 focus-visible:outline-dph-orange"
5659
onclick={() => {
5760
page = "wiki";
5861
sessionStorage.setItem("page", "wiki");
@@ -62,7 +65,7 @@
6265
<button
6366
class="{page == 'guides'
6467
? 'bg-stone-700'
65-
: 'bg-stone-800'} hover:text-stone-400 px-2 py-1 rounded-md flex items-center gap-1 focus-visible:outline-2 focus-visible:outline-dph-orange"
68+
: 'bg-stone-800'} cursor-pointer hover:text-white hover:font-medium px-2 py-1 rounded-md flex items-center gap-1 focus-visible:outline-2 focus-visible:outline-dph-orange"
6669
onclick={() => {
6770
page = "guides";
6871
sessionStorage.setItem("page", "guides");

0 commit comments

Comments
 (0)