From a9fc542ddce09588ce92ea093cd4e271ea213458 Mon Sep 17 00:00:00 2001 From: Trirst <abeces968@gmail.com> Date: Fri, 29 Oct 2021 02:07:20 +0700 Subject: [PATCH] Tips --- src/routes/Home.svelte | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/routes/Home.svelte b/src/routes/Home.svelte index 84b15fc..5f79a47 100644 --- a/src/routes/Home.svelte +++ b/src/routes/Home.svelte @@ -1,3 +1,20 @@ +<script> + function getRandomInt(max) { + return Math.floor(Math.random() * max); + } + let tips = [ + "When searching images by tags, delimit each tag by a whitespace to match them inclusively", + "Good luck!", + "Stay strong!", + "A page includes at maximum 63 images", + ]; +</script> + <svelte:head> <title>Home</title> -</svelte:head> \ No newline at end of file +</svelte:head> + +<div class="min-h-screen flex justify-center items-center text-2xl"> + <strong class="mr-2">Tip:</strong> + {tips[getRandomInt(tips.length)]} +</div> -- GitLab