aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/lib/svelte/Navigation.svelte
blob: 973924a4dc7503fe31a1e3f760b3bd012161c137 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script lang="ts">
  import Icon from '@iconify/svelte';
  import { AppRail, AppRailAnchor, getDrawerStore } from '@skeletonlabs/skeleton';
  import { page } from '$app/stores';

  const drawerStore = getDrawerStore();

  function drawerClose(): void {
    drawerStore.close();
  }
</script>

<AppRail data-sveltekit-reload>
  <svelte:fragment slot="lead">
    <AppRailAnchor href="/" selected={$page.url.pathname === '/'} on:click={drawerClose}>
      <svelte:fragment slot="lead">
        <Icon icon="carbon:home" width="35" />
      </svelte:fragment>
      Home!
    </AppRailAnchor>
  </svelte:fragment>
  <AppRailAnchor
    href="/truncate"
    selected={$page.url.pathname === '/truncate'}
    data-sveltekit-reload
    on:click={drawerClose}
  >
    <svelte:fragment slot="lead">
      <Icon icon="carbon:page-break" width="35" />
    </svelte:fragment>
    Truncate!
  </AppRailAnchor>
  <svelte:fragment slot="trail">
    <AppRailAnchor
      href="https://github.com/rosstheross/rosstheross.github.io"
      rel="noreferrer"
      target="_blank"
    >
      <svelte:fragment slot="lead">
        <Icon icon="carbon:logo-github" width="35" />
      </svelte:fragment>
      Source
    </AppRailAnchor>
  </svelte:fragment>
</AppRail>