diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/+layout.svelte | 63 |
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> |