From 02d6aedbfbabaa151a5c88197b35209a45459791 Mon Sep 17 00:00:00 2001 From: Sunjay Armstead <65554107+sarmstead@users.noreply.github.com> Date: Fri, 20 Jun 2025 11:02:41 -0400 Subject: [PATCH 1/9] feat(top-nav): stub out new markup --- assets/images/gem-logo--badge.svg | 54 +++++++++++++++++++++++++++++++ default.hbs | 5 +-- partials/navbar.hbs | 17 +++++++--- partials/navigation.hbs | 9 +++--- 4 files changed, 71 insertions(+), 14 deletions(-) create mode 100644 assets/images/gem-logo--badge.svg diff --git a/assets/images/gem-logo--badge.svg b/assets/images/gem-logo--badge.svg new file mode 100644 index 0000000..4cb2179 --- /dev/null +++ b/assets/images/gem-logo--badge.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/default.hbs b/default.hbs index b1f0fd1..8175f20 100644 --- a/default.hbs +++ b/default.hbs @@ -18,10 +18,7 @@ - -
- {{> "navbar" }} -
+ {{> "navbar" }}
{{!-- All content gets inserted here, index.hbs, post.hbs, etc --}} diff --git a/partials/navbar.hbs b/partials/navbar.hbs index f955737..f01e53a 100644 --- a/partials/navbar.hbs +++ b/partials/navbar.hbs @@ -1,5 +1,12 @@ - \ No newline at end of file + diff --git a/partials/navigation.hbs b/partials/navigation.hbs index f6b8792..a6980f0 100644 --- a/partials/navigation.hbs +++ b/partials/navigation.hbs @@ -1,8 +1,7 @@ -{{#if isSecondary}}{{else}}Home{{/if}} - From 05f389e66d643ed5e09fd2128d0b4cdfebc6ca4a Mon Sep 17 00:00:00 2001 From: Sunjay Armstead <65554107+sarmstead@users.noreply.github.com> Date: Fri, 20 Jun 2025 11:04:36 -0400 Subject: [PATCH 2/9] feat(top-nav): stub out mobile styles * Add new open and close icons * Remove navigation.css in favor of header.css --- assets/images/icon__burger.svg | 13 +++ assets/images/icon__close.svg | 12 +++ src/css/app.css | 3 +- src/css/layout/header.css | 60 +++++++++++- src/css/layout/navigation.css | 163 --------------------------------- 5 files changed, 84 insertions(+), 167 deletions(-) create mode 100644 assets/images/icon__burger.svg create mode 100644 assets/images/icon__close.svg delete mode 100644 src/css/layout/navigation.css diff --git a/assets/images/icon__burger.svg b/assets/images/icon__burger.svg new file mode 100644 index 0000000..04f8674 --- /dev/null +++ b/assets/images/icon__burger.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/assets/images/icon__close.svg b/assets/images/icon__close.svg new file mode 100644 index 0000000..5ead02e --- /dev/null +++ b/assets/images/icon__close.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/css/app.css b/src/css/app.css index 4684b3b..22aef02 100644 --- a/src/css/app.css +++ b/src/css/app.css @@ -13,10 +13,9 @@ /* Layout */ @import './layout/reset.css'; -@import './layout/navigation.css'; @import './layout/dropdown.css'; @import './layout/container.css'; -/* @import './layout/header.css'; */ +@import './layout/header.css'; @import './layout/footer.css'; /* Pages */ diff --git a/src/css/layout/header.css b/src/css/layout/header.css index 15b6da6..6d40603 100644 --- a/src/css/layout/header.css +++ b/src/css/layout/header.css @@ -1,3 +1,59 @@ -header { - margin-bottom: 3rem; +.navigation--top { + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + + .navigation__inner { + align-items: center; + display: grid; + grid-template-areas: 'logo mobile-trigger membership'; + grid-template-columns: 1fr repeat(2, max-content); + margin: auto; + max-width: var(--layout-inner-max-width); + padding: 8px 20px 8px 10px; + position: relative; + } + + .navigation__logo { + box-shadow: none; + grid-area: logo; + + img { + height: 75px; + width: 75px; + } + } + + .navigation__mobile-menu-trigger { + background-color: white; + background-repeat: no-repeat; + background-size: contain; + border: none; + cursor: pointer; + grid-area: mobile-trigger; + height: 24px; + margin-right: 20px; + width: 24px; + } + + .navigation__mobile-menu-trigger.closed { + background-image: url('/assets/images/icon__burger.svg'); + } + + .navigation__mobile-menu-trigger.open { + background-image: url('/assets/images/icon__close.svg'); + } + + .navigation__list { + display: none; + grid-area: list; + } + + .navigation__membership { + grid-area: membership; + } + + @media (min-width: 1440px) { + .navigation__mobile-menu-trigger { + display: none; + } + } } diff --git a/src/css/layout/navigation.css b/src/css/layout/navigation.css deleted file mode 100644 index f125b90..0000000 --- a/src/css/layout/navigation.css +++ /dev/null @@ -1,163 +0,0 @@ -nav { - position: relative; - padding: 1rem 1.5rem; -} - -nav ul { - display: flex; - gap: 2rem; - list-style-type: none; - font-size: var(--small); -} - -nav, -nav ul { - display: flex; - width: 100%; - align-items: center; - max-width: 1024px; - justify-content: space-between; - margin: 0 auto; -} - -nav .logo-circle { - transition: transform 0.25s ease-in-out; - flex-shrink: 0; - width: 30px; - height: 30px; - left: 20px; - top: 20px; - margin: 10px 0 0 0; - border-radius: 30px; - box-shadow: 0 9px 18px rgba(129, 0, 0, 0.3), 0 2px 5px rgba(137, 0, 0, 0.2); - background: no-repeat center 6px / 80% url(/assets/images/gem-logo.svg), - linear-gradient(to top, #df3434 0%, #fb5e55 100%); -} - -nav .logo-circle { - transform: scale(1.05); -} - -nav > ul > li:last-child > a { - background: linear-gradient(to top, #df3434 0%, #fb5e55 100%); - box-shadow: 0 15px 28px rgba(129, 0, 0, 0.2), 0 2px 5px rgba(137, 0, 0, 0.2); - padding: 10px 20px; - border-radius: 10px; - color: #fff; - font-weight: bold; -} - -nav li.subitem { - text-align: center; -} - -nav .menu-icon { - display: none; - width: 30px; - height: 20px; - margin: auto 0; - box-shadow: none; -} - -nav .menu-icon.open { - background: url(/assets/images/open-menu.svg) center no-repeat; -} - -nav .menu-icon.close { - background: url(/assets/images/close-menu.svg) center no-repeat; -} - -@media screen and (max-width: 1100px) and (orientation: portrait), -(max-width: 1005px) and (orientation: landscape) { - nav { - overflow-x: hidden; - } - - nav.closed .menu-icon.close, - nav.open .menu-icon.open { - display: none; - } - - nav.open .menu-icon.close, - nav.closed .menu-icon.open { - display: inline-block; - } - - nav.open { - overflow: visible; - } - - nav.open ul { - right: 0; - } - nav.closed ul { - right: -100%; - } - - nav ul { - position: absolute; - display: flex; - flex-direction: column; - align-items: flex-end; - justify-content: flex-start; - top: 0; - right: 0; - width: 33%; - padding: 1rem 2rem 8rem 1.5rem; - margin: 4.5rem 0px; - z-index: 2; - background: #fff; - border: 2px solid #f4eee6; - border-top: none; - border-radius: 0 0 0 20px; - transition: right 0.4s ease-in-out; - box-shadow: -4px 4px 5px rgba(253, 204, 204, 0.3); - } - - nav ul:before { - content: ''; - position: absolute; - left: -203%; - top: 0; - border: 2px solid #f4eee6; - border-left: none; - border-bottom: none; - border-radius: 0 20px 0 0; - box-shadow: 5px 0px #fff, inset -1px 1px 3px rgba(253, 204, 204, 0.3); - height: 15px; - width: 202.5%; - } - - nav.closed ul:before { - content: none; - } - - nav > ul > li:last-child { - margin-right: 0px; - padding-right: 0px; - } -} - -@media screen and (max-width: 600px) and (orientation: portrait), -(max-width: 548px) and (orientation: landscape) { - nav ul { - width: 50%; - } - - nav ul::before { - left: -102%; - width: 101.5%; - } -} - -.visually-hidden { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border: 0; -} From 24280e53dbb0c62940cb4e9fdc3e83cfcf06df8d Mon Sep 17 00:00:00 2001 From: Sunjay Armstead <65554107+sarmstead@users.noreply.github.com> Date: Fri, 20 Jun 2025 11:09:39 -0400 Subject: [PATCH 3/9] refactor(top-nav): rename partial and stylesheet --- default.hbs | 2 +- partials/{navbar.hbs => navigation-top.hbs} | 0 src/css/app.css | 2 +- src/css/layout/{header.css => navigation-top.css} | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename partials/{navbar.hbs => navigation-top.hbs} (100%) rename src/css/layout/{header.css => navigation-top.css} (100%) diff --git a/default.hbs b/default.hbs index 8175f20..ce4a0c5 100644 --- a/default.hbs +++ b/default.hbs @@ -18,7 +18,7 @@ - {{> "navbar" }} + {{> "navigation-top" }}
{{!-- All content gets inserted here, index.hbs, post.hbs, etc --}} diff --git a/partials/navbar.hbs b/partials/navigation-top.hbs similarity index 100% rename from partials/navbar.hbs rename to partials/navigation-top.hbs diff --git a/src/css/app.css b/src/css/app.css index 22aef02..2ed7771 100644 --- a/src/css/app.css +++ b/src/css/app.css @@ -15,7 +15,7 @@ @import './layout/reset.css'; @import './layout/dropdown.css'; @import './layout/container.css'; -@import './layout/header.css'; +@import './layout/navigation-top.css'; @import './layout/footer.css'; /* Pages */ diff --git a/src/css/layout/header.css b/src/css/layout/navigation-top.css similarity index 100% rename from src/css/layout/header.css rename to src/css/layout/navigation-top.css From 2e1367c75c84f4213cd16cf59a0e8ce00e599a91 Mon Sep 17 00:00:00 2001 From: Sunjay Armstead <65554107+sarmstead@users.noreply.github.com> Date: Fri, 20 Jun 2025 11:26:43 -0400 Subject: [PATCH 4/9] feat(top-nav): stub out new nav js * Add id to mobile trigger * Remove old js --- partials/navigation-top.hbs | 2 +- src/css/layout/navigation-top.css | 2 +- src/js/app/dropdown.js | 289 ------------------------------ src/js/app/index.js | 3 +- src/js/app/navigation-top.js | 10 ++ src/js/app/responsive-nav.js | 27 --- 6 files changed, 13 insertions(+), 320 deletions(-) delete mode 100644 src/js/app/dropdown.js create mode 100644 src/js/app/navigation-top.js delete mode 100644 src/js/app/responsive-nav.js diff --git a/partials/navigation-top.hbs b/partials/navigation-top.hbs index f01e53a..f864e84 100644 --- a/partials/navigation-top.hbs +++ b/partials/navigation-top.hbs @@ -3,7 +3,7 @@ - + {{navigation}}