From 428990dc00b73c5058eaa037b6e74eb155682ac6 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sun, 21 Nov 2021 13:15:15 +0100 Subject: [PATCH] front/home page: make first word of the title choosen at random in a list --- src/assets/views/home.svelte | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/assets/views/home.svelte b/src/assets/views/home.svelte index ac6c4c3..4dc7521 100644 --- a/src/assets/views/home.svelte +++ b/src/assets/views/home.svelte @@ -2,11 +2,19 @@ import {locals} from "../ts/stores"; import {route, hasRoute, hasAnyRoute} from "../../common/Routing"; import BaseTemplate from "./templates/BaseTemplate.svelte"; + import {onMount} from "svelte"; + + let randomTitleSWord = 'Svelte'; + const possibleSWords = ['Svelte', 'Simple', 'Scalable', 'Super', 'Structure', 'Satisfying']; + + onMount(() => { + randomTitleSWord = possibleSWords[Math.floor(Math.random() * possibleSWords.length)]; + });
-

swaf - Svelte Web Application Framework

+

swaf - {randomTitleSWord} Web Application Framework

Welcome to {$locals.app.name}!

{#if hasAnyRoute('tests', 'design')}