diff --git a/apps/vdn-static/src/components/pages/HomePage.vue b/apps/vdn-static/src/components/pages/HomePage.vue index 9dc89c8..fc406ff 100644 --- a/apps/vdn-static/src/components/pages/HomePage.vue +++ b/apps/vdn-static/src/components/pages/HomePage.vue @@ -1,19 +1,20 @@ - BRÅTULA VIOSSA.NET MÅDE - - Hadjiplas per lera para Viossa – glossa fu vi - + {{ greeting.title }} + {{ greeting.subtitle }} diff --git a/apps/vdn-static/src/i18n/greeting.ts b/apps/vdn-static/src/i18n/greeting.ts new file mode 100644 index 0000000..dd4cae5 --- /dev/null +++ b/apps/vdn-static/src/i18n/greeting.ts @@ -0,0 +1,15 @@ +export interface Greeting { + title: string; + subtitle: string; +} + +export const GREETINGS = [ + { + title: "BRÅTULA VIOSSA.NET MÅDE", + subtitle: "Hadjiplas per lera para Viossa – glossa fu vi", + }, + { + title: "akka po viossa.net!", + subtitle: "kenomasufobo o gen wi tropos o viosox", + }, +] as const satisfies Greeting[]; diff --git a/apps/vdn-static/src/utils/random.ts b/apps/vdn-static/src/utils/random.ts new file mode 100644 index 0000000..9c629bb --- /dev/null +++ b/apps/vdn-static/src/utils/random.ts @@ -0,0 +1,13 @@ +export function randomMaybeElement( + elements: Elements, +): Elements[number] | undefined { + const index = Math.floor(Math.random() * elements.length); + return elements[index]; +} + +export function randomElement( + elements: Elements, +): Elements[number] { + // SAFETY: because there is always at least one element, undefined will never be returned + return randomMaybeElement(elements) as Elements[number]; +}