-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
74 lines (60 loc) · 1.54 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Tiny Drawer</title>
<link rel="stylesheet" href="assets/css/dist/tinyDrawer.min.css">
<style>
body {
padding: 0;
margin: 0;
}
.whitespace {
height: 3000px;
background: #eee;
background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}
.btn-open,
.btn-close {
font-family: arial;
padding: .5rem 2rem;
display: inline-block;
margin: 1rem;
cursor: default;
user-select: none;
}
.btn-open {
background: #eee;
}
.btn-close {
background: #ddd;
}
.menu {
font-family: Arial, Helvetica, sans-serif;
color: #222;
padding: 1rem;
box-sizing: border-box;
}
</style>
</head>
<body>
<drawer-menu class="menu">
Some menu contents<div data-drawer-close class="btn-close">Close</div>
<button onclick="tinyDrawerClose(event)">tinyDrawerClose()</button>
</drawer-menu>
<button onclick="tinyDrawerOpen(event)">tinyDrawerOpen()</button>
<div data-drawer-open class="btn-open">Menu</div>
<div class="whitespace"></div>
<div data-drawer-open class="btn-open">Menu</div>
<script src="assets/js/dist/tinyDrawer.min.js"></script>
<script>
tinyDrawer({
callback: function(element, action) {
console.log(element);
console.log(action);
}
});
</script>
</body>
</html>