feat(ui): mobile bottom nav on Nuxt Icon, footer hidden on phones
- AppBottomNav: fixed bar below md with Overview, Life Map and Dev View - default.vue mounts it and carries pb-16 md:pb-0 so the footer stays clear - AppFooter is hidden below md, where the bar takes over - icons come from @nuxt/icon (mode svg, scanned client bundle) with the Material Symbols collection installed locally, replacing the webfont - deletes the 3.9 MiB Material Symbols woff2 and its @font-face
This commit is contained in:
1 parent
db04d441c9
commit
3396c4949e
9 files changed
+149
-27
No files matched your search
@@ -27,13 +27,6 @@
|
||||
font-display: swap;
|
||||
src: url('/fonts/jetbrains-mono-var.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Material Symbols Outlined';
|
||||
font-style: normal;
|
||||
font-weight: 100 700;
|
||||
font-display: block;
|
||||
src: url('/fonts/material-symbols-outlined-var.woff2') format('woff2');
|
||||
}
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@@ -50,20 +43,3 @@
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.material-symbols-outlined {
|
||||
font-family: 'Material Symbols Outlined';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
display: inline-block;
|
||||
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<nav
|
||||
aria-label="Mobile"
|
||||
class="fixed bottom-0 left-0 w-full z-50 flex md:hidden bg-surface-container-low/90 backdrop-blur-xl shadow-[0_-1px_12px_rgba(0,0,0,0.3)]"
|
||||
>
|
||||
<div class="w-full h-16 px-space-xs flex items-center justify-around">
|
||||
<NuxtLink
|
||||
to="/"
|
||||
aria-current="page"
|
||||
class="w-16 h-12 flex flex-col items-center justify-center text-primary font-semibold transition-colors"
|
||||
>
|
||||
<Icon name="material-symbols:badge" aria-hidden="true" class="text-[22px]" />
|
||||
<span class="font-label-mono text-label-mono">Overview</span>
|
||||
</NuxtLink>
|
||||
<a
|
||||
href="#"
|
||||
class="w-16 h-12 flex flex-col items-center justify-center text-on-surface-variant hover:text-primary transition-colors"
|
||||
>
|
||||
<Icon name="material-symbols:timeline" aria-hidden="true" class="text-[22px]" />
|
||||
<span class="font-label-mono text-label-mono">Life Map</span>
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
class="w-16 h-12 flex flex-col items-center justify-center text-on-surface-variant hover:text-primary transition-colors"
|
||||
>
|
||||
<Icon name="material-symbols:code" aria-hidden="true" class="text-[22px]" />
|
||||
<span class="font-label-mono text-label-mono">Dev View</span>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</template>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<footer class="w-full bg-surface-container-lowest shadow-[0_-1px_12px_rgba(0,0,0,0.3)] py-6">
|
||||
<footer class="hidden md:block w-full bg-surface-container-lowest shadow-[0_-1px_12px_rgba(0,0,0,0.3)] py-6">
|
||||
<div class="max-w-7xl mx-auto px-6 lg:px-12 flex flex-col sm:flex-row items-center justify-between gap-4">
|
||||
<div class="flex items-center gap-2.5 font-label-mono text-label-mono text-on-surface-variant">
|
||||
<span class="inline-block w-2 h-2 rounded-full bg-secondary shadow-[0_0_6px_#4ae176]" />
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div class="flex min-h-screen flex-col">
|
||||
<div class="flex min-h-screen flex-col pb-16 md:pb-0">
|
||||
<AppHeader />
|
||||
<main class="w-full flex-1 pt-16 bg-surface">
|
||||
<slot />
|
||||
</main>
|
||||
<AppFooter />
|
||||
<AppBottomNav />
|
||||
</div>
|
||||
</template>
|
||||
Reference in new issue
Block a user