Skip to content

Commit

Permalink
updated look of language selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Kahera committed Sep 19, 2023
1 parent 234aeef commit 1d5b9c0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
13 changes: 8 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const isDev = import.meta.env.DEV;
<header class="flex items-center space-x-4 md:space-x-8 mx-4 md:mx-6 my-2 md:my-4">
<!-- Logo home-link -->
<RouterLink to="/" class="flex sm:space-x-4 md:space-x-6 max-md:grow">
<img alt="icon" src="@/assets/images/Kahera.png" class="max-h-12 max-sm:hidden" />
<img alt="{{ $t('common.JuneIcon') }}" src="@/assets/images/Kahera.png" class="max-h-12 max-sm:hidden" />
<h1 class="font-display font-bold text-center my-auto text-2xl sm:text-4xl text-primary dark:text-primary/80">
{{ $t('June', 2) }}
{{ $t('common.JuneHansen') }}
</h1>
</RouterLink>

Expand All @@ -38,12 +38,15 @@ const isDev = import.meta.env.DEV;
</RouterLink>
</div>
</nav>
<select v-model="$i18n.locale">
<option v-for="locale in $i18n.availableLocales" :key="`locale-${locale}`" :value="locale">
<!-- TODO: Complete select -->
<select v-model="$i18n.locale"
class="h-12 px-2 rounded-lg bg-transparent border border-primary dark:border-primary/80 text-primary dark:text-primary/80 outline-none outline-offset-0 focus:outline-1 focus:outline-primary-light">
<option v-for="locale in $i18n.availableLocales" :key="`locale-${locale}`" :value="locale"
class="bg-primary-lighter dark:bg-accent-darker">
{{ $t('locale.' + locale) }}
</option>
</select>
<Button @click="darkModeStore.toggle()" :icon-position="'right'" :type="'outline'" :size="'lg'">
<Button @click=" darkModeStore.toggle()" :icon-position="'right'" :type="'outline'" :size="'lg'">
<template #icon> {{ darkModeStore.darkMode ? 'light_mode' : 'dark_mode' }}</template>
</Button>
</header>
Expand Down
Empty file added src/assets/data/about-en.json
Empty file.
Empty file added src/assets/data/about-no.json
Empty file.
4 changes: 1 addition & 3 deletions src/components/DropdownComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ function onLeave(el: any, done: any) {
<!-- Dropdown items (list content) -->
<TransitionGroup name="list" @enter="onEnter" @leave="onLeave">
<a v-for="(link, index) in dropDownElements" :key="index" :href=link.path :data-index="index" class="block
bg-primary-lighter dark:bg-accent-darker
hover:bg-primary-light hover:dark:bg-accent-darker
hover:opacity-100 hover:dark:opacity-100">
bg-primary-lighter dark:bg-accent-darker">
<span class="font-icon">
<slot name="icon"></slot>
</span>
Expand Down
5 changes: 4 additions & 1 deletion src/i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"June": "June | June Hansen",
"common": {
"JuneHansen": "June Hansen",
"JuneIcon": "June icon"
},
"locale": {
"en": "EN",
"no": "NO"
Expand Down
5 changes: 4 additions & 1 deletion src/i18n/no.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"June": "June | June Hansen",
"common": {
"JuneHansen": "June Hansen",
"JuneIcon": "June ikon"
},
"locale": {
"en": "EN",
"no": "NO"
Expand Down

0 comments on commit 1d5b9c0

Please sign in to comment.