Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
<script>
import { tweened } from 'svelte/motion';
let original = 5 * 60; // TYPE NUMBER OF SECONDS HERE
let timer = tweened(original)

// ------ dont need to modify code below
import Typewriter from "svelte-typewriter";
setInterval(() => {
if ($timer > 0) $timer--;
}, 1000);

$: minutes = Math.floor($timer / 60);
$: minname = minutes > 1 ? "mins" : "min";
$: seconds = Math.floor($timer - minutes * 60)
</script>

<main>
<div class="flex">

<img src="https://sveltesociety.dev/logo.svg" alt="logo" width="100" />
<div class="title">SVELTE SOCIETY DAY</div>
</div>

{#if timer < 1}
<Typewriter loop>
<h1>Starting soon....</h1>
</Typewriter>
{:else}
<h1>We will be back in <span class="mins">{minutes}</span>{minname}
<span class="secs">{seconds}</span>s!</h1>
<progress value={$timer/original}></progress>
{/if}
<!-- feel free to modify this text!! -->
<ul>
<li>
loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */