-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
184 lines (148 loc) · 4.13 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
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="https://blog.zgp.org/feed.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>polyhedral dice</title>
<meta name="description" content="Simple many-sided dice roller for role-playing games">
<link rel="manifest" href="/manifest.json">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" href="/favicon.ico">
<meta name="theme-color" content="#000">
<script defer src="dice.js"></script>
<style type="text/css" media="all">
<!--
:focus {outline:none;}
::-moz-focus-inner {border:0;}
body {
font-family: monospace;
background-color: black;
color: #6f6;
font-size: 14pt;
}
img {
width: 100%;
border: none;
}
main {
margin: auto;
max-width: 30rem;
padding: 1.2rem;
padding-top: 0.5rem;
}
#display {
text-align: right;
min-height: 6rem;
font-size: 100%;
}
#keypad {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
column-gap: 0.4ex;
row-gap: 0.4ex;
padding-top: 0.2ex;
}
#auto {
text-align: right;
font-weight: bold;
padding: 0px;
margin: 0px;
font-size: 70%;
}
button {
font-size: 120%;
background-color: #666;
color: white;
width: 100%;
padding-left: 0px;
padding-right: 0px
}
#keypad p {
display: none;
}
#keypad button.hnum {
display: none;
}
#help #keypad {
grid-template-columns: 1fr 4fr;
}
#help button {
max-width: 4em;
}
#help button.num {
display: none;
}
#help #keypad p {
display: block;
}
#help #keypad button.hnum {
display: block;
}
#keypad .dh {
grid-area: span 2 / span 1
}
button.dh {
padding-top: 2ex;
padding-bottom: 2ex;
}
#compact #keypad button.dw {
grid-area: span 1 / span 2;
}
.credits {
grid-area: span 1 / span 2;
}
.credits a {
color: inherit;
}
@media (min-height: 640px) {
button {
padding-top: 1ex;
padding-bottom: 1ex;
}
}
-->
</style>
</head>
<body>
<main>
<p id="auto">AUTO</p>
<img src="sword.png" alt="">
<header id="display">polyhedral dice</header>
<div id="compact">
<div id="keypad">
<button id="bh">?</button><p>Show/hide help.</p>
<button class="hnum" id="bn">0-9</button><p>Enter numbers 0-9. </p>
<button id="ba">auto</button><p>Toggle auto mode. In auto mode, the dice roll as soon as a valid dice expression
with standard dice is entered. You may have to turn this off to roll some kinds of non-standard dice.</p>
<button id="bs">#</button><p>Roll 6 ability scores (4d6, take top 3).</p>
<button id="bc">c</button><p>Clear the display.</p>
<button class="num" id="b7">7</button>
<button class="num" id="b8">8</button>
<button class="num" id="b9">9</button>
<button id="bx">d20</button><p>Roll 1d20. (keyboard shortcut: x)</p>
<button class="num" id="b4">4</button>
<button class="num" id="b5">5</button>
<button class="num" id="b6">6</button>
<button id="bp">d%</button><p>Roll 1d100 for a result of 1-100.</p>
<button class="num" id="b1">1</button>
<button class="num" id="b2">2</button>
<button class="num" id="b3">3</button>
<button id="br" class="dh">roll</button><p class="dh">If a valid dice expression is on the display, roll the dice.
You do not need to press this if you are rolling standard dice in auto mode.</p>
<button class="num" id="b0">0</button>
<button id="bd" class="dw">d</button><p>Separates the number of dice from the number of sides.
For example, enter 2d6 to roll two dice with six sides each.</p>
<p class="credits">Made by <a href="https://blog.zgp.org/">Don Marti</a>.<br>
<a href="https://github.com/dmarti/polyhedral-dice">Project page on GitHub</a>.<br>
<a href="https://www.findpwa.com/app/polyhedral-dice">Listing on findPWA</a>.</p>
<p class="credits">Icosahedron image based on: <a href="https://www.svgrepo.com/svg/221276/icosahedron">Free
Download Icosahedron 9 SVG vector file in
mono color type for Sketch or Illustrator</a>
from Sacred Geometry Vectors svg vector collection.
Licensing: Creative Commons BY 4.0</p>
</div><!-- keypad -->
</div><!-- compact -->
<div id="help"></div><!-- move keypad here to restyle it -->
</main></body>