-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathgame.html
More file actions
144 lines (130 loc) · 5.73 KB
/
game.html
File metadata and controls
144 lines (130 loc) · 5.73 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="/images/icon.png" />
<link rel="stylesheet" href="/src/static/css/style.css" />
<style>
.header {
border-bottom: none;
z-index: -1;
}
.nav-links {
display: none;
}
</style>
<title>< game ></title>
</head>
<body>
<div class="header" id="header-bar">
<div class="nav-links" id="nav-links-container">
<a href="/" class="header-link">main</a>
<a href="/notes.html" class="header-link">notes</a>
<a href="/game.html" class="header-link">start</a>
<button class="header-link" id="settings-button">options</button>
<a href="/guide.html" class="header-link">guide</a>
</div>
<div class="button-container">
<button id="dropdown-button">
<img src="/images/down.svg" class="button-icon" />
</button>
<button id="console-button">
<img src="/images/console.svg" class="button-icon" />
<span class="badge" id="console-badge" style="display: none">0</span>
</button>
</div>
</div>
<div id="app">
<div id="game-container">
<div id="loading">Loading...</div>
<video id="media" disablePictureInPicture>
<track id="track" kind="subtitles" default />
</video>
<div id="subtitle-container">
<p id="subtitle" />
</div>
</div>
</div>
<div id="console-modal" class="modal">
<div class="console-modal-wrapper">
<div class="console-modal-header">
<div>
<h3 class="console-modal-title">Console Logger</h3>
<div class="modal-error-msg" id="console-export-fail-msg"></div>
</div>
<div class="console-modal-controls">
<button id="console-export-button" class="console-control-button">Export</button>
<button id="console-clear-button" class="console-control-button">Clear</button>
</div>
</div>
<div class="console-modal-content" id="console-modal-content">
<div class="empty-state">No console messages yet.</div>
</div>
</div>
</div>
<div id="emote-wheel" class="wheel">
<div class="emote-slot" style="top: 10%; left: 50%" data-id="17">
<img src="/emote-wheel/Lean Forward.png" />
</div>
<div class="emote-slot" style="top: 25%; left: 70%" data-id="6">
<img src="/emote-wheel/Blush.png" />
</div>
<div class="emote-slot" style="top: 50%; left: 88%" data-id="3">
<img src="/emote-wheel/Spin.png" />
</div>
<div class="emote-slot" style="top: 70%; left: 70%" data-id="29">
<img src="/emote-wheel/Angry.png" />
</div>
<div class="emote-slot" style="top: 75%; left: 50%" data-id="27">
<img src="/emote-wheel/Stretch 2.png" />
</div>
<div class="emote-slot" style="top: 70%; left: 30%" data-id="30">
<img src="/emote-wheel/Open The Next.png" />
</div>
<div class="emote-slot" style="top: 50%; left: 15%" data-id="22">
<img src="/emote-wheel/Ponder.png" />
</div>
<div class="emote-slot" style="top: 25%; left: 30%" data-id="23">
<img src="/emote-wheel/Pray.png" />
</div>
</div>
<script type="module" src="/src/main.ts"></script>
<script src="/scripts/modal.js"></script>
<script src="/scripts/console.js"></script>
<script src="/scripts/emotewheel.js"></script>
<script>
const dropdown_key = "lainTSX-dropdown-visible";
const header = document.getElementById("header-bar");
const nav_links = document.getElementById("nav-links-container");
const dropdown_btn = document.getElementById("dropdown-button");
const game_container = document.getElementById("game-container");
let menu_visible = true;
const saved_menu_visible = localStorage.getItem(dropdown_key);
if (saved_menu_visible !== null && saved_menu_visible !== "true") {
menu_visible = false;
}
const toggle_menu = () => {
if (menu_visible) {
header.style.borderBottom = "1px solid white";
header.style.zIndex = "999";
nav_links.style.display = "flex";
dropdown_btn.style.rotate = "180deg";
game_container.style.top = "53%";
} else {
header.style.borderBottom = "none";
header.style.zIndex = "-1";
nav_links.style.display = "none";
dropdown_btn.style.rotate = "unset";
game_container.style.top = "50%";
}
};
toggle_menu();
dropdown_btn.addEventListener("click", () => {
menu_visible = !menu_visible;
localStorage.setItem(dropdown_key, menu_visible);
toggle_menu();
});
</script>
</body>
</html>