-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
129 lines (110 loc) · 2.7 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html>
<head>
<title>noma-timecode</title>
<script type="text/javascript" src="index.js"></script>
</head>
<body>
<style type="text/css">
html, body {
height: 100%;
width: 100%;
padding: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: space-around;
background: #181f29;
}
.w {
width: 50%;
margin: auto;
}
.timecode {
display: flex;
background-color: #181f29;
padding: 2px;
cursor: pointer;
}
.timecode div.hh,
.timecode div.mm,
.timecode div.ss,
.timecode div.drop,
.timecode div.ff {
margin: 2px;
border-right: 2px solid #181f29;
background-color: #232D3A;
color: #878E96;
height: 25px;
padding: 0px 3px;
line-height: 24px;
justify-content: center;
font-weight: 600;
letter-spacing: 2px;
display: flex;
flex-direction: row;
flex: 1 1;
min-width: 0px;
}
.timecode div.delimiter,
.timecode div.drop {
margin: 2px;
border-right: 2px solid #181f29;
background-color: #181f29;
color: #878E96;
height: 25px;
padding: 0px 3px;
line-height: 24px;
justify-content: center;
font-weight: 600;
letter-spacing: 2px;
display: flex;
flex-direction: row;
flex: 0 0;
min-width: 0px;
}
.timecode button {
cursor: pointer;
background: #232d3a;
border: none;
outline: none;
}
.timecode input {
border: 0px solid #181f29;
margin: 0px;
color: #CFD1D5;
padding: 6px;
background: #232D3A;
outline: none;
flex-grow: 1;
}
.timecode path {
stroke: #3BAAFF;
}
.log {
margin: 10px;
color: white;
text-align: center;
}
</style>
<title>noma-timecode</title>
<div class="w">
<noma-timecode id="tc0" timecode="01:01:01;01" class="timecode"></noma-timecode>
<noma-timecode id="tc1" timecode="12:12:12:120" class="timecode"></noma-timecode>
<noma-timecode id="tc2" timecode="00:59:59:00" class="timecode"></noma-timecode>
<div class="log">timecode event logs</div>
</div>
<script type="text/javascript">
var log = document.querySelector('.log');
var tc0 = document.querySelector('#tc0');
var tc1 = document.querySelector('#tc1');
var tc2 = document.querySelector('#tc2');
function l(evt) {
log.innerHTML = `timecode event triggered from #${evt.srcElement.id} with detail: ${evt.detail}<br>`;
}
tc0.addEventListener('timecode', l);
tc1.addEventListener('timecode', l);
tc2.addEventListener('timecode', l);
</script>
</body>
</html>