aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-18 22:58:17 -0800
committerFuwn <[email protected]>2023-12-18 22:58:17 -0800
commit6cbae7e39b22cd85cb02516d41ea0db4d36dea9a (patch)
treecee4e54fb5b93a5fcbdea2795ed45ad496f0b5d4 /src
parentfeat(layout): smaller desktop navigation bar (diff)
downloaddue.moe-6cbae7e39b22cd85cb02516d41ea0db4d36dea9a.tar.xz
due.moe-6cbae7e39b22cd85cb02516d41ea0db4d36dea9a.zip
refactor(layout): simplify bars
Diffstat (limited to 'src')
-rw-r--r--src/routes/+layout.svelte63
1 files changed, 22 insertions, 41 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 2a0862e0..13290fce 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -27,63 +27,44 @@
</script>
<div id="container">
- {#if $settings.displayHoverNavigation}
- <div id="hover-header">
+ <div id="header">
+ <p id={$settings.displayHoverNavigation ? 'hover-header' : 'desktop-navigation-bar'}>
「 <a href="/">Home</a> • <a href="/completed">Completed</a> •
<a href="/schedule">Anime Schedule</a> •
<a href="/updates">Manga & WN Updates</a> •
<a href="/tools">Tools</a> • {#if data.user}
<a href={`/user/${currentUserIdentity.name}`}>Profile</a> •
- {/if} <a href="/settings">Settings</a> 」{#if data.user === undefined}
+ {/if} <a href="/settings">Settings</a> 」
+
+ {#if data.user === undefined}
<a
href={`https://anilist.co/api/v2/oauth/authorize?client_id=${env.PUBLIC_ANILIST_CLIENT_ID}&redirect_uri=${env.PUBLIC_ANILIST_REDIRECT_URI}&response_type=code`}
- >Log in</a
>
+ Log in with AniList
+ </a>
{:else}
<a href="/api/authentication/log-out">Log out ({currentUserIdentity.name})</a>
{/if}
+ </p>
+
+ <div id="mobile-navigation-bar">
+ <a href="/">Home</a> • <a href="/completed">Completed</a> •
+ <a href="/schedule">Anime Schedule</a> •
+ <a href="/updates">Manga & LN Updates</a> •
+ <a href="/tools">Tools</a> •
+ {#if data.user}
+ <a href={`/user/${currentUserIdentity.name}`}>Profile</a> •
+ {/if}
+ <br />
+ <a href="/settings">Settings</a>
<p />
</div>
- {:else}
- <div id="header">
- <p id="desktop-navigation-bar">
- 「 <a href="/">Home</a> • <a href="/completed">Completed</a> •
- <a href="/schedule">Anime Schedule</a> •
- <a href="/updates">Manga & WN Updates</a> •
- <a href="/tools">Tools</a> • {#if data.user}
- <a href={`/user/${currentUserIdentity.name}`}>Profile</a> •
- {/if} <a href="/settings">Settings</a> 」
-
- {#if data.user === undefined}
- <a
- href={`https://anilist.co/api/v2/oauth/authorize?client_id=${env.PUBLIC_ANILIST_CLIENT_ID}&redirect_uri=${env.PUBLIC_ANILIST_REDIRECT_URI}&response_type=code`}
- >
- Log in with AniList
- </a>
- {:else}
- <a href="/api/authentication/log-out">Log out from AniList ({currentUserIdentity.name})</a
- >
- {/if}
- </p>
-
- <div id="mobile-navigation-bar">
- <a href="/">Home</a> • <a href="/completed">Completed</a> •
- <a href="/schedule">Anime Schedule</a> •
- <a href="/updates">Manga & LN Updates</a> •
- <a href="/tools">Tools</a> •
- {#if data.user}
- <a href={`/user/${currentUserIdentity.name}`}>Profile</a> •
- {/if}
- <br />
- <a href="/settings">Settings</a>
-
- <p />
- </div>
+ {#if !$settings.displayHoverNavigation}
<hr />
- </div>
- {/if}
+ {/if}
+ </div>
<slot />
</div>