-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
219 lines (204 loc) · 9.99 KB
/
Copy pathindex.html
File metadata and controls
219 lines (204 loc) · 9.99 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Touhou Spotify Music</title>
<meta name="author" content="KevinVG207, Kawaii_Shadowii"/>
<meta name="description" content="Find the Touhou doujin music artists you are looking for easily on Spotify with Touhou Spotify Music!"/>
<meta name="keywords" content="touhou,touhou spotify,doujin,dojin,spotify,music,東方,東方Project,サークル,thmusic,音楽,thmusicspotify,touhoumusicspotify,touhou project,thspotify,thspotifymusic,touhouspotifymusic,doujin music,doujin artists,doujin music artists,circles,doujin circles,doujin music circles,dojin music,dojin artists,dojin music artists,dojin circles,dojin music circles"/>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"/>
<meta property="og:title" content="Touhou Spotify Music"/>
<meta property="og:description" content="Find the Touhou doujin music artists you are looking for easily on Spotify with Touhou Spotify Music!"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://www.thspotify.moe/"/>
<meta property="og:image" content="https://www.thspotify.moe/img/yinYang-green-opaque.png"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Touhou Spotify Music"/>
<meta name="twitter:description" content="Find the Touhou doujin music artists you are looking for easily on Spotify with Touhou Spotify Music!"/>
<meta name="twitter:image" content="https://www.thspotify.moe/img/yinYang-green-opaque.png"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="stylesheet" href="semantic.min.css" type="text/css"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<link rel="canonical" href="https://www.thspotify.moe/"/>
</head>
<body>
<div class="ui fixed menu">
<div class="ui container">
<div class="item pointer" onclick="resetSearch()">
<img class="logo" src="img/yinYang-green.svg" alt="Touhou Spotify Music" width="35" height="35">
</div>
<p class="header item pointer"onclick="resetSearch()">
TH Spotify Music
</p>
<div class="right item">
<div class="ui search" id="desktop-search">
<div class="ui icon input">
<input class="prompt searchbar" type="search" placeholder="Find an artist..." onkeyup="searchFilter()">
<i class="search icon"></i>
</div>
</div>
<a href="https://twitter.com/ThSpotify" target="_blank">
<button class="ui twitter button desktopbutton" tabindex="-1">
<i class="twitter icon"></i>
Twitter
</button>
<button class="ui icon twitter button mobilebutton" tabindex="-1">
<i class="twitter icon"></i>
</button>
</a>
<a href="https://discord.gg/2jgEp4Uxmx" target="_blank">
<button class="ui button desktopbutton discordbutton" tabindex="-1">
<i class="discord icon"></i>
Discord
</button>
<button class="ui icon button mobilebutton discordbutton" tabindex="-1">
<i class="discord icon"></i>
</button>
</a>
</div>
</div>
<div class="ui container" id="mobile-search">
<div class="item">
<div class="ui search nomargin">
<div class="ui icon input">
<input class="prompt searchbar" type="search" placeholder="Find an artist..." onkeyup="searchFilter()">
<i class="search icon" id="mobile-search-icon"></i>
</div>
</div>
</div>
</div>
</div>
<div class="flexbox">
<noscript>Your browser does not support JavaScript or JavaScript has been disabled.<br>This website relies on JavaScript, so please enable it or use another browser.</noscript>
</div>
<div class="ui inverted vertical footer segment">
<div class="ui center aligned container">
<div class="ui stackable inverted divided grid">
<div class="five wide column">
<div class="container">
<h4 class="ui inverted header">Created by:</h4>
</div>
<div class="container">
<a href="https://twitter.com/kevinvg207" target="_blank" tabindex="0" onfocus="focusFunctionFooterButton()" onmousedown="mouseDownFunction()" onmouseup="mouseUpFunction(event)">
<button class="fluid ui twitter button twitterbutton" tabindex="-1">
<i class="twitter icon"></i>
KevinVG207
</button>
</a>
</div>
<div class="container">
<a href="https://twitter.com/kawaii_shadowii" target="_blank" tabindex="0" onfocus="focusFunctionFooterButton()" onmousedown="mouseDownFunction()" onmouseup="mouseUpFunction(event)">
<button class="fluid ui twitter button twitterbutton" tabindex="-1">
<i class="twitter icon"></i>
Kawaii_Shadowii
</button>
</a>
</div>
</div>
<div class="eleven wide column">
<h4 class="ui inverted header">Additional notes:</h4>
<p>We try our best to keep this page updated, but we cannot guarantee that we included every artist.</p>
<p>If you found an artist on Spotify that's not on the site or found a mistake,<br>please be sure to contact us or join our <a href="https://discord.gg/2jgEp4Uxmx" target="_blank" onfocus="focusFunctionFooterButton()" onmousedown="mouseDownFunction()" onmouseup="mouseUpFunction(event)">Discord server</a>.</p>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var mouseDown = false;
function resetSearch() {
for (const element of document.querySelectorAll('.searchbar')){
element.value = '';
}
searchFilter();
document.querySelector('.artist-container').scrollIntoView(false);
}
function searchFilter() {
var input, filter, box, artist, a, i, txtValue;
bars = document.getElementsByClassName("searchbar");
filter = bars[0].value.toLowerCase() + bars[1].value.toLowerCase();
box = document.getElementsByClassName("flexbox")[0];
artist = box.getElementsByClassName("artist-container");
for (i = 0; i < artist.length; i++) {
textboxes = artist[i].getElementsByClassName("artist-name");
txtValue = "";
for (j = 0; j < textboxes.length; j++) {
txtValue += textboxes[j].textContent;
}
if (txtValue.toLowerCase().indexOf(filter) > -1) {
artist[i].style.display = "";
} else {
artist[i].style.display = "none";
}
}
}
function focusFunctionArtist(event) {
if (!mouseDown) {
artist_container = event.currentTarget.parentElement.parentElement.parentElement;
artist_container.scrollIntoView(false);
}
}
function focusFunctionFooterButton() {
if (!mouseDown) {
footer = document.getElementsByClassName("footer")[0];
footer.scrollIntoView(false);
}
}
function mouseDownFunction() {
mouseDown = true;
}
function mouseUpFunction(event) {
link = event.currentTarget;
link.blur();
mouseDown = false;
}
async function autorun()
{
fb = document.getElementsByClassName("flexbox")[0];
const response = await fetch('artists.json');
const data = await response.json();
data.forEach(entry => {
cur_artist_container = document.createElement("div");
cur_artist_container.setAttribute("class", "artist-container");
cur_image_container = document.createElement("div");
cur_image_container.setAttribute("class", "image-container");
cur_artist_container.appendChild(cur_image_container);
entry.img += ".webP"
cur_artist_image = document.createElement("img");
cur_artist_image.setAttribute("src", `img/280/${entry.img}`);
cur_artist_image.setAttribute("srcset", `img/280/${entry.img} 280w, img/538/${entry.img} 538w`);
cur_artist_image.setAttribute("sizes", "(max-width: 2000px) 280px, 538px");
cur_artist_image.setAttribute("class", "artist-image");
cur_artist_image.setAttribute("alt", entry.title);
cur_artist_image.setAttribute("loading", "lazy");
cur_image_container.appendChild(cur_artist_image);
cur_middle = document.createElement("div");
cur_middle.setAttribute("class", "middle");
cur_image_container.appendChild(cur_middle);
cur_link = document.createElement("a");
cur_link.setAttribute("href", entry.link);
cur_link.setAttribute("target", "_blank");
cur_link.setAttribute("class", "button-text");
cur_link.addEventListener("focus", focusFunctionArtist);
cur_link.addEventListener("mousedown", mouseDownFunction);
cur_link.addEventListener("mouseup", mouseUpFunction);
cur_link.textContent = "Open Spotify";
cur_middle.appendChild(cur_link);
cur_artist_name = document.createElement("p");
cur_artist_name.setAttribute("class", "artist-name");
cur_artist_name.textContent = entry.title;
cur_artist_container.appendChild(cur_artist_name);
if (entry.hasOwnProperty("romanized")) {
cur_artist_rom_name = document.createElement("p");
cur_artist_rom_name.setAttribute("class", "artist-name romanized");
cur_artist_rom_name.textContent = entry.romanized;
cur_artist_container.appendChild(cur_artist_rom_name);
}
fb.appendChild(cur_artist_container)
});
}
if (document.addEventListener) document.addEventListener("DOMContentLoaded", autorun, false);
else if (document.attachEvent) document.attachEvent("onreadystatechange", autorun);
else window.onload = autorun;
</script>
</body>
</html>