close navbar on navigation for mobile

This commit is contained in:
Christofer 2023-08-27 22:06:53 +04:00
parent 9b7976ebbd
commit aeb67c5202

View file

@ -1,5 +1,5 @@
<script> <script>
import { page } from '$app/stores' import { navigating, page } from '$app/stores'
import logo from '$lib/images/logos/hyprland-color.svg' import logo from '$lib/images/logos/hyprland-color.svg'
import GithubIcon from '~icons/ri/github-fill' import GithubIcon from '~icons/ri/github-fill'
import DiscordIcon from '~icons/prime/discord' import DiscordIcon from '~icons/prime/discord'
@ -8,6 +8,8 @@
let isExpanded = false let isExpanded = false
$: if ($navigating) isExpanded = false
function toggleExpanded() { function toggleExpanded() {
isExpanded = !isExpanded isExpanded = !isExpanded
} }