-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
182 lines (160 loc) · 7.71 KB
/
index.html
File metadata and controls
182 lines (160 loc) · 7.71 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=resizes-content, viewport-fit=cover">
<title>GenQ</title>
<link rel="icon" href="img/qrandom.png" type="image/x-icon">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<!-- Styles -->
<link href="css/modern.css?1" rel="stylesheet">
<!-- Scripts -->
<script src="js/qrng/qrng.js?5"></script>
</head>
<body>
<!-- Particles background -->
<div id="particles-js"></div>
<!-- Toast notifications container -->
<div class="toast-container" id="toast-container"></div>
<div id="content-wrapper">
<main class="card">
<!-- Tabs Navigation -->
<nav class="tabs" role="tablist">
<button class="tab active" role="tab" aria-selected="true" data-tab="numbers">Numbers</button>
<button class="tab" role="tab" aria-selected="false" data-tab="choices">Choices</button>
<button class="tab" role="tab" aria-selected="false" data-tab="eight-ball">8-Ball</button>
<button class="tab" role="tab" aria-selected="false" data-tab="compass">Compass</button>
</nav>
<!-- Tab Panels -->
<div class="tab-panels">
<!-- Numbers Panel -->
<div id="numbers" class="tab-panel" role="tabpanel">
<form id="rng-form">
<div class="form-row">
<div class="form-group">
<label for="rng-min">Minimum</label>
<input id="rng-min" type="number" value="0">
</div>
<div class="form-group">
<label for="rng-max">Maximum</label>
<input id="rng-max" type="number" value="9">
</div>
</div>
<div class="result-container">
<span id="rng-result" class="result">-</span>
</div>
<div class="btn-group">
<button type="submit" class="btn btn-primary qrng">Generate Number</button>
</div>
</form>
</div>
<!-- Choices Panel -->
<div id="choices" class="tab-panel" role="tabpanel">
<form id="rcg-form">
<div class="form-group">
<label for="rcg-input">Enter Choice</label>
<input id="rcg-input" type="text" placeholder="Type something...">
</div>
<div class="btn-group">
<button type="submit" class="btn">Add</button>
<button type="button" id="rcg-clear-button" class="btn">Clear</button>
<button type="button" id="rcg-choose-button" class="btn btn-primary qrng">Choose</button>
</div>
<div id="rcg-choices" class="chips-container"></div>
</form>
</div>
<!-- 8-Ball Panel -->
<div id="eight-ball" class="tab-panel" role="tabpanel">
<div class="result-container">
<span id="eight-ball-result" class="result">?</span>
</div>
<div class="btn-group">
<button id="eight-ball-button" class="btn btn-primary qrng">Ask a Question...</button>
</div>
</div>
<!-- Compass Panel -->
<div id="compass" class="tab-panel" role="tabpanel">
<div class="compass-container">
<svg class="compass" viewBox="0 0 200 200">
<!-- Outer circle -->
<circle cx="100" cy="100" r="90" fill="none" stroke="currentColor" stroke-width="2" opacity="0.3"/>
<circle cx="100" cy="100" r="85" fill="none" stroke="currentColor" stroke-width="1" opacity="0.2"/>
<!-- Tick marks -->
<g class="compass-ticks" stroke="currentColor">
<!-- Generate ticks every 10 degrees, longer for cardinals -->
<line x1="100" y1="12" x2="100" y2="28" stroke-width="2"/> <!-- N -->
<line x1="100" y1="172" x2="100" y2="188" stroke-width="2"/> <!-- S -->
<line x1="172" y1="100" x2="188" y2="100" stroke-width="2"/> <!-- E -->
<line x1="12" y1="100" x2="28" y2="100" stroke-width="2"/> <!-- W -->
<!-- Ordinals (NE, SE, SW, NW) -->
<line x1="157" y1="43" x2="165" y2="35" stroke-width="1.5" opacity="0.7"/>
<line x1="157" y1="157" x2="165" y2="165" stroke-width="1.5" opacity="0.7"/>
<line x1="43" y1="157" x2="35" y2="165" stroke-width="1.5" opacity="0.7"/>
<line x1="43" y1="43" x2="35" y2="35" stroke-width="1.5" opacity="0.7"/>
<!-- Small ticks every 30 degrees -->
<line x1="150" y1="13.4" x2="146" y2="20.3" stroke-width="1" opacity="0.5"/>
<line x1="186.6" y1="50" x2="179.7" y2="54" stroke-width="1" opacity="0.5"/>
<line x1="186.6" y1="150" x2="179.7" y2="146" stroke-width="1" opacity="0.5"/>
<line x1="150" y1="186.6" x2="146" y2="179.7" stroke-width="1" opacity="0.5"/>
<line x1="50" y1="186.6" x2="54" y2="179.7" stroke-width="1" opacity="0.5"/>
<line x1="13.4" y1="150" x2="20.3" y2="146" stroke-width="1" opacity="0.5"/>
<line x1="13.4" y1="50" x2="20.3" y2="54" stroke-width="1" opacity="0.5"/>
<line x1="50" y1="13.4" x2="54" y2="20.3" stroke-width="1" opacity="0.5"/>
</g>
<!-- Cardinal labels -->
<g class="compass-labels" fill="currentColor" font-size="14" font-weight="600" text-anchor="middle">
<text x="100" y="45">N</text>
<text x="100" y="168">S</text>
<text x="160" y="104">E</text>
<text x="40" y="104">W</text>
</g>
<!-- Center dot -->
<circle cx="100" cy="100" r="4" fill="currentColor" opacity="0.5"/>
<!-- Needle -->
<g id="compass-needle" class="compass-needle">
<polygon points="100,30 94,100 100,90 106,100" fill="var(--accent)"/>
<polygon points="100,170 94,100 100,110 106,100" fill="currentColor" opacity="0.4"/>
</g>
</svg>
<div id="compass-degrees" class="compass-degrees">0°</div>
</div>
<div class="btn-group">
<button id="compass-button" class="btn btn-primary qrng">Spin</button>
</div>
</div>
</div>
</main>
<footer>
<a href="https://raw.githubusercontent.com/shitchell/QuantumChoice/master/LICENSE" target="_blank">wtfpl</a>
<span class="separator">|</span>
<a href="#" id="about-trigger">about</a>
<span class="separator">|</span>
<a href="#" id="theme-toggle">dark</a>
<span class="separator">|</span>
<a href="#" id="toggle-fs">fullscreen</a>
</footer>
</div>
<!-- About Modal (native dialog) -->
<dialog id="about-modal">
<div class="modal-content">
<h2>Quantum Random</h2>
<p>This tool was inspired by the <a href="https://www.reddit.com/r/randonauts/" target="_blank">randonaut subreddit</a> and powered by <a href="https://qrng.anu.edu.au/" target="_blank">Australian National University's quantum random number generator</a> using the <a href="https://github.com/shitchell/qrng" target="_blank">qrng.js</a> library.</p>
<h3>But why?</h3>
<p>Our world seems to be fairly deterministic, with each event being the result of all events before it—just like tipping over a domino sets into effect a cascade of falling dominoes. But the quantum world <em>seems</em> to be truly random, which allows us to sidestep determinism by taking quantum randomness from the micro and introducing it to the macro.</p>
<p>So escape the confines of determinism. Step outside your causal path. Make a quantum decision :)</p>
<h3>Why are buttons disabled?</h3>
<p>Sometimes ANU's quantum random number generator goes down :/ Since this tool relies on them, if they go down, this site is no longer functional. I intend to add more sources as soon as I add more sources.</p>
</div>
<div class="modal-footer">
<button class="btn" id="about-close">Close</button>
</div>
</dialog>
<!-- Scripts -->
<script src="js/particles.js"></script>
<script src="js/config.js?3"></script>
<script src="js/main.js?26"></script>
</body>
</html>