-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
148 lines (139 loc) · 4.22 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
<html>
<head>
<title>NAEQ</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="favicon.png" type="image/png" sizes="16x16">
</head>
<body style="opacity:0">
<noscript>JavaScript Required</noscript>
<div class="top" id="head">
<form onsubmit="return false;"><input type="text" id="input" placeholder="Input Test Phrase" spellcheck="false" autofocus></form>
<dl>
<div><dt>NAEQ Sum</dt><dd id="result">0</dd></div>
<hr>
<div><dt>Matches</dt><dd id="count">0</dd></div>
<div class="out"><strong>Results</strong><div><ol id="match">N/A</ol></div></div>
</dl>
<nav>
<a href="about">? <span>What is This</span></a>
<a href="https://liminalroom.com/"><i>Q</i> <span>Liminal Room</span></a>
</nav>
</div>
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<style>
html { overflow-y:scroll; font-family:Lato; }
html, body { margin:0; padding:0; animation:fade-in 800ms normal forwards; position:relative; background:#fff; }
html, input { font-size:18px; font-family:Lato; transition:background 200ms ease-in; background:#fff; }
input:focus, input:hover { outline:none; background:#eee; }
hr { clear:both; margin: 36px -8px 10px; padding:0; background:#000; border:0; height:1px; }
input, dl { width:96%; padding:2%; border-radius:6px; border-width:1px; }
input { width:100%; padding: 10px 17px; border-style:solid; -webkit-appearance:none; z-index:100; border:1px solid #000; }
dd, dt { width:49%; float:left; margin:0; display:block; }
dd { text-align:right; }
ol { text-align:center; color:#666; padding:0; margin-top:14px; cursor:text; }
li:hover, li:focus-within { border-color:#aaa; cursor:; }
div { clear:both; }
nav { position:fixed; bottom:40px; z-index:100; text-align:right; user-select: none; }
nav a:hover, nav a:focus { background:#eee; }
nav a span { padding-left:12px; }
i { font-style:initial; vertical-align:2px; }
strong { font-weight: 100; padding-bottom: 4px; border-bottom: 1px solid #000; line-height: 60px; }
::selection { background:rgba(0,0,0,255); color:#fff; }
nav a {
display:inline-block;
width:18px;
width:150px;
border:1px solid #000;
outline:none !important;
color:#000;
text-decoration:none;
text-align:center;
background:#fff;
padding:10px 17px;
vertical-align:middle;
border-radius:6px;
margin:20px 24px 0 0;
box-shadow:0 0 14px 14px #fff;
user-select: none;
}
li {
text-align:left; color:#000;
margin-left:2em;
padding:4px 1em;
list-style-type:lower-roman;
font-size:17px;
margin-bottom:3px;
border: 1px solid rgba(255, 255, 255, 0);
transition:border 400ms ease;
border-radius:6px;
}
noscript, .no-js {
display:block;
position:absolute;
top:0px;
width:100%;
height:40px;
text-align:center;
background:#fff;
font-family:Consolas, monospace;
font-size:19px;
letter-spacing:2px;
padding:5px 0;
}
.top {
padding:0 5%;
max-width:400px;
margin:100px auto 120px;
background:#fff;
}
.out {
text-align:center;
margin:30px 0 50px;
}
.top:after {
content:" ";
background:linear-gradient(rgba(255,255,255,0), #fff);
height:200px;
width:100%;
display:block;
position:fixed;
left:0;
bottom:0;
}
@keyframes fade-in {
from {opacity:0;}
to {opacity:1;}
}
</style>
<script src="data.js"></script>
<script>
input.oninput = function() {
a = 0;
if (input.value !== "")
window.history.pushState('','','?' + "v=" + input.value);
else
window.history.pushState('','', window.location.protocol + "//" + window.location.host + window.location.pathname);
Object.keys(cipher).forEach(function(key) { a += ((input.value).split(key).length - 1)*cipher[key]; });
if (/\d/.test(input.value))
a += ((input.value)).match(/\d+/g).map(Number).reduce(function(b, c) { return b + c; }, 0);
result.innerHTML = a;
if (typeof naeq[a] !== 'undefined') {
count.innerHTML = naeq[a].length;
match.innerHTML = "";
Object.keys(naeq[a]).forEach(function(key) {
match.innerHTML += "<li>" + naeq[a][key] + "</li>";
})
}
else {
count.innerHTML = 0;
match.innerHTML = "N/A";
}
}
document.body.onload = function() {
input.value = decodeURI(window.location.search).substring(3,128);
input.select();
input.dispatchEvent(new Event('input'));
}
</script>
</body>
</html>