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>
|
||||
+9
-1
@@ -2,7 +2,15 @@
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2025-07-15',
|
||||
devtools: { enabled: true },
|
||||
modules: ['@nuxt/eslint', '@nuxtjs/tailwindcss'],
|
||||
modules: ['@nuxt/eslint', '@nuxtjs/tailwindcss', '@nuxt/icon/module'],
|
||||
icon: {
|
||||
// Inline SVG instead of the CSS/mask mode, so icons exist in the SSR HTML
|
||||
// and survive with JavaScript disabled.
|
||||
mode: 'svg',
|
||||
// Only bundle the icons the source actually names, not the whole set.
|
||||
serverBundle: { collections: [] },
|
||||
clientBundle: { scan: true }
|
||||
},
|
||||
tailwindcss: {
|
||||
cssPath: '~/assets/css/main.css'
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
"typecheck": "nuxt typecheck"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify-json/material-symbols": "^1.2.95",
|
||||
"@nuxt/icon": "2.6.0",
|
||||
"@nuxtjs/tailwindcss": "6.14.0",
|
||||
"nuxt": "^4.6.2",
|
||||
"vue": "^3.5.43",
|
||||
|
||||
Generated
+103
@@ -11,6 +11,12 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@iconify-json/material-symbols':
|
||||
specifier: ^1.2.95
|
||||
version: 1.2.95
|
||||
'@nuxt/icon':
|
||||
specifier: 2.6.0
|
||||
version: 2.6.0(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.8)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1))(vue@3.5.44(typescript@5.9.3))
|
||||
'@nuxtjs/tailwindcss':
|
||||
specifier: 6.14.0
|
||||
version: 6.14.0(magicast@0.5.5)(supports-color@10.2.2)(yaml@2.9.1)
|
||||
@@ -496,6 +502,23 @@ packages:
|
||||
resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
|
||||
engines: {node: '>=18.18'}
|
||||
|
||||
'@iconify-json/material-symbols@1.2.95':
|
||||
resolution: {integrity: sha512-n34GNbwe8We3LPXK2N8JuQewEQkITJiRsmX/0UYJsOyKzviVl22mNfLUiGGtXLKDPqxZa17q1Hg57zdA3BYa0w==}
|
||||
|
||||
'@iconify/collections@1.0.754':
|
||||
resolution: {integrity: sha512-5AJQgPgjBFGwsQGyDjySYvkzX2tU4GO+blKb1HExUuiha3rhvUvw5rvQxZ/WBX3YJFl4kqqV3gcjpdidsXhH/w==}
|
||||
|
||||
'@iconify/types@2.0.0':
|
||||
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
|
||||
|
||||
'@iconify/utils@3.1.7':
|
||||
resolution: {integrity: sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w==}
|
||||
|
||||
'@iconify/vue@5.0.4':
|
||||
resolution: {integrity: sha512-9yP5PjOv5G9vStHfyPtQ69Ay1CSNAC3AZTRDJ4LX3UMX7nEH0GO8OKhc3qhcrXp1KS2GnlLufGbFCwD+U4Fi5A==}
|
||||
peerDependencies:
|
||||
vue: '>=3.0.0'
|
||||
|
||||
'@ioredis/commands@1.10.0':
|
||||
resolution: {integrity: sha512-UmeW7z4LfctwoQ5wkhVzgq8tXkreED2xZGpX+Bg+zA+WJFZCT6c062AfCK/Dfk81xZnnwdhJCUMkitihRaoC2Q==}
|
||||
|
||||
@@ -607,6 +630,11 @@ packages:
|
||||
peerDependencies:
|
||||
vite: '>=6.0'
|
||||
|
||||
'@nuxt/devtools-kit@3.4.4':
|
||||
resolution: {integrity: sha512-q3aRKpnriK/kITYlYUXSE3O0R7WeJwSMLvtbo1HfcKXYg/q8688iIb5VURl0fbkSaFTk7ndU5HIbW+5f0JOJPQ==}
|
||||
peerDependencies:
|
||||
vite: '>=6.0'
|
||||
|
||||
'@nuxt/devtools-wizard@3.4.3':
|
||||
resolution: {integrity: sha512-0F5mQmaj3rEMT5gkQeDsXea7YyyvPwp4ktT3xduZgp1G0QiSzV7AQ64gXz2LPaIc4V8ib/k++8KjmHL+/DbH4Q==}
|
||||
hasBin: true
|
||||
@@ -647,6 +675,9 @@ packages:
|
||||
vite-plugin-eslint2:
|
||||
optional: true
|
||||
|
||||
'@nuxt/icon@2.6.0':
|
||||
resolution: {integrity: sha512-cMT2gOK0AS8+CFI45Upz0Erzm9wud+iJ/eX/YeWbcw9UmSdU16PjbYyHpRKSALFHoSi3E7j7WRgT/KyU7UG7iA==}
|
||||
|
||||
'@nuxt/kit@3.21.11':
|
||||
resolution: {integrity: sha512-0Xi3tgwN77w43Q8GCPIrvWmF1J7Peehkts44E0uKNIml9lB8WoUn8YxyUjxBv47XtVR86NWoWALAT+/IEMHJEA==}
|
||||
engines: {node: '>=18.12.0'}
|
||||
@@ -2567,6 +2598,9 @@ packages:
|
||||
resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
import-meta-resolve@4.2.0:
|
||||
resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==}
|
||||
|
||||
impound@1.2.0:
|
||||
resolution: {integrity: sha512-hbFh2WURN+XQ364SbblzubhEEj/B3qZCe80l/EHXPWM6/kZP2mvOllxwRBBWNxe4gLbqXZL0fxOZwoDCSlJZQw==}
|
||||
|
||||
@@ -4866,6 +4900,27 @@ snapshots:
|
||||
|
||||
'@humanwhocodes/retry@0.4.3': {}
|
||||
|
||||
'@iconify-json/material-symbols@1.2.95':
|
||||
dependencies:
|
||||
'@iconify/types': 2.0.0
|
||||
|
||||
'@iconify/collections@1.0.754':
|
||||
dependencies:
|
||||
'@iconify/types': 2.0.0
|
||||
|
||||
'@iconify/types@2.0.0': {}
|
||||
|
||||
'@iconify/utils@3.1.7':
|
||||
dependencies:
|
||||
'@antfu/install-pkg': 2.1.0
|
||||
'@iconify/types': 2.0.0
|
||||
import-meta-resolve: 4.2.0
|
||||
|
||||
'@iconify/vue@5.0.4(vue@3.5.44(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@iconify/types': 2.0.0
|
||||
vue: 3.5.44(typescript@5.9.3)
|
||||
|
||||
'@ioredis/commands@1.10.0': {}
|
||||
|
||||
'@isaacs/cliui@8.0.2':
|
||||
@@ -5020,6 +5075,23 @@ snapshots:
|
||||
- rolldown
|
||||
- unplugin
|
||||
|
||||
'@nuxt/devtools-kit@3.4.4(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.8)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1))':
|
||||
dependencies:
|
||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.8)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1)))
|
||||
execa: 8.0.1
|
||||
vite: 8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1)
|
||||
transitivePeerDependencies:
|
||||
- '@nuxt/schema'
|
||||
- confbox
|
||||
- dotenv
|
||||
- giget
|
||||
- jiti
|
||||
- magic-string
|
||||
- mlly
|
||||
- oxc-parser
|
||||
- rolldown
|
||||
- unplugin
|
||||
|
||||
'@nuxt/devtools-wizard@3.4.3':
|
||||
dependencies:
|
||||
'@clack/prompts': 1.8.1
|
||||
@@ -5186,6 +5258,35 @@ snapshots:
|
||||
- vite
|
||||
- webpack
|
||||
|
||||
'@nuxt/icon@2.6.0(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.8)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1))(vue@3.5.44(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@iconify/collections': 1.0.754
|
||||
'@iconify/types': 2.0.0
|
||||
'@iconify/utils': 3.1.7
|
||||
'@iconify/vue': 5.0.4(vue@3.5.44(typescript@5.9.3))
|
||||
'@nuxt/devtools-kit': 3.4.4(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.8)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1)))(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1))
|
||||
'@nuxt/kit': 4.6.2(@nuxt/schema@4.6.2)(confbox@0.3.1)(dotenv@17.4.2)(giget@3.3.1)(jiti@2.7.0)(magic-string@1.4.3)(mlly@1.8.2)(rolldown@1.2.14)(unplugin@3.4.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.8)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1)))
|
||||
consola: 3.4.2
|
||||
local-pkg: 1.2.1
|
||||
mlly: 1.8.2
|
||||
ohash: 2.0.12
|
||||
picomatch: 4.0.7
|
||||
std-env: 4.3.0
|
||||
tinyglobby: 0.2.17
|
||||
ufo: 1.6.4
|
||||
transitivePeerDependencies:
|
||||
- '@nuxt/schema'
|
||||
- confbox
|
||||
- dotenv
|
||||
- giget
|
||||
- jiti
|
||||
- magic-string
|
||||
- oxc-parser
|
||||
- rolldown
|
||||
- unplugin
|
||||
- vite
|
||||
- vue
|
||||
|
||||
'@nuxt/kit@3.21.11(magicast@0.5.5)':
|
||||
dependencies:
|
||||
c12: 3.3.4(magicast@0.5.5)
|
||||
@@ -7195,6 +7296,8 @@ snapshots:
|
||||
parent-module: 1.0.1
|
||||
resolve-from: 4.0.0
|
||||
|
||||
import-meta-resolve@4.2.0: {}
|
||||
|
||||
impound@1.2.0(esbuild@0.28.2)(rolldown@1.2.14)(rollup@4.64.8)(vite@8.3.4(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1)):
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.31
|
||||
|
||||
@@ -33,3 +33,4 @@ minimumReleaseAgeExclude:
|
||||
- '@rollup/rollup-openbsd-x64@4.64.8'
|
||||
- '@rollup/rollup-openharmony-arm64@4.64.8'
|
||||
- '@rollup/rollup-win32-ia32-msvc@4.64.8'
|
||||
- '@nuxt/icon@2.6.0'
|
||||
Binary file not shown.
Reference in new issue
Block a user