Merge branch 'dynamic-info-section-list' into main branch for integration of i18n for home page sections

This commit is contained in:
jezzahehn 2025-05-20 18:01:41 -04:00
commit da604a14f6
10 changed files with 194 additions and 79 deletions

View file

@ -1,9 +1,48 @@
<template>
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/resources">Resources</RouterLink>
</nav>
<main>
<RouterView />
</main>
<div class="min-h-screen flex flex-col" style="gap: 4rem;"><!-- Main application wrapper -->
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/resources">Resources</RouterLink>
</nav>
<RouterView />
<section class="section">
<h1 class="title has-text-black p-6">BRÅTULA VIOSSA.NET MÅDE</h1>
</section>
<section class="section">
<HomeSectionWrapper
v-for="(section, index) in sectionList"
:key="index"
:title="section.title"
:text="section.text"
:image="section.image"
:alt="section.alt"
:reverse="index % 2 !== 0"
/>
</section>
</div>
</template>
<script lang="ts">
import PaddingWrapper from './components/molecules/PaddingWrapper.vue'
import IntroSection from './components/organisms/IntroSection.vue'
import HistorySection from './components/organisms/HistorySection.vue'
import './assets/style.scss'
import 'bulma/css/bulma.css'
export default {
name: 'app',
components: {
PaddingWrapper,
IntroSection,
HistorySection
},
data() {
return {
sectionList: ['IntroSection', 'HistorySection']
}
}
}
</script>

View file

@ -0,0 +1,48 @@
<template>
<div class="box my-6 px-4 py-5">
<div v-if="image" class="columns is-vcentered">
<template v-if="reverse">
<div class="column">
<h2 class="title is-4">{{ title }}</h2>
<p class="has-text-white">{{ text }}</p>
</div>
<div class="column is-one-quarter">
<figure class="image">
<img :src="image" :alt="alt" />
</figure>
</div>
</template>
<template v-else>
<div class="column is-one-quarter">
<figure class="image">
<img :src="image" :alt="alt" />
</figure>
</div>
<div class="column">
<h2 class="title is-4">{{ title }}</h2>
<p class="has-text-white">{{ text }}</p>
</div>
</template>
</div>
<div v-else class="is-vcentered">
<h2 class="title is-4">{{ title }}</h2>
<p class="has-text-white">{{ text }}</p>
</div>
</div>
</template>
<script setup lang="ts">
defineProps({
title: String,
text: String,
image: String,
alt: String,
reverse: Boolean,
})
</script>

View file

@ -1,34 +0,0 @@
<template>
<div class="columns is-vcentered">
<!-- Text Column (left 3/4) -->
<div class="column">
<h2 class="title is-4">Viossa's History</h2>
<p class="has-text-white">
Knock over christmas tree... If it fits i sits, jump five feet
high and sideways when a shadow moves, rub face on owner and
sometimes switches in french and say "miaou" just because well
why not. Good morning sunshine, pet a cat, rub its belly, endure
blood and agony, quietly weep, keep rubbing belly. Chase ball of
string stares at human while pushing stuff off a table ooooh
feather moving feather! jump up to edge of bath, fall in then
scramble in a mad panic to get out slap kitten brother with paw
for chase mice. Have a lot of grump in yourself because you
can't forget to be grumpy and not be like king grumpy cat
mmmmmmmmmeeeeeeeeooooooooowwwwwwww but cough furball into food
bowl then scratch owner for a new one. Scream at teh bath open
the door, let me out, let me out, let me-out, let me-aow, let
meaow, meaow!
</p>
</div>
<!-- Image Column (right 1/4) -->
<div class="column is-one-quarter">
<figure class="image">
<img
src="/src/assets/flakka.png"
alt="Flag of the Viossa Language"
/>
</figure>
</div>
</div>
</template>

View file

@ -1,37 +0,0 @@
<template>
<div class="columns is-vcentered">
<!-- Image Column (left 1/4) -->
<div class="column is-one-quarter">
<figure class="image">
<img
src="/src/assets/flakka.png"
alt="Flag of the Viossa Language"
/>
</figure>
</div>
<!-- Text Column (right 3/4) -->
<div class="column">
<h2 class="title is-4">What is Viossa?</h2>
<p class="has-text-white">
Cat ipsum dolor sit amet, be superior eats owners hair then
claws head gimme attention gimme attention gimme attention gimme
attention gimme attention gimme attention just kidding i don't
want it anymore meow bye. Avoid the new toy and just play with
the box it came in floof tum, tickle bum, jellybean footies
curly toes curl up and sleep on the freshly laundered towels
hiss and stare at nothing then run suddenly away. Need to check
on human, have not seen in an hour might be dead oh look, human
is alive, hiss at human, feed me attack the dog then pretend
like nothing happened jump on human and sleep on her all night
long be long in the bed, purr in the morning and then give a
bite to every human around for not waking up request food, purr
loud scratch the walls, the floor, the windows, the humans eat
prawns daintily with a claw then lick paws clean wash down
prawns with a lap of carnation milk then retire to the warmest
spot on the couch to claw at the fabric before taking a catnap
steal raw zucchini off kitchen counter...
</p>
</div>
</div>
</template>

14
src/i18n/index.ts Normal file
View file

@ -0,0 +1,14 @@
import { createI18n } from 'vue-i18n'
import en_US from '../locales/en_US'
import type { MessageSchema } from './types'
const i18n = createI18n<[MessageSchema], 'en_US'>({
legacy: false,
locale: 'en_US',
fallbackLocale: 'en_US',
messages: {
en_US: en_US
}
})
export default i18n

2
src/i18n/types.ts Normal file
View file

@ -0,0 +1,2 @@
import en_US from '../locales/en_US'
export type MessageSchema = typeof en_US

16
src/locales/en_US.ts Normal file
View file

@ -0,0 +1,16 @@
export default {
"sections": [
{
"title": "What is Viossa?",
"text": "Cat ipsum dolor sit amet, be superior eats owners hair then claws head gimme attention gimme attention gimme attention gimme attention gimme attention gimme attention just kidding i don't want it anymore meow bye. Avoid the new toy and just play with the box it came in floof tum, tickle bum, jellybean footies curly toes curl up and sleep on the freshly laundered towels hiss and stare at nothing then run suddenly away. Need to check on human, have not seen in an hour might be dead oh look, human is alive, hiss at human, feed me attack the dog then pretend like nothing happened jump on human and sleep on her all night long be long in the bed, purr in the morning and then give a bite to every human around for not waking up request food, purr loud scratch the walls, the floor, the windows, the humans eat prawns daintily with a claw then lick paws clean wash down prawns with a lap of carnation milk then retire to the warmest spot on the couch to claw at the fabric before taking a catnap steal raw zucchini off kitchen counter...",
"image": "/src/assets/flakka.png",
"alt": "Flag of the Viossa Language"
},
{
"title": "History of Viossa",
"text": "Knock over christmas tree... If it fits i sits, jump five feet high and sideways when a shadow moves, rub face on owner and sometimes switches in french and say \"miaou\" just because well why not. Good morning sunshine, pet a cat, rub its belly, endure blood and agony, quietly weep, keep rubbing belly. Chase ball of string stares at human while pushing stuff off a table ooooh feather moving feather! jump up to edge of bath, fall in then scramble in a mad panic to get out slap kitten brother with paw for chase mice. Have a lot of grump in yourself because you can't forget to be grumpy and not be like king grumpy cat mmmmmmmmmeeeeeeeeooooooooowwwwwwww but cough furball into food bowl then scratch owner for a new one. Scream at teh bath open the door, let me out, let me out, let me-out, let me-aow, let meaow, meaow!",
"image": "/src/assets/flakka.png",
"alt": "Flag of the Viossa Language"
}
]
}

View file

@ -5,5 +5,6 @@ import { createRouter, createWebHistory } from "vue-router";
import { routes } from "vue-router/auto-routes";
const router = createRouter({ history: createWebHistory(), routes: routes });
import i18n from './i18n'
createApp(App).use(router).mount("#app");
createApp(App).use(i18n).use(router).mount("#app");