-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
284 lines (265 loc) · 9.77 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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="./manifest.webmanifest" />
<link rel="shortcut icon" href="./favicon.png" />
<link rel="stylesheet" href="./src/index.scss" />
<title>findxkcd: find that perfect xkcd comic by topic</title>
<meta
name="description"
content="Want to find that perfect xkcd comic for your situation? Browse and search xkcd by topics, keywords, characters, transcript, date and more."
/>
<meta
name="keywords"
content="xkcd, search xkcd, find xkcd, browse xkcd, search engine, typesense"
/>
<!-- Open Graph -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://findxkcd.com" />
<meta property="og:title" content="findxkcd" />
<meta
name="og:description"
content="Find that perfect xkcd comic for your situation. Browse and search xkcd by topics, keywords, characters, transcript, date and more."
/>
<meta property="og:image" content="./images/opengraph_banner.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="findxkcd" />
<meta
name="twitter:description"
content="Find that perfect xkcd comic for your situation. Browse and search xkcd by topics, keywords, characters, transcript, date and more."
/>
<meta name="twitter:image" content="./images/opengraph_banner.png" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=UA-116415641-10"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-116415641-10');
</script>
</head>
<body>
<div class="container-fluid px-md-5 pt-4">
<div class="row d-flex align-items-center">
<div class="col-md">
<div class="row">
<div class="col-md">
<h1 class="text-secondary mb-1">
<a
href="https://findxkcd.com"
class="text-decoration-none text-secondary"
>findxkcd</a
>
</h1>
<div class="lead mb-3">
Browse and search xkcd comics by topics, keywords, characters,
transcript, date and more.
</div>
</div>
<div
class="col-md-2 d-none text-md-right d-md-flex flex-column align-self-center"
>
<img
src="https://xkcd.com/s/0b7742.png"
height="83"
width="185"
alt="xkcd"
/>
</div>
</div>
<div class="mb-3 d-flex align-items-center">
<span class="mr-2">powered by</span>
<a
href="https://github.com/typesense/typesense"
target="_blank"
alt="Typesense"
>
<img src="images/typesense.svg" width="114" height="25" />
</a>
</div>
<p class="text-muted">
<a role="button" data-toggle="modal" data-target="#aboutModal"
>about</a
>
•
<a
href="https://github.com/typesense/showcase-xkcd-search"
target="_blank"
>source code</a
>
</p>
</div>
</div>
<div id="searchbox-container" class="row pt-3">
<div class="col-md justify-content-md-center">
<div id="searchbox"></div>
<div class="row mt-2 text-muted">
<div class="col-md">
Try:
<span id="example-search-terms">
<a role="button" class="clickable-search-term">eclipse</a>,
<a role="button" class="clickable-search-term">online</a>,
<a role="button" class="clickable-search-term">mars</a>,
<a role="button" class="clickable-search-term">captcha</a>,
<a role="button" class="clickable-search-term">noise</a>,
<a role="button" class="clickable-search-term">cheese</a>,
<a role="button" class="clickable-search-term">floppy</a>,
<a role="button" class="clickable-search-term">stupid</a>,
<a role="button" class="clickable-search-term">urgent</a>,
<a role="button" class="clickable-search-term">bug</a>,
<a role="button" class="clickable-search-term">gravity</a>
</span>
</div>
</div>
</div>
</div>
<div id="results-section">
<div class="row mt-4 mt-md-4">
<div class="col-md-3"></div>
<div class="col-md">
<div class="d-flex justify-content-md-end">
<div
id="stats"
class="ml-md-2 text-md-right small d-flex align-items-center justify-content-end justify-content-md-start px-md-0"
></div>
<div id="sort-by" class="ml-2 ml-md-3"></div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-md-3">
<nav class="navbar navbar-expand-md navbar-light p-0 pb-3">
<button
class="navbar-toggler text-primary border-light-2"
type="button"
data-toggle="collapse"
data-target="#filters-section"
aria-controls="filters-section"
aria-expanded="false"
aria-label="Toggle filters"
>
<span class="navbar-toggler-icon"></span
><span class="text-secondary small ml-1">Filter Comics</span>
</button>
<div
class="collapse navbar-collapse d-md-block mt-3 mt-md-0"
id="filters-section"
>
<div class="row">
<div class="col-md">
<h5 class="text-secondary mb-2">browse by topic</h5>
<div id="comic-topic"></div>
</div>
</div>
<div class="row mt-5">
<div class="col-md">
<h5 class="text-secondary mb-2">published year</h5>
<div id="comic-publication-year"></div>
</div>
</div>
</div>
</nav>
</div>
<div class="col-md-9">
<div id="hits"></div>
</div>
</div>
</div>
</div>
<!-- About Modal -->
<div
id="aboutModal"
class="modal fade"
tabindex="-1"
aria-labelledby="aboutLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-lg">
<div class="modal-content text-dark">
<div class="modal-header">
<h5 class="modal-title font-weight-normal" id="aboutLabel">
About
</h5>
<button
type="button"
class="close btn btn-primary"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>
Ever wanted to browse all xkcd comics on a certain topic, or see
all comics with a certain character, in your quest to find the
perfect xkcd for your situation? This site is for you.
</p>
<p>
The underlying data is from
<a href="https://www.explainxkcd.com/" target="_blank"
>explainxkcd.com</a
>
and <a href="https://xkcd.com/" target="_blank">xkcd.com</a>.
</p>
<p>
The search & browsing experience is powered by
<a href="https://typesense.org" target="_blank">Typesense</a>
which is a fast,
<a href="https://github.com/typesense/typesense" target="_blank"
>open source</a
>
typo-tolerant search-engine. It is an open source alternative to
Algolia and an easier-to-use alternative to ElasticSearch.
</p>
<p>Some technical details:</p>
<ul>
<li>
The app was built using the
<a
href="https://github.com/typesense/typesense-instantsearch-adapter"
target="_blank"
>
Typesense Adapter for InstantSearch.js</a
>
and is hosted on Cloudflare Pages.
</li>
<li>
The search backend is powered by a geo-distributed 3-node
Typesense cluster running on
<a href="https://cloud.typesense.org" target="_blank"
>Typesense Cloud</a
>, with nodes in Oregon, Frankfurt and Mumbai.
</li>
<li>
Here is the source-code:
<a
href="https://github.com/typesense/showcase-xkcd-search"
target="_blank"
>https://github.com/typesense/showcase-xkcd-search</a
>
</li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
<script type="module" src="./src/app.js"></script>
</body>
</html>