-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
100 lines (90 loc) · 3.63 KB
/
index.html
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
layout: default
title: suno pi toki pona
description: day of toki pona 2023
image: /assets/sitelen/suno.png
favicon: suno.ico
color: "#3584e4"
---
<main style="align-items: center">
<img src="/assets/sitelen/suno-2023.svg" style="width: 100%" alt="suno pi toki pona: toki pona day 2023"/>
<div class="container w-40">
<div id="until"></div>
<div class="dates">
<span class="date" data-value="1691213220">5 Aug 05:27 UTC</span>
-
<span class="date" data-value="1691299620">6 Aug 05:27 UTC</span>
</div>
<div>
<p>toki, jan ale o! suno pi toki pona li kama!</p>
<p>this year, toki pona day will be from <span class="date" data-value="1691213220">5 Aug 05:27 UTC</span> to <span class="date" data-value="1691299620">6 Aug 05:27 UTC</span>, on a weekend. well, what is toki pona day?</p>
<p>suno pi toki pona, also known as toki pona day, is a yearly toki pona event held on ma pona pi toki pona, started in 2021. on this day (a whole 24 hours of it!), we come together to celebrate toki pona and the community :) (we are moving it forward this year so that it can be on a weekend, where everyone is free.)</p>
<p>the event consists of a main track show, 24-hour stream in one of the discord voice channels in ma pona pi toki pona, mirrored on various other platforms such as youtube and twitch, filled with performances, talks, games, and presentations. take a look at the <a href="https://suno.pona.la/2023/tenpo">schedule for 2023</a>!</p>
<p>a more condensed version of the schedule can be found <a href="https://suno.pona.la/assets/schedule/2023.png">here</a>, if you want to see everything at a glance.</p>
<p>hope you're excited for toki pona day!</p>
</div>
<div class="inline-center">
{% include discord.html %}
{% include mastodon.html %}
{% include youtube.html link="https://www.youtube.com/watch?v=boT-mLyNzoo" %}
{% include twitch.html %}
</div>
<script>
var elements = document.getElementsByClassName("date");
Array.from(elements).forEach(function(element) {
var date = new Date(element.dataset.value*1000);
var string = new Intl.DateTimeFormat('en-GB', { dateStyle: 'medium', timeStyle: 'long' });
element.innerHTML = string.format(date).replace(/(2023, |:00)/g, "");
});
function display_time(diff) {
var until = document.getElementById("until");
until.innerHTML = "";
var month = Math.floor(diff/(60 * 60 * 24 * 30 * 1000));
if (month == 1) {
until.innerHTML += `${month} month `;
} else if (month > 1) {
until.innerHTML += `${month} months `;
}
var day = Math.floor(diff/(60 * 60 * 24 * 1000)) - month * 30;
if (day == 1) {
until.innerHTML += `${day} day `;
} else if (day > 1) {
until.innerHTML += `${day} days `;
} else if (month == 0) {
if (hour > 0) {
until.innerHTML += `${hour}:`;
}
var hour = Math.floor(diff/(60 * 60 * 1000)%60);
if (hour > 0) {
until.innerHTML += `${hour}:`;
}
var minute = Math.floor(diff/(60 * 1000)%60);
if (hour > 0 || minute > 0) {
if(minute < 10)
minute = "0" + minute;
until.innerHTML += `${minute}:`;
}
var second = Math.floor(diff/1000%60);
if(second < 10)
second = "0" + second;
until.innerHTML += second;
}
until.innerHTML += " left";
}
function countdown() {
var until = document.getElementById("until");
var now = new Date();
var start = new Date(1691213220 * 1000);
var end = new Date(1691299620 * 1000);
if (start > now) {
display_time(start.getTime() - now.getTime());
} else if (end > now) {
display_time(end.getTime() - now.getTime());
} else {
until.innerHTML = "";
}
}
setInterval(countdown, 1000);
</script>
</div>
</main>