Skip to content

Commit 9bba5ff

Browse files
authored
Merge pull request #104 from foxeddev/main
2 parents 23da1bf + 35f051c commit 9bba5ff

5 files changed

Lines changed: 1005 additions & 11 deletions

File tree

src/lib/Topbar.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,21 @@
7979
<div class="flex items-center gap-2">
8080
<a
8181
href="https://github.com/Datapack-Hub/wiki/blob/main/src/routes{page.url.pathname}/%2Bpage.svx"
82-
class="bg-black/45 p-2 rounded-lg py-1 flex items-center gap-2 hover:text-stone-100 aspect-square sm:aspect-auto focus-visible:outline-2 focus-visible:outline-dph-orange"
82+
class="p-2 rounded-lg py-1 flex items-center gap-2 hover:bg-stone-700 hover:text-white hover:font-medium aspect-square sm:aspect-auto focus-visible:outline-2 focus-visible:outline-dph-orange"
8383
aria-label="Edit">
8484
<IconEdit />
8585
<span class="hidden sm:block">Edit</span>
8686
</a>
8787
<button
88-
class="bg-black/45 p-2 rounded-lg py-1 flex items-center gap-2 hover:text-stone-100 aspect-square sm:aspect-auto focus-visible:outline-2 focus-visible:outline-dph-orange cursor-pointer"
88+
class="p-2 rounded-lg py-1 flex items-center gap-2 hover:bg-stone-700 hover:text-white hover:font-medium aspect-square sm:aspect-auto focus-visible:outline-2 focus-visible:outline-dph-orange cursor-pointer"
8989
aria-label="Copy URL"
9090
onclick={copyUrl}>
9191
<IconShare />
9292
<span class="hidden sm:block">{shareText}</span>
9393
</button>
9494
<a
9595
href="https://discord.gg/xHTHbZqXr6"
96-
class="bg-black/45 p-2 rounded-lg py-1 flex items-center gap-2 hover:text-stone-100 aspect-square sm:aspect-auto focus-visible:outline-2 focus-visible:outline-dph-orange"
96+
class="p-2 rounded-lg py-1 flex items-center gap-2 hover:bg-stone-700 hover:text-white hover:font-medium aspect-square sm:aspect-auto focus-visible:outline-2 focus-visible:outline-dph-orange"
9797
aria-label="Discord">
9898
<IconDiscord />
9999
<span class="hidden sm:block">Discord</span>

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");

src/lib/sidebar/SidebarSearchDialog.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
});
3838
</script>
3939

40-
<svelte:window onkeydown={e => (e.key == "k" && e.ctrlKey ? showModalWithEvent(e) : null)} />
40+
<svelte:window
41+
onkeydown={e => (e.key == "k" && e.ctrlKey ? showModalWithEvent(e) : null)}
42+
onclick={e => {
43+
e.target === dialog ? dialog.close() : null;
44+
}} />
4145

4246
<dialog
4347
bind:this={dialog}
@@ -82,6 +86,7 @@
8286
: results.length + " result(s) found!"}
8387
</p>
8488

85-
<button class="bg-stone-700 w-full rounded-sm p-2 mt-2 text-white cursor-pointer" onclick={() => dialog.close()}>Close</button>
89+
<button class="bg-stone-700 w-full rounded-sm p-2 mt-2 text-white cursor-pointer" onclick={() => dialog.close()}
90+
>Close</button>
8691
</div>
8792
</dialog>

src/lib/sidebar/tabs/Guides.svelte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
import IconBuilding from "~icons/tabler/building-factory-2";
3838
import IconCottage from "~icons/tabler/building-cottage";
3939
import IconTrees from "~icons/tabler/trees";
40+
import IconBackhoe from "~icons/tabler/backhoe";
41+
import IconMountain from "~icons/tabler/mountain";
42+
import IconBuildingCastle from "~icons/tabler/building-castle";
4043
import SidebarPlaceholder from "../navigation/SidebarPlaceholder.svelte";
4144
</script>
4245

@@ -85,6 +88,11 @@
8588
<SidebarPlaceholder label="Twilight Forest" icon={IconTrees} />
8689
</SidebarCategory>
8790

91+
<SidebarCategory name="World Generation" icon={IconBackhoe}>
92+
<SidebarPage label="Custom World Generation" icon={IconMountain} page="/guide/worldgen/custom-worldgen"></SidebarPage>
93+
<SidebarPlaceholder label="Custom Structures" icon={IconBuildingCastle}></SidebarPlaceholder>
94+
</SidebarCategory>
95+
8896
<SidebarCategory name="Misc" icon={IconBrackets}>
8997
<SidebarPage label="Debugging" icon={IconBug} page="/guide/misc/debugging" />
9098
<SidebarPage label="Raycasts" icon={IconArrow} page="/guide/misc/raycasts" />

0 commit comments

Comments
 (0)