feat(web): responsive top navigation (#12373)

- icons fit in mobile
- guarantee the search bar space in all screen sizes
- fix the storage bar being too wide
This commit is contained in:
Ben 2024-09-09 10:29:23 -04:00 committed by GitHub
parent 17773f0a77
commit 0a552d2bfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 60 additions and 69 deletions

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { moonPath, moonViewBox, sunPath, sunViewBox } from '$lib/assets/svg-paths';
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
import CircleIconButton, { type Padding } from '$lib/components/elements/buttons/circle-icon-button.svelte';
import { Theme } from '$lib/constants';
import { colorTheme, handleToggleTheme } from '$lib/stores/preferences.store';
import { t } from 'svelte-i18n';
@ -8,6 +8,8 @@
$: icon = $colorTheme.value === Theme.LIGHT ? moonPath : sunPath;
$: viewBox = $colorTheme.value === Theme.LIGHT ? moonViewBox : sunViewBox;
$: isDark = $colorTheme.value === Theme.DARK;
export let padding: Padding = '3';
</script>
{#if !$colorTheme.system}
@ -18,5 +20,6 @@
role="switch"
aria-checked={isDark ? 'true' : 'false'}
on:click={handleToggleTheme}
{padding}
/>
{/if}