-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.svelte
63 lines (51 loc) · 1.02 KB
/
index.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<script>
import { stores } from "@sapper/app";
import successkid from 'images/successkid.jpg';
const { session, page } = stores();
page.subscribe((p) => {
console.debug('[index.svelte, page.subscribe] called');
})
setTimeout(() => {
session.update((s) => {
console.debug('[index.svelte, session.update] called');
return {...s}
})
}, 1000)
</script>
<style>
h1, figure, p {
text-align: center;
margin: 0 auto;
}
h1 {
font-size: 2.8em;
text-transform: uppercase;
font-weight: 700;
margin: 0 0 0.5em 0;
}
figure {
margin: 0 0 1em 0;
}
img {
width: 100%;
max-width: 400px;
margin: 0 0 1em 0;
}
p {
margin: 1em auto;
}
@media (min-width: 480px) {
h1 {
font-size: 4em;
}
}
</style>
<svelte:head>
<title>Sapper project template</title>
</svelte:head>
<h1>Great success!</h1>
<figure>
<img alt="Success Kid" src="{successkid}">
<figcaption>Have fun with Sapper!</figcaption>
</figure>
<p><strong>Try editing this file (src/routes/index.svelte) to test live reloading.</strong></p>