diff --git a/assets/main.scss b/assets/main.scss index c7b17b4..4e9b7d3 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -47,7 +47,7 @@ body { } .menu { - @apply col-span-10 flex justify-end; + @apply hidden xl:flex col-span-10 justify-end; a { @apply text-zinc-800 hover:text-ioprim-900 transition-colors; @@ -70,6 +70,30 @@ body { @apply ml-2; } } + + &.toggle_visible { + @apply flex flex-col text-center; + + a { + @apply mb-2; + } + + a:before { + content: none; + } + } + + &-toggle { + @apply flex xl:hidden col-span-8 justify-end; + + >span { + @apply cursor-pointer text-zinc-600 hover:text-ioprim-900 transition-colors; + + svg { + @apply text-3xl; + } + } + } } a[href^="#"] { diff --git a/components/header.vue b/components/header.vue index 93ef533..0291c09 100644 --- a/components/header.vue +++ b/components/header.vue @@ -5,6 +5,13 @@ import k_logo from '@/assets/LOGO.svg' const { data: menuData } = await apiFetch(`menu/1/`) const pagesData = (menuData.value ? menuData.value.pages : []).sort((a, b) => a.order - b.order) const route = useRoute() + +const menu_visible = ref(false) +const toggle_menu = () => { + if (window.innerWidth < 1280) { + menu_visible.value = !menu_visible.value + } +}