front/home page: make first word of the title choosen at random in a list
This commit is contained in:
parent
c0918b17ed
commit
428990dc00
@ -2,11 +2,19 @@
|
|||||||
import {locals} from "../ts/stores";
|
import {locals} from "../ts/stores";
|
||||||
import {route, hasRoute, hasAnyRoute} from "../../common/Routing";
|
import {route, hasRoute, hasAnyRoute} from "../../common/Routing";
|
||||||
import BaseTemplate from "./templates/BaseTemplate.svelte";
|
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)];
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<BaseTemplate title="{$locals.app.name}" h1={false}>
|
<BaseTemplate title="{$locals.app.name}" h1={false}>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<h1>swaf - Svelte Web Application Framework</h1>
|
<h1>swaf - {randomTitleSWord} Web Application Framework</h1>
|
||||||
<p>Welcome to {$locals.app.name}!</p>
|
<p>Welcome to {$locals.app.name}!</p>
|
||||||
|
|
||||||
{#if hasAnyRoute('tests', 'design')}
|
{#if hasAnyRoute('tests', 'design')}
|
||||||
|
Loading…
Reference in New Issue
Block a user