forked from inofix/note-it-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-sketchboard.html
More file actions
106 lines (98 loc) · 1.81 KB
/
example-sketchboard.html
File metadata and controls
106 lines (98 loc) · 1.81 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
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
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<style>
/*
box-sizing model
https://css-tricks.com/box-sizing/
*/
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
/* custom styles */
html {
font-family: Helvetica, sans-serif;
}
body {
margin: 0;
}
.Site--navActive .Site-aside {
display: block;
}
.Site-aside {
display: none;
position: absolute;
overflow-x: scroll;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
background-color: khaki;
padding: 1.5rem;
margin: 1.5rem;
opacity: 0.95;
}
.Site-aside textarea {
width: 100%;
}
.Site-navigation {
position: fixed;
z-index: 2;
top: 0;
right: 0;
padding: 1rem;
margin: 1rem;
cursor: pointer;
background-color: cyan;
}
.Site-navigation:hover {
background-color: forestgreen;
}
#thesketchboard {
width: 100%;
min-height: 100vh;
position: relative;
}
#sketchboard {
padding: 1rem;
/* width + height + position are required */
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.handle {
cursor: pointer;
}
.dragable {
cursor: move;
}
</style>
</head>
<body class="Site">
<div>
<nav class="Site-navigation">
Menu
</nav>
<aside class="Site-aside">
<h1>Note it!</h1>
<p>You can export and import your work to JSON.</p>
<div id="sketchboardjson"></div>
<div id="sketchboardimages"></div>
</aside>
<div id="thesketchboard" class="Site-sketchboard">
<svg id="sketchboard"></svg>
</div>
</div>
</body>
<script src="./example-sketchboard-init.js"></script>
</html>