From bdd787dbbde747b634e6c313f47bbe056d8a50d9 Mon Sep 17 00:00:00 2001 From: ardhikaxx Date: Mon, 25 May 2026 08:19:33 +0700 Subject: [PATCH] style: improve mobile navbar with floating overlay and smooth transitions --- public/css/app.css | 62 ++++++++++++++++++++++- resources/views/partials/navbar.blade.php | 52 ++++++++++++++----- 2 files changed, 100 insertions(+), 14 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 9b7442f..cf4a651 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -2150,12 +2150,11 @@ @media (max-width: 1199.98px) { /* Ensure navbar container doesn't clip dropdown */ .site-navbar .container { - position: static; + position: relative; overflow: visible !important; } .site-navbar .navbar-collapse { - position: static; overflow: visible !important; } @@ -2164,6 +2163,65 @@ .site-navbar .nav-auth-actions { overflow: visible !important; } +/* Mobile Overlay Navbar Styling */ +@media (max-width: 1199.98px) { + .site-navbar .navbar-collapse { + position: absolute !important; + top: 100% !important; + left: 0 !important; + right: 0 !important; + background: rgba(255, 255, 255, 0.98) !important; + backdrop-filter: blur(20px); + padding: 0 1.5rem !important; + margin-top: 1rem !important; + border-radius: var(--radius-lg) !important; + box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important; + border: 1px solid rgba(15, 118, 110, 0.15) !important; + z-index: 10000 !important; + + /* Transition properties */ + opacity: 0; + visibility: hidden; + transform: translateY(-10px); + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; + display: block !important; + height: auto !important; + } + + .site-navbar .navbar-collapse.show { + opacity: 1; + visibility: visible; + transform: translateY(0); + padding: 1.5rem !important; + } + + .site-navbar .navbar-collapse.collapsing { + opacity: 0; + visibility: visible; + transform: translateY(-10px); + padding: 1.5rem !important; + } + + .mobile-user-header { + background: rgba(15, 118, 110, 0.05); + padding: 0.75rem; + border-radius: var(--radius); + border: 1px solid rgba(15, 118, 110, 0.08); + } + + .site-navbar .nav-link { + padding: 0.75rem 1rem !important; + border-radius: 12px; + margin-bottom: 0.25rem; + } + + .site-navbar .nav-link:hover, + .site-navbar .nav-link.active { + background: rgba(15, 118, 110, 0.08); + color: var(--brand-deep) !important; + } +} + .site-navbar .dropdown { position: relative; overflow: visible !important; diff --git a/resources/views/partials/navbar.blade.php b/resources/views/partials/navbar.blade.php index dc77a5c..a49696b 100644 --- a/resources/views/partials/navbar.blade.php +++ b/resources/views/partials/navbar.blade.php @@ -13,6 +13,21 @@