-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
173 lines (164 loc) · 8.29 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<html lang="en">
<link href="main.css" rel="stylesheet" media="screen">
<link href="main.css" rel="stylesheet" media="print">
<head>
<link rel="manifest" href="./manifest.json">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="./icons/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="./icons/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="./icons/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="./icons/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="./icons/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="./icons/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="./icons/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="./icons/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="./icons/favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="./icons/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="./icons/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./icons/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="./icons/favicon-128.png" sizes="128x128" />
<meta name="application-name" content="Spell Templates"/>
<meta name="theme-color" content="#3B6182">
<meta name="msapplication-TileColor" content="#3B6182" />
<meta name="msapplication-TileImage" content="./icons/mstile-144x144.png" />
<meta name="msapplication-square70x70logo" content="./icons/mstile-70x70.png" />
<meta name="msapplication-square150x150logo" content="./icons/mstile-150x150.png" />
<meta name="msapplication-wide310x150logo" content="./icons/mstile-310x150.png" />
<meta name="msapplication-square310x310logo" content="./icons/mstile-310x310.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description" content="A Progressive Web App for aiming and calculating spell hits for Tabletop RPGs." />
<meta name="google-site-verification" content="OS3O_0Z8nmZA1XIHJNfOh2rYHONA1iLVs2Y5UhQsz5c" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-137706623-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-137706623-1');
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-137706623-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<noscript>
<h1>Sorry, this site requires JavaScript to run :(</h1>
</noscript>
<title>Sir Cinnamon's Spell Templates</title>
</head>
<body style="background: #835C3B;">
<div id="settingsButtonDiv">
<img id="settingsButton" src="./icons/menu/icons8-settings.png" alt="settings" draggable="false"></img>
</div>
<div id="settingsOverlay"></div>
<div id="settingsDiv">
<div class="header"><button id="settingsCloseButton">X</button></div>
<div class="content">
<table>
<tbody>
<tr>
<td><label id="hit_threshold_lbl_1">Hit Threshold:</label></td>
<td><label class="hit-threshold output" id="hit_threshold_lbl_2">50</label><label>%</label></td>
</tr>
<tr>
<td colspan=2><input type="range" name="hit-threshold" min="1" max="100" value=50 class="slider hit-threshold input setting" aria-labelledby="hit_threshold_lbl_1 hit_threshold_lbl_2"></td>
</tr>
<tr style="display:none;">
<td><label>Tile Size:</label></td>
<td><label class="tile-size output">30</label><label>px</label></td>
</tr>
<tr style="display:none;">
<td colspan=2><input type="range" name="tile-size" min="20" max="70" step="10" value=30 class="slider tile-size input setting"></td>
</tr>
<tr>
<td><label id="template_snapping_lbl">Snap to Grid:</label></td>
<td class="checkbox-cell"><input type="checkbox" name="template-snapping" class="template-snapping input setting" aria-labelledby="template_snapping_lbl"><span class="checkmark" /></td>
</tr>
<tr>
<td><label id="rounded_cone_lbl">Rounded Cone:</label></td>
<td class="checkbox-cell"><input type="checkbox" name="rounded-cone" class="rounded-cone input setting" aria-labelledby="rounded_cone_lbl"><span class="checkmark" /></td>
</tr>
<tr>
<td colspan=2><button id="export_btn" onclick="export_state()">Export</button><input id="export_tb" readonly type="text" placeholder="Press Export..." onclick="copy_value(this)" aria-label="Exported Url"></input></td>
</tr>
<tr>
<td colspan=2>
<label>Theme:</label>
</td>
</tr>
<tr>
<td colspan=2>
<label class="radioContainer">Default
<input class="setting themeselector" type="radio" name="theme" value="theme1" checked>
<span class="radio"></span>
</label>
<label class="radioContainer">Black+White
<input class="setting themeselector" type="radio" name="theme" value="theme2">
<span class="radio"></span>
</label>
<label class="radioContainer">Grassy
<input class="setting themeselector" type="radio" name="theme" value="theme3">
<span class="radio"></span>
</label>
<label class="radioContainer">Bubblegum
<input class="setting themeselector" type="radio" name="theme" value="theme4">
<span class="radio"></span>
</label>
</td>
</tr>
</tbody>
</table>
<button id="reset_btn" onclick="reset_settings()">Default Settings</button>
<button id="clear_btn" onclick="clear_state()">Clear Board</button>
</div>
<div class="footer">
<label class="credits">
<a href='https://ko-fi.com/G2G2CAK2'>Ko-fi</a> • <a href='https://github.com/sircinnamon/SpellTemplates'>Github</a><br>
Created by Sir Cinnamon<br>
Icons from <a href="https://icons8.com/">Icons8</a>
</label>
</div>
</div>
<main>
<div id="canvasDiv" style="background: tan;">
<canvas id="canvasTiles" width="150px" height="150px"></canvas>
<canvas id="canvasUnits" width="150px" height="150px"></canvas>
<canvas id="canvasGrid" width="150px" height="150px"></canvas>
<canvas id="canvasTemplate" width="150px" height="150px"></canvas>
</div>
</main>
<div id="toolbarDiv">
<div id="toolbarBtnDiv" style="background-color: #3B6182;">
<div>
<img id="decrementTemplateSize" src="./icons/menu/icons8-minus.png" alt="-" draggable="false"></img>
<label id="templateSizeLabel">15ft</label>
<img id="incrementTemplateSize" src="./icons/menu/icons8-add.png" alt="+" draggable="false"></img>
</div>
<div>
<svg id="placeUnitsShape" viewBox="0 0 300 300">
<polygon id="unitsShape4" points="150,15 15,150 150,285 285,150" fill="white" style="opacity:0;"/>
<polygon id="unitsShape6" points="300,150 225,280 75,280 0,150 75,20 225,20" fill="white" style="opacity:0;"/>
<circle id="unitsShape0" cx="150" cy="150" r="120" fill="white" style="opacity:0;"/>
</svg>
<img id="placeUnitsButton" src="./icons/menu/icons8-man.png" alt="Man" draggable="false"></img>
</div>
<div>
<img id="coneTemplateButton" src="./icons/menu/icons8-triangle.png" alt="Cone" draggable="false"></img>
<img id="circleTemplateButton" src="./icons/menu/icons8-circle.png" alt="Circle" draggable="false"></img>
<img id="lineTemplateButton" src="./icons/menu/icons8-arrow.png" alt="Line" draggable="false"></img>
</div>
</div>
</div>
<script>
if('serviceWorker' in navigator) {
navigator.serviceWorker
.register('./sw.js')
.then(function() { console.log("Service Worker Registered"); });
}
</script>
</body>
<script language="JavaScript" type="text/javascript" src="./js/main.min.js"></script>
</html>