From 51bdbc12e70dfdaba3c93b2c947ec2ebb919a420 Mon Sep 17 00:00:00 2001 From: tree Date: Tue, 12 Apr 2022 21:06:54 +0200 Subject: [PATCH] update --- src/lib/Countdown.svelte | 59 +++++++++++++ src/lib/WordCloud.svelte | 19 +++-- src/lib/header/Header.svelte | 156 ++++++++++++++++++++++++++--------- src/routes/program.svelte | 39 +++++---- static/img/bg-header.jpg | Bin 0 -> 250041 bytes 5 files changed, 206 insertions(+), 67 deletions(-) create mode 100644 src/lib/Countdown.svelte create mode 100644 static/img/bg-header.jpg diff --git a/src/lib/Countdown.svelte b/src/lib/Countdown.svelte new file mode 100644 index 0000000..a41c336 --- /dev/null +++ b/src/lib/Countdown.svelte @@ -0,0 +1,59 @@ + + +
+ + {#each str as item} +
+ {item[0]} + {item[1]} +
+ {/each} +
diff --git a/src/lib/WordCloud.svelte b/src/lib/WordCloud.svelte index c4afcae..f62658d 100644 --- a/src/lib/WordCloud.svelte +++ b/src/lib/WordCloud.svelte @@ -33,7 +33,7 @@ export let maxRotate = 0; export let scheme = "schemeTableau10"; export let padding = 10; - export let backgroundColor = "#fff" + export let backgroundColor = "#fff"; // count max word occurence const maxWordCount = words.reduce((prev, cur) => @@ -77,7 +77,7 @@ .append("text") .style("font-size", (d) => d.size + "px") .style("font-family", font) - .style('fill', '#393F67') + .style("fill", "#393F67") //.style("fill", (_d, i) => fill(i)) .attr("text-anchor", "middle") .attr( @@ -95,14 +95,17 @@ onMount(async () => { layout.start(); }); - -
+
diff --git a/src/lib/header/Header.svelte b/src/lib/header/Header.svelte index 5fe52a9..e6faaa3 100644 --- a/src/lib/header/Header.svelte +++ b/src/lib/header/Header.svelte @@ -2,6 +2,7 @@ import { page } from "$app/stores"; import { bundle, userData, userDataLocal } from "$lib/stores"; import SocialButtons from "$lib/SocialButtons.svelte"; + import Countdown from "$lib/Countdown.svelte"; function logoClick() { userData.update((ud) => { @@ -11,56 +12,133 @@ } -
+
- + {/if}