-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
101 lines (88 loc) · 3.22 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
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Tick Example Preset</title>
<link rel="stylesheet" href="../dist/core/tick.core.min.css" />
<link rel="stylesheet" href="../dist/view-swap/tick.view.swap.min.css" />
</head>
<body>
<!-- START OF TICK EXAMPLE PRESET -->
<style>
.tick {
font-size: 1rem;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans,
Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}
.tick-label {
font-size: 0.375em;
text-align: center;
}
.tick-group {
margin: 0 0.25em;
text-align: center;
}
.tick-value {
font-variant-numeric: tabular-nums;
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
font-family: Tahoma, Geneva, Verdana, sans-serif;
}
</style>
<div class="tick" data-did-init="handleTickInit">
<div
data-repeat="true"
data-layout="horizontal center fit"
data-transform="preset(d, h, m, s) -> delay"
>
<div class="tick-group">
<div
data-key="value"
data-repeat="true"
data-transform="pad(00) -> split -> delay"
>
<span class="tick-value" data-view="swap"></span>
</div>
<span data-key="label" data-view="text" class="tick-label"></span>
</div>
</div>
</div>
<script>
function handleTickInit(tick) {
// Uncomment to set labels to different language ( in this case Dutch )
/*
var locale = {
YEAR_PLURAL: 'Jaren',
YEAR_SINGULAR: 'Jaar',
MONTH_PLURAL: 'Maanden',
MONTH_SINGULAR: 'Maand',
WEEK_PLURAL: 'Weken',
WEEK_SINGULAR: 'Week',
DAY_PLURAL: 'Dagen',
DAY_SINGULAR: 'Dag',
HOUR_PLURAL: 'Uren',
HOUR_SINGULAR: 'Uur',
MINUTE_PLURAL: 'Minuten',
MINUTE_SINGULAR: 'Minuut',
SECOND_PLURAL: 'Seconden',
SECOND_SINGULAR: 'Seconde',
MILLISECOND_PLURAL: 'Milliseconden',
MILLISECOND_SINGULAR: 'Milliseconde'
};
for (var key in locale) {
if (!locale.hasOwnProperty(key)) { continue; }
tick.setConstant(key, locale[key]);
}
*/
var nextYear = new Date().getFullYear() + 1;
Tick.count.down(nextYear + '-01-01').onupdate = function (value) {
tick.value = value;
};
}
</script>
<!-- END OF TICK EXAMPLE PRESET -->
<script src="../dist/view-swap/tick.view.swap.global.min.js"></script>
<script src="../dist/core/tick.core.kickstart.min.js"></script>
</body>
</html>