Merge branch 'dynamic-info-section-list' into main branch for integration of i18n for home page sections
This commit is contained in:
commit
da604a14f6
10 changed files with 194 additions and 79 deletions
65
package-lock.json
generated
65
package-lock.json
generated
|
|
@ -13,6 +13,7 @@
|
||||||
"bulma": "^1.0.4",
|
"bulma": "^1.0.4",
|
||||||
"tailwindcss": "^4.1.6",
|
"tailwindcss": "^4.1.6",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
|
"vue-i18n": "^11.1.3",
|
||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
@ -740,6 +741,50 @@
|
||||||
"url": "https://github.com/sponsors/nzakas"
|
"url": "https://github.com/sponsors/nzakas"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@intlify/core-base": {
|
||||||
|
"version": "11.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-11.1.3.tgz",
|
||||||
|
"integrity": "sha512-cMuHunYO7LE80azTitcvEbs1KJmtd6g7I5pxlApV3Jo547zdO3h31/0uXpqHc+Y3RKt1wo2y68RGSx77Z1klyA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@intlify/message-compiler": "11.1.3",
|
||||||
|
"@intlify/shared": "11.1.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/kazupon"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@intlify/message-compiler": {
|
||||||
|
"version": "11.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-11.1.3.tgz",
|
||||||
|
"integrity": "sha512-7rbqqpo2f5+tIcwZTAG/Ooy9C8NDVwfDkvSeDPWUPQW+Dyzfw2o9H103N5lKBxO7wxX9dgCDjQ8Umz73uYw3hw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@intlify/shared": "11.1.3",
|
||||||
|
"source-map-js": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/kazupon"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@intlify/shared": {
|
||||||
|
"version": "11.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-11.1.3.tgz",
|
||||||
|
"integrity": "sha512-pTFBgqa/99JRA2H1qfyqv97MKWJrYngXBA/I0elZcYxvJgcCw3mApAoPW3mJ7vx3j+Ti0FyKUFZ4hWxdjKaxvA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/kazupon"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@isaacs/fs-minipass": {
|
"node_modules/@isaacs/fs-minipass": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
|
||||||
|
|
@ -5292,6 +5337,26 @@
|
||||||
"eslint": "^8.57.0 || ^9.0.0"
|
"eslint": "^8.57.0 || ^9.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vue-i18n": {
|
||||||
|
"version": "11.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-11.1.3.tgz",
|
||||||
|
"integrity": "sha512-Pcylh9z9S5+CJAqgbRZ3EKxFIBIrtY5YUppU722GIT65+Nukm0TCqiQegZnNLCZkXGthxe0cpqj0AoM51H+6Gw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@intlify/core-base": "11.1.3",
|
||||||
|
"@intlify/shared": "11.1.3",
|
||||||
|
"@vue/devtools-api": "^6.5.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/kazupon"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vue-router": {
|
"node_modules/vue-router": {
|
||||||
"version": "4.5.1",
|
"version": "4.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.5.1.tgz",
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
"bulma": "^1.0.4",
|
"bulma": "^1.0.4",
|
||||||
"tailwindcss": "^4.1.6",
|
"tailwindcss": "^4.1.6",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
|
"vue-i18n": "^11.1.3",
|
||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
43
src/App.vue
43
src/App.vue
|
|
@ -1,9 +1,48 @@
|
||||||
<template>
|
<template>
|
||||||
|
<div class="min-h-screen flex flex-col" style="gap: 4rem;"><!-- Main application wrapper -->
|
||||||
<nav>
|
<nav>
|
||||||
<RouterLink to="/">Home</RouterLink>
|
<RouterLink to="/">Home</RouterLink>
|
||||||
<RouterLink to="/resources">Resources</RouterLink>
|
<RouterLink to="/resources">Resources</RouterLink>
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
|
||||||
<RouterView />
|
<RouterView />
|
||||||
</main>
|
|
||||||
|
<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>
|
</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>
|
||||||
|
|
|
||||||
48
src/components/molecules/HomeSectionWrapper.vue
Normal file
48
src/components/molecules/HomeSectionWrapper.vue
Normal 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>
|
||||||
|
|
@ -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>
|
|
||||||
|
|
@ -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
14
src/i18n/index.ts
Normal 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
2
src/i18n/types.ts
Normal 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
16
src/locales/en_US.ts
Normal 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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -5,5 +5,6 @@ import { createRouter, createWebHistory } from "vue-router";
|
||||||
import { routes } from "vue-router/auto-routes";
|
import { routes } from "vue-router/auto-routes";
|
||||||
|
|
||||||
const router = createRouter({ history: createWebHistory(), routes: 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");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue