it-tools/src/components/NavbarButtons.vue

56 lines
1.7 KiB
Vue
Raw Normal View History

<script setup lang="ts">
import { IconBrandGithub, IconBrandX, IconInfoCircle, IconMoon, IconSun } from '@tabler/icons-vue';
import { useStyleStore } from '@/stores/style.store';
const styleStore = useStyleStore();
const { isDarkTheme } = toRefs(styleStore);
</script>
2022-04-16 11:13:30 +02:00
<template>
<c-tooltip :tooltip="$t('home.nav.github')" position="bottom">
<c-button
circle
variant="text"
href="https://github.com/CorentinTh/it-tools"
target="_blank"
rel="noopener noreferrer"
:aria-label="$t('home.nav.githubRepository')"
>
<n-icon size="25" :component="IconBrandGithub" />
</c-button>
</c-tooltip>
2022-04-16 11:13:30 +02:00
<c-tooltip :tooltip="$t('home.nav.twitterX')" position="bottom">
<c-button
circle
variant="text"
href="https://x.com/ittoolsdottech"
rel="noopener"
target="_blank"
:aria-label="$t('home.nav.twitterXAccount')"
>
<n-icon size="25" :component="IconBrandX" />
</c-button>
</c-tooltip>
2022-04-16 11:13:30 +02:00
<c-tooltip :tooltip="$t('home.nav.about')" position="bottom">
<c-button circle variant="text" to="/about" :aria-label="$t('home.nav.aboutLabel')">
<n-icon size="25" :component="IconInfoCircle" />
</c-button>
</c-tooltip>
<c-tooltip :tooltip="isDarkTheme ? $t('home.nav.lightMode') : $t('home.nav.darkMode')" position="bottom">
<c-button circle variant="text" :aria-label="$t('home.nav.mode')" @click="() => styleStore.toggleDark()">
<n-icon v-if="isDarkTheme" size="25" :component="IconSun" />
<n-icon v-else size="25" :component="IconMoon" />
</c-button>
</c-tooltip>
2022-04-16 11:13:30 +02:00
</template>
<style lang="less" scoped>
.n-button {
2022-04-22 23:31:40 +02:00
&:not(:last-child) {
margin-right: 5px;
}
2022-04-16 11:13:30 +02:00
}
2022-04-22 23:31:40 +02:00
</style>