From e8b9c445efdb6bd1a06a1ccc7f649314b40d5c92 Mon Sep 17 00:00:00 2001 From: June Hansen <44864244+Kahera@users.noreply.github.com> Date: Wed, 20 Dec 2023 00:41:55 +0100 Subject: [PATCH] fixed most language selector issues --- src/components/DropdownComponent.vue | 8 ++-- src/components/LanguageSelector.vue | 71 +++++++++++++++------------- src/components/NavbarComponent.vue | 6 +-- 3 files changed, 44 insertions(+), 41 deletions(-) diff --git a/src/components/DropdownComponent.vue b/src/components/DropdownComponent.vue index 0b5ed97..1e74190 100644 --- a/src/components/DropdownComponent.vue +++ b/src/components/DropdownComponent.vue @@ -14,7 +14,7 @@ defineProps({ buttonType: { type: String as PropType<'outline' | 'solid'>, default: 'outline' - } + } }); const dropdownOpen = ref(false); @@ -27,7 +27,7 @@ function toggleDropdown(closeDropdown: boolean = false) { else dropdownOpen.value = !dropdownOpen.value; if (dropdownOpen.value) { - gsap.fromTo('.dropdown', { + gsap.fromTo('.dropdown-parent', { opacity: 0, height: 0 }, { @@ -37,7 +37,7 @@ function toggleDropdown(closeDropdown: boolean = false) { delay: reducedMotion.value ? 0 : 0.08, }); } else { - gsap.to('.dropdown', { + gsap.to('.dropdown-parent', { opacity: 0, height: 0, duration: reducedMotion.value ? 0 : 0.2, @@ -84,7 +84,7 @@ onUnmounted(() => { :slotted(.dropdown-parent > *) { @apply px-4 py-2 block text-center text-primary-darkest dark:text-primary-lighter - bg-primary-lighter dark:bg-accent-darker + bg-primary-lighter dark:bg-accent-darker hover:bg-primary-light dark:hover:bg-accent-darkest transition-colors duration-200; } diff --git a/src/components/LanguageSelector.vue b/src/components/LanguageSelector.vue index 54ee6c3..4c2bdeb 100644 --- a/src/components/LanguageSelector.vue +++ b/src/components/LanguageSelector.vue @@ -1,48 +1,51 @@ diff --git a/src/components/NavbarComponent.vue b/src/components/NavbarComponent.vue index 9caa896..7f7cd1d 100644 --- a/src/components/NavbarComponent.vue +++ b/src/components/NavbarComponent.vue @@ -57,7 +57,7 @@ function getNavIcon(name: string | undefined) { - + @@ -102,4 +102,4 @@ function getNavIcon(name: string | undefined) { - \ No newline at end of file +