no longer use i18n for messages

This commit is contained in:
2025-09-22 17:36:41 +07:00
parent 2cf92499dc
commit babfa1cf56
5 changed files with 81 additions and 47 deletions
+5 -4
View File
@@ -4,10 +4,12 @@
<div class="container"> <div class="container">
<section class="row"> <section class="row">
<section class="footer-notice"> <section class="footer-notice">
<img width="48" height="48" src="/favicon.ico" alt="*nix" class="text-2xl"></img> <img width="48" height="48" src="/logo.svg" alt="*nix" class="text-2xl"></img>
<h2 class="text-2xl font-bold my-[0.5em]">*nix in Thailand (กซในประเทศไทย)</h2> <h2 class="text-2xl font-bold my-[0.5em]">*nix in Thailand (กซในประเทศไทย)</h2>
<p class="my-[0.5em]">{{t('footer.copyright.notice', {'year': year, 'yearB': year + 543})}}</p> <p class="my-[0.5em]">รสทธ 🄯 *nix in Thailand, {{ year }} ({{ year + 543 }}), ไมสงวนสทธกประการ</p>
<LanguageSwitcher/> <div class="flex gap-1">
<UButton variant="outline" color="neutral" size="sm" to="https://gitskette.dailitation.xyz/DandelionNStuff/NixWeb-homepage" label="ซอร์สโค้ด"/>
</div>
</section> </section>
</section> </section>
</div> </div>
@@ -16,6 +18,5 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const {t} = useI18n();
const year = 2025 const year = 2025
</script> </script>
+33 -11
View File
@@ -4,14 +4,14 @@
<div class="container flex justify-between"> <div class="container flex justify-between">
<div class="row w-fit items-center"> <div class="row w-fit items-center">
<div class="row flex"> <div class="row flex">
<img width="48" height="48" src="/favicon.ico" alt="*nix" class="text-2xl mr-4"></img> <img width="48" height="48" src="/logo.svg" alt="*nix" class="text-2xl mr-4"></img>
<img width="124" height="20" src="/wordmark.svg" alt="in Thailand" class="text-2xl my-[13px]"></img> <img width="124" height="20" src="/wordmark.svg" alt="in Thailand" class="text-2xl my-[13px]"></img>
</div> </div>
</div> </div>
<div class="hidden sm:flex w-fit items-center justify-end"> <div class="hidden sm:flex w-fit items-center justify-end">
<div class="row"> <div class="row">
<UFieldGroup> <UFieldGroup>
<UButton size="sm" :label="t('sites.join-discord')" to="https://discord.gg/p5wuX5GwB7" icon="i-lucide-users" /> <UButton size="sm" label="เข้าร่วม Discord" to="https://discord.gg/p5wuX5GwB7" icon="i-lucide-users" />
<UDropdownMenu <UDropdownMenu
size="sm" size="sm"
:items="siteTitleItems" :items="siteTitleItems"
@@ -24,7 +24,7 @@
content: 'w-36' content: 'w-36'
}" }"
> >
<UButton size="sm" :label="t('sites.all')" icon="i-lucide-map" color="neutral" variant="outline" /> <UButton size="sm" label="บริการของ unix.in.th" icon="i-lucide-map" color="neutral" variant="outline" />
</UDropdownMenu> </UDropdownMenu>
</UFieldGroup> </UFieldGroup>
</div> </div>
@@ -36,43 +36,65 @@
<div class="hidden sm:flex"> <div class="hidden sm:flex">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li class="nav-link"> <li class="nav-link">
<NuxtLinkLocale href="/">{{ t('nav.home') }}</NuxtLinkLocale> <NuxtLink href="/">หนาหล</NuxtLink>
</li> </li>
<li class="nav-link"> <li class="nav-link">
<NuxtLinkLocale href="/about">{{ t('nav.about') }}</NuxtLinkLocale> <NuxtLink href="/about">เกยวก</NuxtLink>
</li> </li>
<li class="nav-link"> <li class="nav-link">
<NuxtLinkLocale href="/contact">{{ t('nav.contact') }}</NuxtLinkLocale> <NuxtLink href="/contact">ดต</NuxtLink>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</nav> </nav>
<nav v-if="mobileNavbar">
<div class="hidden sm:flex">
<ul class="nav navbar-nav">
<li class="nav-link">
<NuxtLinkLocale href="/">หนาหล</NuxtLinkLocale>
</li>
<li class="nav-link">
<NuxtLinkLocale href="/about">เกยวก</NuxtLinkLocale>
</li>
<li class="nav-link">
<NuxtLinkLocale href="/contact">ดต</NuxtLinkLocale>
</li>
</ul>
</div>
</nav>
</header> </header>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
const { t } = useI18n();
const siteTitleItems = ref<DropdownMenuItem[]>([ const siteTitleItems = ref<DropdownMenuItem[]>([
{ {
label: t('sites.wiki'), label: 'วิกิ',
icon: 'i-lucide-book-open-text', icon: 'i-lucide-book-open-text',
to: 'https://wiki.unix.in.th' to: 'https://wiki.unix.in.th'
}, },
{ {
label: t('sites.identity'), label: 'ระบบบัญชี',
icon: 'i-lucide-user', icon: 'i-lucide-user',
to: 'https://identity.unix.in.th' to: 'https://identity.unix.in.th'
}, },
{ {
label: t('sites.forum'), label: 'ลานประชาคม',
icon: 'i-lucide-messages-square', icon: 'i-lucide-messages-square',
to: 'https://forum.unix.in.th' to: 'https://forum.unix.in.th'
}, },
{ {
label: t('sites.status'), label: 'สถานะ',
icon: 'i-lucide-activity', icon: 'i-lucide-activity',
to: 'https://status.unix.in.th' to: 'https://status.unix.in.th'
}, },
]) ])
const mobileNavbar = ref(false);
function toggleMobileNavbar() {
mobileNavbar.value = !mobileNavbar.value
}
function closeMobileNavbar() {
mobileNavbar.value = false
}
</script> </script>
+18 -9
View File
@@ -3,27 +3,36 @@
<article class="article"> <article class="article">
<section class="hero-section"> <section class="hero-section">
<div class="container"> <div class="container">
<h1 :id="t('about.hero.title').replace(/ /g, '_')" class="title">{{ t('about.hero.title') }}</h1> <h1 id="about" class="title">เกยวกบเรา</h1>
<!-- <p :id="t('about.hero.sub').replace(/ /g, '_')" class="subtitle">{{ t('about.hero.sub') }}</p> -->
</div> </div>
</section> </section>
<section class="container"> <section class="page-section">
<div class="container">
<p>
*nix in Thailand (unix.in.th) เปนเวบไซตแมายสำหรบทรพยากรสาระขอม เอกสาร ของฮารดแวรและซอฟตแวรคอมพวเตอรกคนสามารถใช แกไข และเผยแพรอไดอยางเสร
</p>
<p>
เวบไซตบรการว (Wiki) เปนเอกสาร อม และวทำสำหรบซอฟตแวรและฮารดแวร กคนเขาถงได โดยทวขอเนนระบบ UNIX และ Unix-like เปนหล แตสามารถกลาวถงระบบอ ไดเชนกนเปนเบดเตล
</p>
<p>
นอกจากนงมลานประชาคม (Forum) สำหรบผใชอาจซกถามอภปราย หรอคยเล เกยวกบซอฟตแวร และฮารดแวร ระบบ UNIX, Unix-like และอ
</p>
<p>
และระบบบญชวนกลาง (Identity provider) เปนระบบเสาหลกในการลงชอใชงานระบบทงหมดของ *nix in Thailand ทำงานโดยใช OpenID Connect (OAuth2)
</p>
</div>
</section> </section>
</article> </article>
</main> </main>
</template> </template>
<script setup> <script setup>
const {t} = useI18n();
const config = useRuntimeConfig(); const config = useRuntimeConfig();
const baseUrl = config.public.baseUrl
useHead({ useHead({
title: '*nix in Thailand', title: 'เกี่ยวกับ',
titleTemplate: '%s',
meta: [ meta: [
{ property: 'og:type', content: 'website' } { property: 'og:type', content: 'article' }
] ]
}) })
</script> </script>
+10 -8
View File
@@ -3,12 +3,15 @@
<article class="article"> <article class="article">
<section class="hero-section"> <section class="hero-section">
<div class="container"> <div class="container">
<img></img> <h1 class="title">ดตอเรา</h1>
<h2 class="text-3xl ">contact page</h2>
</div> </div>
</section> </section>
<section class="container"> <section class="page-section">
<div class="container">
<p>
เดยวทจะตดตอเราไดอไปรษณเลกทรอนกส postmaster[at]unix.in.th
</p>
</div>
</section> </section>
</article> </article>
</main> </main>
@@ -16,13 +19,12 @@
<script setup> <script setup>
const config = useRuntimeConfig(); const config = useRuntimeConfig();
const baseUrl = config.public.baseUrl
useHead({ useHead({
title: '*nix in Thailand', title: 'ติดต่อ',
titleTemplate: '%s',
meta: [ meta: [
{ property: 'og:type', content: 'website' } { name: 'description', content: 'ติดต่อเรา' },
{ property: 'og:type', content: 'article' }
] ]
}) })
</script> </script>
+15 -15
View File
@@ -4,16 +4,16 @@
<section class="hero-section"> <section class="hero-section">
<div class="container"> <div class="container">
<img class="brace" width="100" src="/brace-smile.svg"></img> <img class="brace" width="100" src="/brace-smile.svg"></img>
<h1 :id="t('home.hero.title').replace(/ /g, '_')" class="title">{{ t('home.hero.title') }}</h1> <h1 id="home-hero-title" class="title">สวสด<br/>นดอนรบส *nix in Thailand สาระคอมพวเตอรกคนสามารถเขาถงได</h1>
<p :id="t('home.hero.sub').replace(/ /g, '_')" class="subtitle">{{ t('home.hero.sub') }}</p> <p id="home-hero-sub" class="subtitle">นทสำหรบการซกถาม ยเล และเอกสารสาระคอมพวเตอราง โดยทเนนระบบ UNIX และ Unix-like ไมาจะเป GNU, Linux, macOS, Android, ฯลฯ</p>
</div> </div>
</section> </section>
<!-- <section class="page-section page-section-alt"> <section class="page-section page-section-alt">
<div class="container"> <div class="container">
<section class="section"> <section class="section">
<h2 class="title">{{ t('home.wiki.title') }}</h2> <h2 id="wiki" class="title">สารคอมพวเตอรเสร ()</h2>
<p>{{ t('home.wiki.paragraph') }}</p> <p id="wiki-desc">นยรวมความรซอฟตแวรและฮารดแวรคอมพวเตอร กคนสามารถสามารถแกไขได</p>
<UButton to="https://wiki.unix.in.th" :label="t('home.wiki.go')"/> <UButton to="https://wiki.unix.in.th" label="ไปที่วิกิ"/>
</section> </section>
<section class="section-img"> <section class="section-img">
<img class="aspect-[4/3]" src="/wiki-mac.png"></img> <img class="aspect-[4/3]" src="/wiki-mac.png"></img>
@@ -22,17 +22,17 @@
</section> </section>
<section class="page-section page-section-alt"> <section class="page-section page-section-alt">
<div class="container"> <div class="container">
<section class="section">
<h2 class="title">{{ t('home.forum.title') }}</h2>
<p>{{ t('home.forum.paragraph') }}</p>
<UButton to="https://forum.unix.in.th" :label="t('home.forum.go')"/>
</section>
<section class="section-img"> <section class="section-img">
<img class="aspect-[4/3]" src="/wiki-mac.png"></img> <img class="aspect-[4/3]" src="/forum-mac.png"></img>
</section>
<section class="section">
<h2 class="title">ลานประชาคม</h2>
<p>นทสอบถาม อภปราย และคยเล เกยวกบซอฟตแวรและฮารดแวร UNIX และ Unix-like</p>
<UButton to="https://forum.unix.in.th" disabled variant="subtle" label="ไปที่ลานประชาคม"/>
</section> </section>
</div> </div>
</section> --> </section>
<section class="page-section" :aria-labelledby="t('home.wiki.title').replace(/ /g, '_')" :aria-describedby="t('home.wiki.paragraph').replace(/ /g, '_')"> <!-- <section class="page-section" :aria-labelledby="t('home.wiki.title').replace(/ /g, '_')" :aria-describedby="t('home.wiki.paragraph').replace(/ /g, '_')">
<div class="container"> <div class="container">
<section class="section"> <section class="section">
<h2 :id="t('home.wiki.title').replace(/ /g, '_')" class="title">{{ t('home.wiki.title') }}</h2> <h2 :id="t('home.wiki.title').replace(/ /g, '_')" class="title">{{ t('home.wiki.title') }}</h2>
@@ -49,7 +49,7 @@
<UButton to="https://forum.unix.in.th" :label="t('home.forum.go')"/> <UButton to="https://forum.unix.in.th" :label="t('home.forum.go')"/>
</section> </section>
</div> </div>
</section> </section> -->
</article> </article>
</main> </main>
</template> </template>