-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
187 lines (161 loc) · 5.6 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
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Rain World Map</title>
<link rel="shortcut icon" href="favicon.png" type="image/x-icon">
<meta property="og:image" content="https://rain-world-map.github.io/embed.jpg" />
<meta property="og:type" content="object" />
<meta property="og:title" content="Rain World Map" />
<meta property="og:url" content="https://rain-world-map.github.io" />
<meta property="og:description"
content="An online interactive map that includes every region and every slugcat in Rain World: Downpour. - github.com/rain-world-map" />
<link rel="stylesheet" href="./rw.css" />
<script src="./global.js"></script>
<style>
/* big flex block of darkness */
body,
html {
background-color: black;
color: white;
display: flex;
flex-direction: column;
min-height: 100vh;
margin: 0;
padding: 0;
}
/* floaty in the center */
#main-menu {
margin: auto;
}
/* stuck to the bottom, custom link colors */
#main-menu-footer {
margin-bottom: 0.1em;
text-align: center;
font-family: 'Segoe UI';
font-size: 0.8em;
font-weight: 500;
color: #A9A4B2;
/* menu lightgray */
background-color: black;
}
#main-menu-footer a:link {
color: white;
}
#main-menu-footer a:visited {
color: #A9A4B2;
/* menu lightgray */
}
/* expando list, flex that needs wrap on really small displays */
#scuglist-group {
margin-left: auto;
margin-right: auto;
margin-top: 0.8em;
margin-bottom: 0.8em;
width: fit-content;
max-width: 100vw;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
#scuglist-group>div {
width: 200px;
position: relative;
/* re-center after wrap */
margin-left: auto;
margin-right: auto;
padding: 4px;
transition: width 0.4s;
}
button.region-button {
position: relative;
width: 200px;
height: 40px;
background: black;
margin: 4px;
}
/* fancy ass animations for stuff poping in */
#scuglist-modded {
display: block;
transition: opacity 0.2s, width 0.4s;
}
#scuglist-modded.rl-hidden {
opacity: 0;
width: 0;
height: 0;
}
#scuglist-modded>.rw-ui {
transition: width 0.4s, margin 0.4s, padding 0.4s;
white-space: nowrap;
}
#scuglist-modded.rl-hidden>.rw-ui {
transition: width 0.4s, margin 0.4s, padding 0.4s;
width: 0px;
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
pointer-events: none;
}
#modded-ckb-group {
margin-left: auto;
margin-right: auto;
width: fit-content;
}
#modded-ckb {
position: relative;
width: 36px;
height: 36px;
}
.difficulty-btn {
display: inline-block;
width: 38px;
height: 38px;
margin: 4px;
position: relative;
}
</style>
</head>
<body>
<form id="main-menu">
<div class="rw-title">Rain World</div>
<div class="rw-bigtext" style="text-align: center; margin-top:0.5em;">I'm lost as...</div>
<div id="scuglist-group">
<div id="scuglist-vanilla"></div>
</div>
<script>
let slugcats = {};
getJsonObject("slugcats.json", function (json) {
slugcats = json;
var html = "";
for (const slugcatName in slugcats) {
var icon = "72_unknown";
if (slugcatName in icon_by_name) {
icon = icon_by_name[slugcatName];
} else {
console.log("missing icon for " + slugcatName);
}
html += `
<label class="difficulty-btn">
<input type="radio" class="rw-ui" name="difficulties" onclick="selectDifficulty('${slugcatName}');" autocomplete="off">
<img src="./resources/icons/${icon}.png">
</label>`;
document.getElementById('scuglist-vanilla').innerHTML = html;
}
}, true);
function selectDifficulty(slugName) {
window.location.href = `map.html?slugcat=${slugName}®ion=${slugcats[slugName].startingRegion}&room=${slugcats[slugName].startingRoom}`;
}
</script>
</form>
<div id="main-menu-footer">Code on <a href="https://github.com/rain-world-map/">GitHub</a> | <a
href="https://henpemaz.github.io/Rain-World-Interactive-Map/">Original</a> by <a
href="https://github.com/henpemaz/">Henpemaz</a> | Ported by <a
href="https://github.com/Dual-Iron/">Dual</a> | Favicon and embed by <a
href="https://twitter.com/liszhuk/">lis</a> | Updated, detailed map <a
href="https://noblecat57.github.io/">here</a> | <a
href="https://store.steampowered.com/app/312520/Rain_World/">Rain World</a> is property of <a
href="https://twitter.com/VideocultMedia">Videocult</a>
</div>
</body>
</html>