-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
60 lines (52 loc) · 1.62 KB
/
test.html
File metadata and controls
60 lines (52 loc) · 1.62 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TV Controller Test</title>
<style>
.box {
width: 100px;
height: 100px;
margin: 10px;
display: inline-block;
border: 1px solid #ccc;
background-color: #eee;
}
.tv-focused {
border: 3px solid red;
background-color: #fcc;
animation: ease;
transition: 100ms;
transform: scale(1.2, 1.2);
}
</style>
</head>
<body>
<h1>TV Controller Test</h1>
<h2>This is tv-controller elements</h2>
<div>
<div id="box1" class="box" tv-focus="true" tv-focused="console.log('Focused Box 1')"
tv-enter="alert('Enter on Box 1')" tv-back="console.log('Back on Box 1')">
Box 1
</div>
<div id="box2" class="box" tv-focus="true" tv-focused="console.log('Focused Box 2')"
tv-enter="console.log('Enter on Box 2')" tv-back="console.log('Back on Box 2')">
Box 2
</div>
<div id="box3" class="box" tv-focus="true" tv-focused="console.log('Focused Box 3')">
Box 3
</div>
</div>
<h2>This is NoN tv-controller elements</h2>
<div>
<div class="box" tv-focus="false"></div>
<div class="box" tv-focus="false"></div>
</div>
<script type="module">
import { tvController } from './dist/index.js';
console.log("Initializing tvController...");
tvController().init();
</script>
</body>
</html>