Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions website/src/assets/icons/menu close.svg

This file was deleted.

29 changes: 0 additions & 29 deletions website/src/assets/icons/menu open.svg

This file was deleted.

52 changes: 52 additions & 0 deletions website/src/assets/icons/menu-close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions website/src/assets/icons/menu-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 19 additions & 10 deletions website/src/components/NavMenu.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script>
import { quadOut } from "svelte/easing";
import { fade } from "svelte/transition";
import menuIcon from "../assets/icons/menu-open.svg?url";
import closeIcon from "../assets/icons/menu-close.svg?url";
const headerLinks = [
{
title: "Home",
Expand Down Expand Up @@ -32,26 +34,33 @@
{/each}
</ul>
</nav>
<button
class="md:hidden self-center text-white font-bold border-2 border-white rounded-lg px-2 py-1"
onclick={toggleMenu}
aria-label={menuActive ? "Close navigation menu" : "Open navigation menu"}
aria-controls="navMenu"
aria-expanded={menuActive}>Menu</button
>
{#if menuActive == false}
<button
class="md:hidden self-center p-2"
transition:fade={{ duration: 180, easing: quadOut }}
onclick={toggleMenu}
aria-label="Open navigation menu"
aria-controls="navMenu"
aria-expanded={menuActive}
>
<img class="w-6 h-6" src={menuIcon} alt="" />
</button>
{/if}
{#if menuActive == true}
<div
id="navMenu"
class="fixed left-0 top-0 h-screen w-screen flex justify-center items-center bg-linear-to-br from-bdt-blue to-bdt-gradient z-10"
transition:fade={{ duration: 180, easing: quadOut }}
>
<button
class="fixed top-9.5 right-6 text-white font-bold border-2 border-white rounded-lg px-2 py-1"
class="fixed top-9 right-6 p-2"
onclick={toggleMenu}
aria-label={menuActive ? "Close navigation menu" : "Open navigation menu"}
aria-label="Close navigation menu"
aria-controls="navMenu"
aria-expanded={menuActive}>Close</button
aria-expanded={menuActive}
>
<img class="w-6 h-6" src={closeIcon} alt="" />
</button>
<ul class="w-fit h-fit flex flex-col gap-4 items-center">
{#each headerLinks as link}
<li>
Expand Down