-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.html
218 lines (195 loc) Β· 8.43 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
<!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>Songs Search with Typesense</title>
<meta name="description"
content="Songs Search with Typesense">
<meta name="keywords" content="songs, search, song search, search engine, typesense"/>
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://songs-search.typesense.org">
<meta property="og:title" content="Instant Search Songs with Typesense">
<meta name="og:description" content="Search through songs from the MusicBrainz songs database with Typesense"/>
<meta property="og: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-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-116415641-3');
</script>
</head>
<body>
<div class="container">
<div class="row mt-3 ">
<div class="col-md">
<header>
<div class="row">
<div class="col-md">
<h1 class="text-md-center font-serif">
Instant Search 32 Million Songs
</h1>
<h5 class="text-md-center mt-3 font-weight-light">
<div class="d-md-inline d-block mt-3">
<span style="vertical-align: text-bottom;">powered by</span>
<a href="https://typesense.org" target="_blank">
<img src="images/typesense.svg" height="32" alt="Typesense" class="mx-2" style="vertical-align: top; position: relative; top: -4px;"/>
</a>
</div>
</h5>
<div class="text-md-center">
<a class="github-button" href="https://github.com/typesense/showcase-songs-search" data-color-scheme="no-preference: light; light: light; dark: dark;" data-size="normal" aria-label="View typesense/showcase-songs-search on GitHub">View on Github</a>
</div>
</div>
</div>
</header>
</div>
</div>
</div>
<div class="row mt-2 mt-md-3 no-gutters">
<div class="col-md">
<div id="searchbox-container" class="bg-secondary pt-3 pt-md-5 pb-2 pb-md-4 px-3 px-md-5">
<div class="row justify-content-md-center">
<div class="col-md-8">
<div id="searchbox"></div>
<div class="mt-2">
Try:
<span id="example-search-terms">
<a role="button" class="clickable-search-term">Annie's song Denver</a>,
<a role="button" class="clickable-search-term">Wonderwall Oasis</a>,
<a role="button" class="clickable-search-term">Mariah Carey</a>,
<a role="button" class="clickable-search-term">Soundtrack</a>,
<a role="button" class="clickable-search-term">Beethoven</a>,
<a role="button" class="clickable-search-term">Poker face Gaga</a>,
<a role="button" class="clickable-search-term">Elvis Presley</a>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="results-section" class="container d-none">
<div class="row mt-3">
<div class="col-md-3">
</div>
<div class="col-md">
<div class="row d-flex justify-content-end">
<div id="sort-by" class="col-5 col-md-2 mt-2 mt-md-0"></div>
<div id="stats" class="col-md ml-md-2 text-right small order-first order-md-last d-flex align-items-center justify-content-end justify-content-md-start px-md-0"></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="ml-2" style="font-size: 15px;">Refine</span>
</button>
<div class="collapse navbar-collapse d-md-block mt-3 mt-md-0" id="filters-section">
<div class="row mb-2">
<div class="col-md">
<div id="current-refinements"></div>
</div>
</div>
<div class="row">
<div class="col-md">
<h4 class="font-weight-light text-primary">Release Date</h4>
<div id="release-date-selector"></div>
</div>
</div>
<div class="row mt-3">
<div class="col-md">
<h4 class="font-weight-light text-primary">Artists</h4>
<div id="artists-refinement-list"></div>
</div>
</div>
<div class="row mt-5">
<div class="col-md">
<h4 class="font-weight-light text-primary">Genres</h4>
<div id="genres-refinement-list"></div>
</div>
</div>
<div class="row mt-5">
<div class="col-md">
<h4 class="font-weight-light text-primary">Release Type</h4>
<div id="release-type-refinement-list"></div>
</div>
</div>
<div class="row mt-5">
<div class="col-md">
<h4 class="font-weight-light text-primary">Countries</h4>
<div id="countries-refinement-list"></div>
</div>
</div>
</div>
</nav>
</div>
<div class="col-md">
<div id="hits"></div>
</div>
</div>
</div>
<footer class="navbar fixed-bottom py-0">
<div class="container-fluid justify-content-center justify-content-md-end">
<span class="navbar-text">
<a href="#" aria-roledescription="button" data-toggle="modal" data-target="#aboutModal">
<span>about</span>
</a>
</span>
</div>
</footer>
<!-- 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">
<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>
This search experience is powered by <a href="https://typesense.org" target="_blank">Typesense</a> which is
a blazing-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>
The songs dataset is from <a href="https://musicbrainz.org/" target="_blank">MusicBrainz</a> which is an open
music encyclopedia that collects music metadata and makes it available to the public. Please contribute to it if you're able to!
</p>
<p>
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 <a href="https://www.digitalocean.com/products/app-platform/" target="_blank">DigitalOcean's App Platform</a>.
</p>
<p>
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.
</p>
<p>
Here is the source-code that shows you how to build your own search experience like this one: <a href="https://github.com/typesense/showcase-songs-search" target="_blank">https://github.com/typesense/showcase-songs-search</a>
</p>
</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>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>