From 1da1415f099eb0d94adcfd9bd83a9ab80dc2d683 Mon Sep 17 00:00:00 2001 From: Xylight Date: Mon, 6 Oct 2025 19:21:33 -0700 Subject: [PATCH] design: tweak mobile navbar --- src/lib/app/i18n/en.json | 2 +- src/lib/ui/layout/CommonItem.svelte | 4 +--- src/lib/ui/layout/pages/Tabs.svelte | 16 +++++++++++++++- src/lib/ui/navbar/NavButton.svelte | 8 +++++--- src/lib/ui/navbar/Navbar.svelte | 13 ++++++++++--- .../post/[instance]/[id=integer]/+page.svelte | 13 +++++-------- 6 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/lib/app/i18n/en.json b/src/lib/app/i18n/en.json index c97a8405..69677e03 100644 --- a/src/lib/app/i18n/en.json +++ b/src/lib/app/i18n/en.json @@ -303,7 +303,7 @@ "localView": "Local View", "thread": { "single": "You're viewing a single thread.", - "allComments": "All Comments", + "allComments": "All comments", "part": "You're viewing part of a thread.", "context": "Show Context" }, diff --git a/src/lib/ui/layout/CommonItem.svelte b/src/lib/ui/layout/CommonItem.svelte index 03b82651..cca7c572 100644 --- a/src/lib/ui/layout/CommonItem.svelte +++ b/src/lib/ui/layout/CommonItem.svelte @@ -31,9 +31,7 @@ > -

+

{title}

diff --git a/src/lib/ui/layout/pages/Tabs.svelte b/src/lib/ui/layout/pages/Tabs.svelte index 96368cb3..a2814ac3 100644 --- a/src/lib/ui/layout/pages/Tabs.svelte +++ b/src/lib/ui/layout/pages/Tabs.svelte @@ -76,7 +76,7 @@ class={[ 'rounded-full font-medium transition-colors duration-100 relative z-0 shrink-0 hover:text-slate-900 hover:dark:text-zinc-100', selected - ? 'text-primary-900 dark:text-primary-100' + ? 'tab-selected text-primary-900 dark:text-primary-100' : 'text-slate-500 dark:text-zinc-500', ]} > @@ -90,3 +90,17 @@ {/each} {@render children?.()} + + diff --git a/src/lib/ui/navbar/NavButton.svelte b/src/lib/ui/navbar/NavButton.svelte index 2b37522e..6caa9f00 100644 --- a/src/lib/ui/navbar/NavButton.svelte +++ b/src/lib/ui/navbar/NavButton.svelte @@ -71,7 +71,7 @@ :global { .prefix { @variant max-md { - height: 100%; + height: 90%; display: grid; place-items: center; aspect-ratio: 1 / 1; @@ -121,10 +121,12 @@ } } - @variant max-md { - .nav-btn-sm-primary .prefix { + .nav-btn-sm-primary .prefix { + @variant max-md { background-color: var(--color-primary-900); color: var(--color-slate-50); + border-radius: var(--radius-xl); + height: 80%; @variant hover { color: var(--color-slate-50); diff --git a/src/lib/ui/navbar/Navbar.svelte b/src/lib/ui/navbar/Navbar.svelte index 1bcd22c3..91799a4c 100644 --- a/src/lib/ui/navbar/Navbar.svelte +++ b/src/lib/ui/navbar/Navbar.svelte @@ -48,10 +48,10 @@ icon={Home} href="/" label={$t('nav.home')} - class="logo border-0 md:rounded-full! md:w-10! md:h-10 md:px-0! text-primary-900! dark:text-primary-100! -order-1" + class="logo border-0 md:rounded-full! md:w-10! md:h-10 md:px-0! -order-1" adaptive={false} > - {#snippet customIcon()} + {#snippet customIcon({ isSelected })} {#if LINKED_INSTANCE_URL} {#if site.data} {/if} {:else} - +

+
+
+ +
+
{/if} {/snippet} diff --git a/src/routes/post/[instance]/[id=integer]/+page.svelte b/src/routes/post/[instance]/[id=integer]/+page.svelte index f79cfb1c..d0759c31 100644 --- a/src/routes/post/[instance]/[id=integer]/+page.svelte +++ b/src/routes/post/[instance]/[id=integer]/+page.svelte @@ -16,6 +16,7 @@ PostMeta, type Tag, } from '$lib/feature/post' + import Fixate from '$lib/ui/generic/Fixate.svelte' import Placeholder from '$lib/ui/info/Placeholder.svelte' import { CommonList } from '$lib/ui/layout' import EndPlaceholder from '$lib/ui/layout/EndPlaceholder.svelte' @@ -214,13 +215,9 @@ {#await data.data.value.comments then comments} {#if data.data.value.params.thread.showContext || data.data.value.params.thread.singleThread} -
+ -
+ {/if} {/await}