design: make Tabs more responsive
This commit is contained in:
2 files changed
+9
-5
No files matched your search
@@ -28,7 +28,9 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<nav class="flex flex-row items-center gap-8 p-1 justify-start">
|
<nav
|
||||||
|
class="flex flex-row items-center gap-x-8 gap-y-4 p-1 justify-center sm:justify-start my-2 sm:mt-0 flex-wrap"
|
||||||
|
>
|
||||||
{#each routes as route (route.href)}
|
{#each routes as route (route.href)}
|
||||||
{@const selected = isSelected(
|
{@const selected = isSelected(
|
||||||
page.url,
|
page.url,
|
||||||
@@ -38,8 +40,10 @@
|
|||||||
onclick={() => invalidateAll()}
|
onclick={() => invalidateAll()}
|
||||||
href={buildUrl(currentRoute, route.href)}
|
href={buildUrl(currentRoute, route.href)}
|
||||||
class={[
|
class={[
|
||||||
'rounded-full transition-colors duration-100 relative z-0 shrink-0',
|
'rounded-full font-medium transition-colors duration-100 relative z-0 shrink-0 hover:text-slate-900 hover:dark:text-zinc-100',
|
||||||
selected ? 'font-medium' : 'text-slate-600 dark:text-zinc-400',
|
selected
|
||||||
|
? 'text-primary-900 dark:text-primary-100'
|
||||||
|
: 'text-slate-500 dark:text-zinc-500',
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{route.name}
|
{route.name}
|
||||||
|
|||||||
@@ -14,13 +14,13 @@
|
|||||||
let searchElement = $state<HTMLInputElement>()
|
let searchElement = $state<HTMLInputElement>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="mt-4 mb-0 sticky z-30 top-6 lg:top-22 drop-shadow-xl">
|
<div class="mt-4 mb-0 sticky z-30 top-6 lg:top-22 drop-shadow-md">
|
||||||
<div class="flex gap-2 flex-row items-center w-full text-base h-10">
|
<div class="flex gap-2 flex-row items-center w-full text-base h-10">
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={query}
|
bind:value={query}
|
||||||
bind:element={searchElement}
|
bind:element={searchElement}
|
||||||
name="q"
|
name="q"
|
||||||
aria-label={$t('routes.search.query')}
|
placeholder={$t('routes.search.query')}
|
||||||
size="lg"
|
size="lg"
|
||||||
class="flex-1 rounded-full! h-full text-base!"
|
class="flex-1 rounded-full! h-full text-base!"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in new issue
Block a user