-
Notifications
You must be signed in to change notification settings - Fork 0
/
about.svelte
67 lines (56 loc) · 1.35 KB
/
about.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
64
65
66
67
<script>
import { onDestroy, onMount } from 'svelte';
import { send, receive } from "crossfade";
import { fade } from 'svelte/transition';
let showSection = false;
let dummydata = 'testdata';
onMount(() => {
//trigger back to replicate issue
setTimeout(()=> {
window.history.back();
},1000);
//show some outter content
showSection = true;
//imagine ajax request here that re-inits showsect
setTimeout(()=> {
dummydata = 'testdata2';
showSection = true;
},1400);
});
onDestroy(() => {
//hide tiles
showSection = false;
});
</script>
<style>
.smrtr-article-wrapper {
padding: 15px 25px;
margin-top:0px;
animation-name: example;
animation-duration: 1s;
/*animation-delay: 0.2s;*/
animation-fill-mode: forwards;
opacity:0;
}
@keyframes example {
from {margin-top: 100px; opacity:0;}
to {margin-top: 0px; opacity:1;}
}
</style>
<svelte:head>
<title>about:: Article :: Atlas</title>
</svelte:head>
<section class="wrapper article">
<h1>
<span out:send="{{key: undefined}}" in:receive="{{key: undefined}}">ABOUT PAGE</span>
</h1>
{#if showSection}
<article class="smrtr-article-wrapper pageTransition" in:fade="{{delay: 200}}" out:fade>
<h1 class="article-main-title">teset</h1>
<h2 class="article-sub-title">test</h2>
<div class="article-introductory-paragraph">
{dummydata}
</div>
</article>
{/if}
</section>