-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
132 lines (115 loc) · 5.52 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
<html>
<head>
<meta charset="utf-8">
<title>GenQ</title>
<link rel="icon" href="/img/qrandom.png" type="image/x-icon">
<!-- Anonymous Pro font (for Hebrew chars) -->
<link href="https://fonts.googleapis.com/css?family=Anonymous+Pro&display=swap" rel="stylesheet">
<!-- Materialize -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- JQuery -->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<!-- Transit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.transit/0.9.12/jquery.transit.min.js"></script>
<!-- Local stuffs -->
<link href="css/particles.css?5" rel="stylesheet" />
<link href="css/main.css?17" rel="stylesheet" />
<script src="externals/qrng/qrng.js?2"></script>
<script src="js/main.js?23"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<!-- particles.js container -->
<div id="particles-js"></div>
<div id="content-wrapper" class="row valign-wrapper">
<header>
</header>
<main class="z-depth-1 col s12 m10 offset-m1">
<div class="row">
<div class="col s12">
<ul class="tabs transparent" id="rng-tabs">
<li class="tab col s4"><a href="#numbers">Numbers</a></li>
<li class="tab col s4"><a href="#choices">Choices</a></li>
<li class="tab col s4"><a href="#eight-ball">8-Ball</a></li>
</ul>
</div>
<!-- Generate a random number -->
<div id="numbers" class="col s12">
<form id="rng-form" action="#">
<div class="row s12">
<div class="input-field col s6">
<input id="rng-min" type="number" class="white-text" value="0">
<label for="rng-min">Minimum</label>
</div>
<div class="input-field col s6">
<input id="rng-max" type="number" class="white-text" value="9">
<label for="rng-max">Maximum</label>
</div>
</div>
<div class="row s12 center-align">
<div class="col s12 l2 offset-l5 center-align">
<h4 id="rng-result" class="z-depth-2 result-container">-</h4>
</div>
</div>
<div class="row center-align">
<button type="submit" class="qrng waves-effect waves-light btn-small">Generate Number</a>
</div>
</form>
</div>
<!-- Select from a list of choices (Random Choice Generator - rcg) -->
<div id="choices" class="col s12">
<form id="rcg-form" action="#">
<div class="row s12">
<div class="input-field col s12">
<input id="rcg-input" type="text" class="rcg-input white-text" />
<label for="rcg-input">Enter Choice...</label>
</div>
</div>
<div class="row center-align">
<button type="submit" class="btn-small waves-effect waves-light">Add</button>
<button id="rcg-clear-button" class="btn-small waves-effect waves-light">Clear</button>
<button id="rcg-choose-button" class="qrng waves-effect waves-light btn-small">Choose</button>
</div>
<div id="rcg-choices" class="row s12"></div>
</form>
</div>
<!-- 8-ball -->
<div id="eight-ball" class="col s12">
<div class="row center-align">
<button id="eight-ball-button" class="qrng btn-small waves-effect waves-light">Ask a Question...</button>
</div>
<div class="row center-align">
<h4 id="eight-ball-result" class="z-depth-2 result-container">?</h4>
</div>
</div>
</div>
</main>
<div id="about-modal" class="modal modal-fixed-footer">
<div class="modal-content">
<h5>Quantum Random</h5>
<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">qrng.js</a> library.</p>
<p>Using qrng.js to replace Math.random, every single random event on this webpage is based on quantum randomness, even the movement of the background particles!</p>
<h5>But why?</h5>
<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 <i>seems</i> 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>
<h5>Why are buttons disabled?</h5>
<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">
<a href="#!" class="modal-close waves-effect waves-green btn-flat">Close</a>
</div>
</div>
<footer>
<a target="_blank" href="https://raw.githubusercontent.com/shitchell/QuantumChoice/master/LICENSE" />wtfpl</a> |
<a href="#about-modal" class="modal-trigger">about</a> |
<a id="theme-toggle" href="#">dark</a> |
<a id="toggle-fs" href="#">fullscreen</a>
</footer>
</div>
<!-- particles.js lib and config -->
<script src="js/particles.js"></script>
<script src="js/config.js?3" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
</body>
</html>