-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathCExtension.vue
36 lines (29 loc) · 1.08 KB
/
CExtension.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<script setup lang="ts">
import { isDark, toggleDark } from '~/composables'
const { t, availableLocales, locale } = useI18n()
const toggleLocales = () => {
// change to some real logic
const locales = availableLocales
locale.value = locales[(locales.indexOf(locale.value) + 1) % locales.length]
}
</script>
<template>
<nav class="text-xl">
<!-- <router-link class="icon-btn mx-2" to="/" :title="t('button.home')">
<carbon-campsite />
</router-link> -->
<button class="icon-btn mx-2.25 !outline-none" :title="t('button.toggle_dark')" @click="toggleDark()">
<carbon-moon v-if="isDark" />
<carbon-sun v-else />
</button>
<a class="icon-btn mx-2.25" :title="t('button.toggle_langs')" @click="toggleLocales">
<carbon-language />
</a>
<router-link class="icon-btn mx-2.25" to="/infor" :title="t('button.about')">
<carbon-dicom-overlay />
</router-link>
<!-- <a class="icon-btn mx-2" rel="noreferrer" href="https://github.com/antfu/vitesse" target="_blank" title="GitHub">
<carbon-logo-github />
</a> -->
</nav>
</template>