feat: locales in header & footer
This commit is contained in:
parent
94880e20a2
commit
354148357f
4 changed files with 44 additions and 11 deletions
|
|
@ -1,4 +1,8 @@
|
||||||
<script lang="ts" src="../composables/MainFooter.ts"></script>
|
<script setup lang="ts">
|
||||||
|
import { footerLinks } from '../composables/MainFooter'
|
||||||
|
|
||||||
|
const { t } = useLocale()
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<UFooter>
|
<UFooter>
|
||||||
|
|
@ -16,12 +20,12 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-sm text-gray-400 space-y-1">
|
<div class="text-sm text-gray-400 space-y-1">
|
||||||
<p>Copyright 2026</p>
|
<p>Copyright {{ new Date().getFullYear() }}</p>
|
||||||
<p>Site maintained by Spacebar Network</p>
|
<p>{{ t.footer?.siteMaintained }}</p>
|
||||||
<p>Developed by our contributors</p>
|
<p>{{ t.footer?.developedBy }}</p>
|
||||||
|
|
||||||
<p class="mt-4 max-w-[320px] leading-snug text-gray-500">
|
<p class="mt-4 max-w-[320px] leading-snug text-gray-500">
|
||||||
Spacebar Network (SPBR) is an extension of Splatfestival Network (SPFN), which aims to be a Nintendo Network recreation primarily for hosting Splatfests. Spacebar is separate from this purpose, though we remain partnered with Splatfestival.
|
{{ t.footer?.description }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -31,7 +35,7 @@
|
||||||
|
|
||||||
<template #left>
|
<template #left>
|
||||||
<span class="text-sm text-gray-500">
|
<span class="text-sm text-gray-500">
|
||||||
© {{ new Date().getFullYear() }} Spacebar Network. All rights reserved.
|
© {{ new Date().getFullYear() }} {{ t.footer?.copyright }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,17 +12,17 @@
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
|
||||||
<nav class="links">
|
<nav class="links">
|
||||||
<a href="#">Supported games</a>
|
<a href="#">{{ t.nav?.supportedGames }}</a>
|
||||||
<a href="#">Error Codes</a>
|
<a href="#">{{ t.nav?.errorCodes }}</a>
|
||||||
<a href="#">Discord Server</a>
|
<a href="#">{{ t.nav?.discordServer }}</a>
|
||||||
<a href="#">Install SPBR</a>
|
<a href="#">{{ t.nav?.installSpbr }}</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<input
|
<input
|
||||||
v-model="query"
|
v-model="query"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Search"
|
:placeholder="t.nav?.searchPlaceholder"
|
||||||
>
|
>
|
||||||
<button class="search-btn">
|
<button class="search-btn">
|
||||||
<Icon
|
<Icon
|
||||||
|
|
@ -40,6 +40,8 @@
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const query = ref('')
|
const query = ref('')
|
||||||
|
|
||||||
|
const { t } = useLocale()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
12
app/composables/useLocales.ts
Normal file
12
app/composables/useLocales.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import enMessages from '../locales/message-en.json'
|
||||||
|
|
||||||
|
const messages = ref(enMessages)
|
||||||
|
|
||||||
|
export const useLocale = () => {
|
||||||
|
// todo add changer
|
||||||
|
|
||||||
|
return {
|
||||||
|
t: messages
|
||||||
|
}
|
||||||
|
}
|
||||||
15
app/locales/message-en.json
Normal file
15
app/locales/message-en.json
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"nav": {
|
||||||
|
"supportedGames": "Supported games",
|
||||||
|
"errorCodes": "Error Codes",
|
||||||
|
"discordServer": "Discord Server",
|
||||||
|
"installSpbr": "Install SPBR",
|
||||||
|
"searchPlaceholder": "Search"
|
||||||
|
},
|
||||||
|
"footer": {
|
||||||
|
"siteMaintained": "Site maintained by Spacebar Network",
|
||||||
|
"developedBy": "Developed by our contributors",
|
||||||
|
"description": "Spacebar Network (SPBR) is an extension of Splatfestival Network (SPFN), which aims to be a Nintendo Network recreation primarily for hosting Splatfests. Spacebar is separate from this purpose, though we remain partnered with Splatfestival.",
|
||||||
|
"copyright": "Spacebar Network. All rights reserved."
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue