NavbarButtons.vue 979 B

12345678910111213141516171819202122232425262728293031
  1. <script setup lang="ts">
  2. import { BrandGithub, BrandTwitter, InfoCircle, Moon, Sun } from '@vicons/tabler';
  3. import { useStyleStore } from '@/stores/style.store';
  4. const styleStore = useStyleStore();
  5. const { isDarkTheme } = toRefs(styleStore);
  6. </script>
  7. <template>
  8. <c-tooltip :tooltip="$t('home.nav.about')" position="bottom">
  9. <c-button circle variant="text" to="/about" :aria-label="$t('home.nav.aboutLabel')">
  10. <n-icon size="25" :component="InfoCircle" />
  11. </c-button>
  12. </c-tooltip>
  13. <c-tooltip :tooltip="isDarkTheme ? $t('home.nav.lightMode') : $t('home.nav.darkMode')" position="bottom">
  14. <c-button circle variant="text" :aria-label="$t('home.nav.mode')" @click="() => styleStore.toggleDark()">
  15. <n-icon v-if="isDarkTheme" size="25" :component="Sun" />
  16. <n-icon v-else size="25" :component="Moon" />
  17. </c-button>
  18. </c-tooltip>
  19. </template>
  20. <style lang="less" scoped>
  21. .n-button {
  22. &:not(:last-child) {
  23. margin-right: 5px;
  24. }
  25. }
  26. </style>