-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (55 loc) · 1.3 KB
/
index.html
File metadata and controls
55 lines (55 loc) · 1.3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
background-color: black;
}
.data {
color: white;
}
.hint {
color: #cccccc;
font-size: 14px;
}
.controls {
margin-top: 8px;
}
button {
cursor: pointer;
}
</style>
<title>2tabs</title>
</head>
<body>
<div class="data">
<h2>hi</h2>
<p class="position">0</p>
<p class="hint">
Open this page in two tabs/windows. This view reacts to the other tab's
window position. Use restart to reset both.
</p>
<div class="controls">
<button
onclick="localStorage.removeItem('tab1');localStorage.removeItem('tab2');window.location.reload();"
>
restart
</button>
<button onclick="window.toggleTheme && window.toggleTheme()">
switch theme
</button>
</div>
</div>
<canvas id="canvas" width="1400" height="780"></canvas>
<script src="./main.js"></script>
</body>
</html>