This repository has been archived by the owner on Dec 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
01.countdown.html
55 lines (49 loc) · 1.75 KB
/
01.countdown.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Countdown – Talkie demo 01</title>
<!-- stylesheet -->
<link rel="stylesheet" type="text/css" href="../talkie.css">
<!-- /stylesheet -->
<!-- scripts -->
<script src="../lib/d3.v3.js"></script>
<script src="../talkie-1.0.js"></script>
<!-- /scripts -->
<style>
body { background: white; font-family: Helvetica, Arial, sans-serif; }
#wrapper { width: 800px; margin: auto; position: relative; }
#controls { width: 790px; padding: 0 5px; }
#controls audio { width: 100%; }
#display { width: 100%; height: 450px; text-align: center; font-size: 526px; line-height: 450px; }
#display #big-number { vertical-align: middle; position: relative; top: -50px; font-weight: bold; }
</style>
</head>
<body id="example-01-countdown">
<div id="wrapper">
<div id="display">
<span id="big-number">5</span>
</div>
<div id="controls">
<audio id="soundtrack" controls="controls">
<!-- audio -->
<source src="audio/01.countdown.ogg" type="audio/ogg">
<source src="audio/01.countdown.mp3" type="audio/mpeg">
<!-- /audio -->
</audio>
</div>
</div>
<script>
var number = Talkie.animate().select("#big-number");
var timeline = Talkie.timeline("#soundtrack", {
"0:01": number.text("4"),
"0:02": number.text("3"),
"0:03": number.text("2"),
"0:04": number.text("1"),
"0:05": number.style("font-size", "12px").text("✺")
.style({"font-size": "576px", "color": "#F83195"}, 500)
});
Talkie.ui.playButton("#wrapper", timeline);
</script>
</body>
</html>