-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathside-overlay.html
66 lines (51 loc) · 1.82 KB
/
side-overlay.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link href="side-panels.css" rel="stylesheet">
<style>
body {
font-family: 'Lato', sans-serif;
}
</style>
</head>
<body>
<div id="myLeftNav" class="overlay-left">
<a href="javascript:void(0)" class="closebtn" onclick="closeLeftNav()">×</a>
<div class="overlay-left-content">
<a href="#">LEFT</a>
</div>
</div>
<div id="myRightNav" class="overlay-right">
<a href="javascript:void(0)" class="closebtn" onclick="closeRightNav()">×</a>
<div class="overlay-right-content">
<a href="#">RIGHT</a>
</div>
</div>
<div style="width: 100%">
<span style="font-size:30px;cursor:pointer" onclick="openLeftNav()">☰ Left</span>
<span style="font-size:30px;cursor:pointer;float: right;" onclick="openRightNav()"> Right ☰</span>
</div>
<div style="display:flex;
align-items:center;
justify-content:center;">
<button class="button bg-green-600 text-white w-20 h-10 rounded-md p-0">Pause</button>
</div>
<script>
function openLeftNav() {
document.getElementById("myLeftNav").style.width = "20%";
}
function closeLeftNav() {
document.getElementById("myLeftNav").style.width = "0%";
}
function openRightNav() {
document.getElementById("myRightNav").style.width = "20%";
document.getElementById("myRightNav").style.right = "0px";
}
function closeRightNav() {
document.getElementById("myRightNav").style.width = "0%";
}
</script>
</body>
</html>