-
Notifications
You must be signed in to change notification settings - Fork 5
/
template.html
370 lines (302 loc) · 15.5 KB
/
template.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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.75">
{% if page %}
<title>Bus Simulator: {{ page.title }}</title>
<meta property="og:type" content="website">
<meta property="og:title" content="Bus Simulator: {{ page.title }}">
<meta property="og:description" content="{{ page.description | truncate(128, True, '...') }}">
<meta property="og:image" content="{{ page.header.imageBanner }}">
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="wiki.wolfdo.gg">
<meta name="twitter:title" content="Bus Simulator: {{ page.title }}">
<meta name="twitter:description" content="{{ page.description | truncate(128, True, '...') }}">
<meta name="twitter:image" content="{{ page.header.imageBanner }}">
<meta name="keywords" content="{{ page.keywords }}">
<link rel="icon" href="/assets/bussim/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/assets/bussim/style.css">
{% endif %}
<link rel="stylesheet" href="/assets/bussim/dialogue.css">
<audio id="soundSource" style="display: none;">
<source type="audio/mp3">
</audio>
</head>
<body>
<style>
#wikiContent {
font-family:'Starbound';
color: white;
word-spacing: 5px;
text-shadow: 0 2px 0 #000000;
}
#searchScreen {
position: fixed;
height: 50%; width: 100vw;
background: #10099680;
backdrop-filter: blur(5px);
transition: bottom 1s;
}
#results {
height: 435px;
overflow: auto;
scrollbar-width: thin;
scrollbar-color: transparent transparent;
}
#results::-webkit-scrollbar {
width: 6px;
}
#results::-webkit-scrollbar-thumb {
background-color: transparent;
}
table {
border: none;
border-collapse: collapse;
width: 100%;
margin-bottom: 20px;
box-sizing: border-box;
font-family: "Starbound";
background-color: #070446;
overflow-x: scroll;
}
th {
background-color: #05032e;
}
tr {
border-bottom: none;
transition: 500ms;
}
td, th {
padding: 12px;
text-align: left;
}
tr:hover {
background-color: #0d0774;
}
@keyframes floatAnimation {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-5px);
}
}
float {
display: inline-block;
font-size: 24px;
word-spacing: -5px;
}
float text {
color: grey;
font-size: 16px;
display: inline-block;
animation: floatAnimation 1s ease-in-out infinite alternate;
animation-delay: var(--delay);
}
.previewBg {
background-color: rgba(0,0,0,.8);
backdrop-filter: blur(2px);
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 10;
}
.previewImg {
position: fixed;
top: 50%;
left: 50%;
animation: grow .4s forwards;
}
@keyframes grow {
from {
opacity: 0;
transform: translate(-50%, -50%) scale(85%);
} to {
opacity: 1;
transform: translate(-50%, -50%) scale(100%);
}
}
.hr-gradient {
border: none;
height: 2px;
margin-bottom: 13px;
background: linear-gradient(to right, #b5b5b5, transparent 45%) !important;
}
#results > div > div {
background-color: rgba(25, 21, 117, 0.6) !important;
border-radius: 5.76px;
}
@keyframes wave {
0% {
transform: translateY(15%);
} 50% {
transform: translateY(-15%);
} 100% {
transform: translateY(15%);
}
}
</style>
<div id="extraScreens">
<!-- no extras rn.. will add soon so keep this -->
</div>
<div id="menuParent" style="background-color: #100996; position: fixed; bottom: 0; height: 55px; width: 100%; z-index: 5; display: flex; justify-content: right;">
<div class="sidebar sidebarMenu" id="mainMenu" style="display: flex; top: 0; left: 0; flex-direction: row; justify-content: left; flex: 1;">
<button onclick="location.href='home'">
<img src="/assets/bussim/images/menuIcons/home.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Home</text>
</button>
<button onclick="navigateMenu('wikiPages')">
<img src="/assets/bussim/images/menuIcons/books.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Wiki</text>
</button>
<button onclick="navigateMenu('otherStuff')">
<img src="/assets/bussim/images/menuIcons/menuothers.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Other Stuff</text>
</button>
</div>
<div class="sidebar sidebarMenu" id="wikiPages" style="display: none; position: absolute; top: 0; left: 0; flex-direction: row;">
<button onclick="navigateMenu('mainMenu')" type="menuBack">
<img src="/assets/bussim/images/menuIcons/back.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Back to Menu</text>
</button>
<button onclick="location.href='events'">
<img src="/assets/bussim/images/menuIcons/events.png" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Events</text>
</button>
<button onclick="location.href='items'">
<img src="/assets/bussim/images/menuIcons/items.png" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Items</text>
</button>
<button onclick="location.href='applications'">
<img src="/assets/bussim/images/menuIcons/applications.png" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Applications</text>
</button>
<button onclick="location.href='npcs'">
<img src="/assets/bussim/images/menuIcons/npcs.png" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">NPCs</text>
</button>
<button onclick="location.href='biomes'">
<img src="/assets/bussim/images/menuIcons/biomes.png" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Biomes</text>
</button>
<button onclick="location.href='locations'">
<img src="/assets/bussim/images/menuIcons/locations.png" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Locations</text>
</button>
<button onclick="location.href='others'">
<img src="/assets/bussim/images/menuIcons/others.png" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Others</text>
</button>
<button onclick="location.href='badges'">
<img src="/assets/bussim/images/menuIcons/badges.png" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Badges</text>
</button>
</div>
<div class="sidebar sidebarMenu" id="otherStuff" style="display: none; position: absolute; top: 0; left: 0; flex-direction: row;">
<button onclick="navigateMenu('mainMenu')" type="menuBack">
<img src="/assets/bussim/images/menuIcons/back.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Back to Menu</text>
</button>
<button onclick="location.href='contributors'">
<img src="/assets/bussim/images/menuIcons/contributors.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Contributors</text>
</button>
<button onclick="window.open('https://github.com/FrostBitten-Wiki/bussim', '_blank')">
<img src="/assets/bussim/images/menuIcons/github.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Wiki Repository</text>
</button>
<button onclick="window.open('https://discord.gg/frostbitegames', '_blank')">
<img src="/assets/bussim/images/menuIcons/discord.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">FrostBitten Games</text>
</button>
<button onclick="window.open('https://discord.gg/pNnMKKg', '_blank')">
<img src="/assets/bussim/images/menuIcons/discord.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Bus Simulator Discord</text>
</button>
</div>
<div class="sidebar" style="top: 0; right: 0; flex-direction: row-reverse; display: flex;">
<button onclick="randomDialogueEvent(false)">
<img src="/assets/bussim/images/menuIcons/books.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Force Dialogue</text>
</button>
<button onclick="location.href = window.location.pathname.replace('wiki', 'edit');" type="menuback">
<img src="/assets/bussim/images/menuIcons/edit.webp" style="user-select: none; margin-left: 7px;" width="24" height="auto">
<text type="hoverText">Edit Page</text>
</button>
</div>
<script>
var activeMenu = "mainMenu";
function navigateMenu(menuId) {
var menus = document.querySelectorAll('.sidebarMenu');
menus.forEach(function(menu) {
menu.style.display = 'none';
});
var selectedMenu = document.getElementById(menuId);
if (selectedMenu) {
selectedMenu.style.display = 'flex';
activeMenu = menuId;
}
}
navigateMenu(activeMenu);
</script>
</div>
<div style="position: fixed; top: 0; width: 100%;">
<div class="tooltip" id="custom-tooltip"></div>
</div>
<div style="width: 100%; z-index: 1;">
<div style="position: absolute; top: 0; width: 100vw; z-index: -1;">
<img id="bannerImage" src="{{ page.header.imageBanner }}" width="100%" height="250" style="object-fit: cover; user-select: none;">
<div style="position: absolute; top: 0; height: 250px; width: 100%; background: linear-gradient(to bottom, transparent 0%, rgba(8, 4, 83, 1) 90%);"></div>
</div>
<div style="transition: margin 500ms; margin-top: 50px; margin-left: 10vw; margin-right: 10vw;">
<div style="width: 80vw;">
<div style="z-index: 2;">
<text style="font-size: 50px;" id="title">{{ page.title }}</text><br>
<text style="font-size: 17px;" id="description">{{ page.header.description }}</text><br><br>
</div>
</div>
<div style="width: 80vw;">
<div id="wikiContent">
{{ content }}
</div>
<div style="margin-top: 10px; margin-bottom: 20px;" id="attributions">
</div>
<br><br><br><br>
</div>
</div>
</div>
<div id="speakerPopup" class="checkBg" style="transition: bottom 1s; user-select: none; --color1: #6d6d6d; --color2: #9d9d9d; --color3: white; position: fixed; bottom: -165px; right: 10px; width: 550px; height: 110px; gap: 15px;">
<text id="speakerId" style="position: absolute; top: -15px; left: 0; font-size: 10px; opacity: 0.3;"></text>
<div style="display: grid; grid-template-columns: 1fr 165px;">
<div style="padding: 7px;">
<text id="speakerName" style="font-size: 20px;"></text><br>
<text id="speakerText"></text>
</div>
<div id="speakerImage" class="dialogue" style="object-fit: cover; transform: scale(37.1%, 37.1%); -moz-transform: scale(37.1%, 37.1%); position: absolute; bottom: -123px; right: -140px;"></div>
</div>
</div>
<script>
const previewImage = image => {
console.log(image)
playSound("page", 0.5, 0)
const bg = document.createElement("div")
bg.className = "previewBg"
document.body.prepend(bg)
bg.addEventListener("click", () => bg.remove())
const img = image.cloneNode(true)
img.onclick = ""
img.className = "previewImg"
bg.appendChild(img)
}
</script>
<script src="https://unpkg.com/[email protected]" defer></script>
<script src="/assets/bussim/scripts/others.js" defer></script>
<script src="/assets/bussim/scripts/tooltip.js" defer></script>
<script src="/assets/bussim/scripts/dialogueSystem.js" defer></script>
<script src="/assets/bussim/scripts/dialogueEmulator.js" defer></script>
<script src="/assets/bussim/scripts/wave.js" defer></script>
</body>
</html>