From 65ebc71431938150ac1cedb8ad33669be91c1bf9 Mon Sep 17 00:00:00 2001 From: webfussel Date: Wed, 28 May 2025 09:49:56 +0200 Subject: [PATCH] FIX: some fixes for rollout Burger --- app/assets/css/burger.css | 64 ++++++++++++++++++++ app/assets/css/header.css | 82 ++----------------------- app/assets/css/person.css | 2 +- app/components/Burger.vue | 26 ++++++++ app/components/Header.vue | 44 +++----------- app/composables/navigation.ts | 24 ++++++++ app/layouts/default.vue | 1 + app/utils/navigation.ts | 26 ++++++++ nuxt.config.ts | 5 +- package-lock.json | 109 +++++++++++++++++++++++++++++++++- package.json | 4 +- 11 files changed, 268 insertions(+), 119 deletions(-) create mode 100644 app/assets/css/burger.css create mode 100644 app/components/Burger.vue create mode 100644 app/composables/navigation.ts create mode 100644 app/utils/navigation.ts diff --git a/app/assets/css/burger.css b/app/assets/css/burger.css new file mode 100644 index 0000000..52b422f --- /dev/null +++ b/app/assets/css/burger.css @@ -0,0 +1,64 @@ +.Burger { + position: fixed; + inset: 0; + z-index: 1000; + display: flex; + justify-content: flex-end; + align-items: center; + transition: var(--transition-time) ease-in-out; + pointer-events: none; + + &.open { + pointer-events: all; + background: rgba(0, 0, 0, 0.5); + + & nav { + translate: -15vw 0; + } + } + + & nav { + width: clamp(300px, 30vw, 400px); + background: var(--color-black); + align-items: end; + padding: 2rem; + height: max-content; + translate: 110% 0; + transition: 150ms ease-in-out; + border-radius: 20px; + + & ul { + display: flex; + flex-direction: column; + gap: 1rem; + font-size: 1.5rem; + + & a { + + &.active { + color: var(--color-orange); + } + + &:hover { + scale: 1.1; + color: var(--color-orange); + } + } + } + } +} + + +@media (width <= 450px) { + .Burger.open nav { + translate: -10vw 0; + } +} + + + +@media screen and (width >= 1180px) { + .Burger { + display: none; + } +} \ No newline at end of file diff --git a/app/assets/css/header.css b/app/assets/css/header.css index 7ed1b7b..61f278f 100755 --- a/app/assets/css/header.css +++ b/app/assets/css/header.css @@ -61,60 +61,12 @@ backdrop-filter: blur(10px); border-radius: 0; - & > label { + & > .burger { + all: unset; display: none; - width: 30px; - height: 25px; position: relative; - transform: rotate(0deg); transition: var(--transition-time) ease-in-out; cursor: pointer; - z-index: 20000; - - & > span { - display: block; - position: absolute; - height: 5px; - width: 100%; - background: var(--color-white); - border-radius: 9px; - opacity: 1; - left: 0; - transform: rotate(0deg); - transition: .25s ease-in-out; - - &:nth-child(1) { - top: 0; - } - - &:nth-child(2), &:nth-child(3) { - top: 9px; - } - - &:nth-child(4) { - top: 18px; - } - } - } - - & > input[type="checkbox"]:checked + label span:nth-child(1) { - top: 18px; - width: 0; - left: 50%; - } - - & > input[type="checkbox"]:checked + label span:nth-child(2) { - transform: rotate(45deg); - } - - & > input[type="checkbox"]:checked + label span:nth-child(3) { - transform: rotate(-45deg); - } - - & > input[type="checkbox"]:checked + label span:nth-child(4) { - top: 18px; - width: 0; - left: 50%; } } @@ -142,40 +94,14 @@ } } - - @media screen and (width < 1180px) { .Header { - & > .wrapper.wrapper > label { + & > .wrapper.wrapper > .burger { display: block; } - & input[type="checkbox"]:checked ~ nav { - transform: translateX(-15vw); - } - & nav { - background: var(--color-black); - position: absolute; - overflow: hidden; - height: 100vh; - width: 100vw; - top: -15px; - transition: var(--transition-time); - transform: translateX(100%); - color: var(--color-white); - flex-direction: column; - - & ul { - flex-direction: column; - justify-content: center; - height: 100vh; - gap: 8vh; - - & li { - font-size: clamp(1rem, 10vw, 3rem); - } - } + display: none; } } } diff --git a/app/assets/css/person.css b/app/assets/css/person.css index b2dcb75..ff0eb30 100755 --- a/app/assets/css/person.css +++ b/app/assets/css/person.css @@ -1,5 +1,5 @@ .Person { - flex-basis: clamp(350px, calc(33% - 3rem), 500px); + flex-basis: clamp(200px, calc(33% - 3rem), 500px); flex-grow: 1; flex-shrink: 0; align-items: center; diff --git a/app/components/Burger.vue b/app/components/Burger.vue new file mode 100644 index 0000000..19c3fc2 --- /dev/null +++ b/app/components/Burger.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/app/components/Header.vue b/app/components/Header.vue index 71c0553..3a64a35 100755 --- a/app/components/Header.vue +++ b/app/components/Header.vue @@ -8,15 +8,14 @@ webfussel - - +