-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
121 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (c) 2024 Contributors to the Suwayomi project | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
export const AppNavData = [ | ||
{ | ||
href: '/', | ||
title: 'Library', | ||
icon: 'mdi:bookmark-box-multiple', | ||
match: (page: string) => { | ||
return page === '/'; | ||
} | ||
}, | ||
{ | ||
href: '/updates', | ||
title: 'Updates', | ||
icon: 'mdi:alert-decagram-outline', | ||
match: (page: string) => { | ||
return page.includes('/updates'); | ||
} | ||
}, | ||
{ | ||
href: '/browse/sources', | ||
title: 'Browse', | ||
icon: 'mdi:compass-outline', | ||
match: (page: string) => { | ||
return page.includes('/browse'); | ||
} | ||
}, | ||
{ | ||
href: '/downloads', | ||
title: 'Downloads', | ||
icon: 'mdi:download', | ||
match: (page: string) => { | ||
return page.includes('/downloads'); | ||
} | ||
}, | ||
{ | ||
href: '/settings', | ||
title: 'Settings', | ||
icon: 'mdi:cog', | ||
match: (page: string) => { | ||
return page.includes('/settings'); | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- | ||
Copyright (c) 2023 Contributors to the Suwayomi project | ||
This Source Code Form is subject to the terms of the Mozilla Public | ||
License, v. 2.0. If a copy of the MPL was not distributed with this | ||
file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
--> | ||
|
||
<script> | ||
import { page } from '$app/stores'; | ||
import { TabGroup, TabAnchor } from '@skeletonlabs/skeleton'; | ||
import IconWrapper from './IconWrapper.svelte'; | ||
import { AppNavData } from '../AppNavData'; | ||
</script> | ||
|
||
<TabGroup | ||
justify="justify-center" | ||
active="variant-filled-primary" | ||
hover="hover:variant-soft-primary" | ||
flex="flex-1 lg:flex-none" | ||
rounded="" | ||
border="" | ||
class="bg-surface-100-800-token w-full" | ||
regionList=" h-16" | ||
> | ||
{#each AppNavData as Loc} | ||
<TabAnchor | ||
href={Loc.href} | ||
selected={Loc.match($page.url.pathname)} | ||
class="h-full [&>.tab-interface]:h-full [&>div>.tab-label]:h-full" | ||
> | ||
<div class="w-full h-full flex flex-col items-center"> | ||
<IconWrapper name={Loc.icon} class="max-h-full w-full grow aspect-square" /> | ||
<span class="text-sm">{Loc.title}</span> | ||
</div> | ||
</TabAnchor> | ||
{/each} | ||
</TabGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters