This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="app-root" :class="{ 'zh': locale === 'zh' }" :data-lang="locale">
|
||||||
<NuxtRouteAnnouncer />
|
<NuxtRouteAnnouncer />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<NuxtPage />
|
<NuxtPage />
|
||||||
@@ -16,7 +16,7 @@ const { locale } = useI18n()
|
|||||||
useHead({
|
useHead({
|
||||||
htmlAttrs: {
|
htmlAttrs: {
|
||||||
lang: computed(() => {
|
lang: computed(() => {
|
||||||
const map: Record<string, string> = { en: 'en-US', es: 'es-ES', ca: 'ca-ES' }
|
const map: Record<string, string> = { en: 'en-US', es: 'es-ES', ca: 'ca-ES', zh: 'zh-CN' }
|
||||||
return map[locale.value] || 'en-US'
|
return map[locale.value] || 'en-US'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,27 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&family=Noto+Sans+SC:wght@400;700&display=swap');
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Hurmit';
|
font-family: 'Hurmit';
|
||||||
src: url('@/assets/fonts/Hermit/Hermit-Regular.woff2') format('woff2');
|
src: url('@/assets/fonts/Hermit/Hermit-Regular.woff2') format('woff2');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noroshi Code';
|
||||||
|
src: url('@/assets/fonts/NoroshiCode/NoroshiCode-Light.woff2') format('woff2');
|
||||||
|
font-weight: 300;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noroshi Code';
|
||||||
|
src: url('@/assets/fonts/NoroshiCode/NoroshiCode-Regular.woff2') format('woff2');
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Noroshi Code';
|
||||||
|
src: url('@/assets/fonts/NoroshiCode/NoroshiCode-Bold.woff2') format('woff2');
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,10 +23,18 @@ body {
|
|||||||
|
|
||||||
* {
|
* {
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
font-family: 'Hurmit', 'IBM Plex Mono', 'Noto Sans SC', monospace;
|
font-family: 'Hurmit', 'Noroshi Code', monospace;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-root.zh {
|
||||||
|
font-family: 'Noroshi Code', monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-root.zh *, .app-root [lang|="zh"], :lang(zh) * {
|
||||||
|
font-family: 'Noroshi Code', monospace !important;
|
||||||
|
}
|
||||||
|
|
||||||
.pixelated {
|
.pixelated {
|
||||||
image-rendering: pixelated; /* good for pixel art or low-res images */
|
image-rendering: pixelated; /* good for pixel art or low-res images */
|
||||||
/* OR for standard crisp images */
|
/* OR for standard crisp images */
|
||||||
@@ -55,7 +63,7 @@ li::before {
|
|||||||
top: 0px;
|
top: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
color: var(--color-border-color);
|
color: var(--color-border-color);
|
||||||
font-family: 'Hurmit', 'IBM Plex Mono', 'Noto Sans SC', monospace;
|
font-family: 'Hurmit', 'Noroshi Code', monospace;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +91,7 @@ blockquote::before {
|
|||||||
|
|
||||||
/* TUI-style code blocks */
|
/* TUI-style code blocks */
|
||||||
pre, code {
|
pre, code {
|
||||||
font-family: 'Hurmit', 'IBM Plex Mono', monospace;
|
font-family: 'Hurmit', 'Noroshi Code', monospace;
|
||||||
background-color: var(--color-background-line);
|
background-color: var(--color-background-line);
|
||||||
border: 1px solid var(--color-border-color);
|
border: 1px solid var(--color-border-color);
|
||||||
}
|
}
|
||||||
@@ -128,7 +136,7 @@ hr {
|
|||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
color: var(--color-border-color);
|
color: var(--color-border-color);
|
||||||
font-family: 'Hurmit', 'IBM Plex Mono', monospace;
|
font-family: 'Hurmit', 'Noroshi Code', monospace;
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
frontend/app/assets/fonts/NoroshiCode/NoroshiCode-Bold.woff2
Normal file
BIN
frontend/app/assets/fonts/NoroshiCode/NoroshiCode-Bold.woff2
Normal file
Binary file not shown.
BIN
frontend/app/assets/fonts/NoroshiCode/NoroshiCode-Light.woff2
Normal file
BIN
frontend/app/assets/fonts/NoroshiCode/NoroshiCode-Light.woff2
Normal file
Binary file not shown.
BIN
frontend/app/assets/fonts/NoroshiCode/NoroshiCode-Regular.woff2
Normal file
BIN
frontend/app/assets/fonts/NoroshiCode/NoroshiCode-Regular.woff2
Normal file
Binary file not shown.
@@ -31,6 +31,16 @@ const changeLocale = (lang) => {
|
|||||||
setLocale(lang.code);
|
setLocale(lang.code);
|
||||||
dropdownVisible.value = false
|
dropdownVisible.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const localeIcon = (code) => {
|
||||||
|
const icons = {
|
||||||
|
en: 'EN',
|
||||||
|
es: 'ES',
|
||||||
|
ca: 'CA',
|
||||||
|
zh: 'ZH'
|
||||||
|
}
|
||||||
|
return icons[code] || code.toUpperCase()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -42,7 +52,7 @@ const changeLocale = (lang) => {
|
|||||||
<div class="section">
|
<div class="section">
|
||||||
<div :class="{'menu-item': true, 'active': locale === loc.code}"
|
<div :class="{'menu-item': true, 'active': locale === loc.code}"
|
||||||
v-for="loc in locales" @click="changeLocale(loc)">
|
v-for="loc in locales" @click="changeLocale(loc)">
|
||||||
{{ $t('locales.' + loc.code) }}
|
<span class="locale-icon">{{ localeIcon(loc.code) }}</span>{{ $t('locales.' + loc.code) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -102,6 +112,17 @@ border: 1px solid var(--color-border-color);
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Items */
|
/* Items */
|
||||||
|
.locale-icon {
|
||||||
|
font-family: 'Hermit', 'Hurmit', monospace;
|
||||||
|
background: var(--color-border-color);
|
||||||
|
color: var(--color-text);
|
||||||
|
padding: 2px 6px;
|
||||||
|
font-size: 0.75em;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
min-width: 32px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"locales": {
|
"locales": {
|
||||||
"en": "🇺🇸 Anglès",
|
"en": "Anglès",
|
||||||
"es": "🇪🇸 Espanyol",
|
"es": "Espanyol",
|
||||||
"ca": "🇦🇩 Català",
|
"ca": "Català",
|
||||||
"zh": "🇨🇳 中文"
|
"zh": "中文"
|
||||||
},
|
},
|
||||||
"themes": {
|
"themes": {
|
||||||
"light": "Clar",
|
"light": "Clar",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"locales": {
|
"locales": {
|
||||||
"en": "🇺🇸 English",
|
"en": "English",
|
||||||
"es": "🇪🇸 Spanish",
|
"es": "Spanish",
|
||||||
"ca": "🇦🇩 Catalan",
|
"ca": "Catalan",
|
||||||
"zh": "🇨🇳 中文"
|
"zh": "中文"
|
||||||
},
|
},
|
||||||
"themes": {
|
"themes": {
|
||||||
"light": "Light",
|
"light": "Light",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"locales": {
|
"locales": {
|
||||||
"en": "🇺🇸 Ingles",
|
"en": "Inglés",
|
||||||
"es": "🇪🇸 Español",
|
"es": "Español",
|
||||||
"ca": "🇦🇩 Catalán",
|
"ca": "Catalán",
|
||||||
"zh": "🇨🇳 中文"
|
"zh": "中文"
|
||||||
},
|
},
|
||||||
"themes": {
|
"themes": {
|
||||||
"light": "Claro",
|
"light": "Claro",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"locales": {
|
"locales": {
|
||||||
"en": "🇺🇸 English",
|
"en": "English",
|
||||||
"es": "🇪🇸 西班牙语",
|
"es": "西班牙语",
|
||||||
"ca": "🇦🇩 加泰罗尼亚语",
|
"ca": "加泰罗尼亚语",
|
||||||
"zh": "🇨🇳 中文"
|
"zh": "中文"
|
||||||
},
|
},
|
||||||
"themes": {
|
"themes": {
|
||||||
"light": "浅色",
|
"light": "浅色",
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ export default defineNuxtConfig({
|
|||||||
{ name: 'description', content: 'Personal website of Aran Roig — developer, artist, and designer. Explore projects, blog posts, art gallery, and more.' },
|
{ name: 'description', content: 'Personal website of Aran Roig — developer, artist, and designer. Explore projects, blog posts, art gallery, and more.' },
|
||||||
{ name: 'author', content: 'Aran Roig' },
|
{ name: 'author', content: 'Aran Roig' },
|
||||||
{ name: 'robots', content: 'index, follow' }
|
{ name: 'robots', content: 'index, follow' }
|
||||||
]
|
],
|
||||||
|
link: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user