From 055d682167f69bd3bd799c70bc7311df8b1c2d2f Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Tue, 10 Mar 2026 11:37:47 +0700 Subject: [PATCH] feat: adopt Apple-style glassmorphism UI from logistics project Three-tier glass system (glass-underlay, glass-capsule, glass-chip), pill-glass capsules with inner shine for header nav pills, two-layer header backdrop with fade mask, solid white left panel and juicy rounded-t-3xl bottom sheet for map interactions, bold/black headings throughout. --- app/assets/css/tailwind.css | 97 ++++++++++++++++++-- app/components/navigation/MainNavigation.vue | 30 ++---- app/components/page/CatalogPage.vue | 34 +++---- app/layouts/topnav.vue | 2 +- 4 files changed, 116 insertions(+), 47 deletions(-) diff --git a/app/assets/css/tailwind.css b/app/assets/css/tailwind.css index aa70775..a22bf03 100644 --- a/app/assets/css/tailwind.css +++ b/app/assets/css/tailwind.css @@ -37,24 +37,103 @@ } @layer components { - .glass-topfade { - background: linear-gradient( - 180deg, - rgba(255, 255, 255, 0.4) 0%, - rgba(255, 255, 255, 0.18) 45%, - rgba(255, 255, 255, 0) 100% - ); + /* ── Three-tier glass system (Apple-style glassmorphism) ── */ + + /* Tier 1 — lightest underlay, large panels / sidebars */ + .glass-underlay { + background: rgba(255, 255, 255, 0.34); + box-shadow: + 0 16px 44px rgba(24, 20, 12, 0.11), + inset 0 1px 0 rgba(255, 255, 255, 0.4); + backdrop-filter: blur(18px); + -webkit-backdrop-filter: blur(18px); } + /* Tier 2 — medium capsule, nav pills / search bar */ + .glass-capsule { + background: rgba(255, 255, 255, 0.56); + box-shadow: + 0 8px 24px rgba(24, 20, 12, 0.1), + inset 0 1px 0 rgba(255, 255, 255, 0.56); + backdrop-filter: blur(22px); + -webkit-backdrop-filter: blur(22px); + } + + /* Tier 3 — densest chip, small tags / badges */ + .glass-chip { + background: rgba(255, 255, 255, 0.72); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62); + backdrop-filter: blur(16px); + -webkit-backdrop-filter: blur(16px); + } + + /* Legacy aliases — keep backward compat during transition */ .glass-soft { - @apply bg-white/10 border border-white/10 backdrop-blur-md; + background: rgba(255, 255, 255, 0.34); + box-shadow: + 0 16px 44px rgba(24, 20, 12, 0.11), + inset 0 1px 0 rgba(255, 255, 255, 0.4); + backdrop-filter: blur(18px); + -webkit-backdrop-filter: blur(18px); } .glass-bright { - @apply bg-white/30 border border-white/20 backdrop-blur-md; + background: rgba(255, 255, 255, 0.56); + box-shadow: + 0 8px 24px rgba(24, 20, 12, 0.1), + inset 0 1px 0 rgba(255, 255, 255, 0.56); + backdrop-filter: blur(22px); + -webkit-backdrop-filter: blur(22px); } } +/* ── Header glass: two-layer Apple-style glassmorphism ── */ + +.header-glass { + background: transparent; +} + +/* Layer 1: frosted bar backdrop — fades to transparent at bottom */ +.header-glass-backdrop { + position: absolute; + inset: 0; + height: 350%; + background: rgba(255, 255, 255, 0.06); + -webkit-backdrop-filter: blur(16px) saturate(180%); + backdrop-filter: blur(16px) saturate(180%); + -webkit-mask-image: linear-gradient(to bottom, black 0%, black 20%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.1) 65%, transparent 100%); + mask-image: linear-gradient(to bottom, black 0%, black 20%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.1) 65%, transparent 100%); + pointer-events: none; + z-index: 0; +} + +/* Layer 2: capsule pills — denser frosted glass with inner shine */ +.pill-glass { + position: relative; + background: rgba(255, 255, 255, 0.12); + border: 1px solid rgba(255, 255, 255, 0.16); + -webkit-backdrop-filter: blur(20px) saturate(180%); + backdrop-filter: blur(20px) saturate(180%); + box-shadow: + 0 8px 32px rgba(31, 38, 135, 0.2), + inset 0 4px 20px rgba(255, 255, 255, 0.3); +} + +/* Inner shine highlight — liquid glass refraction */ +.pill-glass::after { + content: ''; + position: absolute; + inset: 0; + border-radius: inherit; + background: rgba(255, 255, 255, 0.1); + box-shadow: + inset -10px -8px 0 -11px rgba(255, 255, 255, 1), + inset 0 -9px 0 -8px rgba(255, 255, 255, 1); + opacity: 0.6; + filter: blur(1px) brightness(115%); + pointer-events: none; +} + @plugin "daisyui/theme" { name: "silk"; default: false; diff --git a/app/components/navigation/MainNavigation.vue b/app/components/navigation/MainNavigation.vue index db33e47..b36625e 100644 --- a/app/components/navigation/MainNavigation.vue +++ b/app/components/navigation/MainNavigation.vue @@ -1,21 +1,19 @@