Lint project

This commit is contained in:
2022-07-11 13:59:14 +02:00
parent 136db4a934
commit 3364855a25
27 changed files with 279 additions and 243 deletions

View File

@@ -1,30 +1,3 @@
<template>
<div class="fixed top-2 right-1 sm:(top-4 right-4) grid grid-rows-2 gap-y-2 text-center">
<div
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-800 duration-300 cursor-pointer rounded-full"
@click.prevent="toggleDark"
>
<SunIcon v-if="isDark" />
<MoonIcon v-else />
</div>
<div
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-800 duration-300 cursor-pointer rounded-full transform"
:class="{'rotate-180': scrollPosition > 100}"
@click.prevent="teleport"
>
<DownArrowIcon />
</div>
<div @click.prevent="switchLanguage">
<div v-if="locale === 'fr'" class="text-right text-xl px-1 hover:bg-gray-300 dark:hover:bg-gray-800 duration-300 cursor-pointer rounded-full">
🇬🇧
</div>
<div v-else class="text-right text-xl px-1 hover:bg-gray-300 dark:hover:bg-gray-800 duration-300 cursor-pointer rounded-full">
🇫🇷
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { isDark, toggleDark } from '~/composables'
@@ -55,3 +28,30 @@ onUnmounted(() => {
window.removeEventListener('scroll', updateScroll)
})
</script>
<template>
<div class="fixed top-2 right-1 sm:(top-4 right-4) grid grid-rows-2 gap-y-2 text-center">
<div
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-800 duration-300 cursor-pointer rounded-full"
@click.prevent="toggleDark"
>
<SunIcon v-if="isDark" />
<MoonIcon v-else />
</div>
<div
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-800 duration-300 cursor-pointer rounded-full transform"
:class="{ 'rotate-180': scrollPosition > 100 }"
@click.prevent="teleport"
>
<DownArrowIcon />
</div>
<div @click.prevent="switchLanguage">
<div v-if="locale === 'fr'" class="text-right text-xl px-1 hover:bg-gray-300 dark:hover:bg-gray-800 duration-300 cursor-pointer rounded-full">
🇬🇧
</div>
<div v-else class="text-right text-xl px-1 hover:bg-gray-300 dark:hover:bg-gray-800 duration-300 cursor-pointer rounded-full">
🇫🇷
</div>
</div>
</div>
</template>