Skip to content

Commit

Permalink
fx(ceremony): add component to save it and remove h1
Browse files Browse the repository at this point in the history
  • Loading branch information
Swepool committed Sep 16, 2024
1 parent 7bad6a7 commit cfd3145
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
31 changes: 31 additions & 0 deletions ceremony/src/lib/components/Blink.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<script lang="ts">
import H1 from "$lib/components/typography/H1.svelte"
let eye = $state("0")
let blinkInterval: number | NodeJS.Timeout
function blinkEye() {
eye = "-"
setTimeout(() => {
eye = "0"
}, 100)
}
function startRandomBlinking() {
blinkInterval = setInterval(() => {
if (Math.random() < 0.05) {
blinkEye()
}
}, 200)
}
$effect(() => {
startRandomBlinking()
return () => {
clearInterval(blinkInterval)
}
})
</script>

<H1 class="!text-union-accent-500">{eye}_______{eye}</H1>
2 changes: 0 additions & 2 deletions ceremony/src/lib/components/Counter/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// import Text from "$lib/components/typography/Text.svelte"
import H2 from "$lib/components/typography/H2.svelte"
import H3 from "$lib/components/typography/H3.svelte"
import H1 from "$lib/components/typography/H1.svelte"
type Props = {
targetTimestamp: number
Expand Down Expand Up @@ -62,7 +61,6 @@ $effect(() => {
</script>

<div class="flex flex-col h-svh items-center justify-center gap-3">
<H1></H1>
<H2>Ceremony set to begin</H2>
<H3>2024-09-20 | <span class="text-union-accent-500">10:00 AM</span> (CET)</H3>
<div class="flex gap-2 justify-center">
Expand Down

0 comments on commit cfd3145

Please sign in to comment.