-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
207 lines (207 loc) · 8.89 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<meta name="author" content="https://github.com/plazum/find-keke">
<style>
body {
text-align: center;
margin: 0;
}
div {
display: grid;
justify-items: center;
}
table#map {
border-collapse: collapse;
}
tr:not(.default) {
background-image: url(image-background.png);
}
td:not(.default) {
padding: 0;
}
img {
display: block;
}
input {
font-size: large;
}
input:invalid {
border: 2px dashed red;
}
input[type="file"]:invalid {
border: initial;
outline: red dashed 2px;
}
input[type="radio"], input[type="checkbox"] {
transform: scale(1.2);
}
input[type="number"] {
width: 3em;
margin-right: 0.20em;
}
button {
font-size: large;
}
.link::after {
content: "↗";
}
.hint {
box-shadow: 2px 4px 12px black;
}
.answer {
box-shadow: 2px 4px 12px 3px black;
}
td.hint, td.answer {
position: absolute;
}
tr.hint, tr.answer, #keke.hint, #keke.answer {
position: relative;
}
#name, #url, #file {
width: 100%;
box-sizing: border-box;
}
#cancel, #OK {
width: 20%;
height: 2.0em;
font-size: inherit;
}
</style>
<link rel="icon" href="keke-big.jpg">
<script src="script-in-head.js" data-debug="false"></script>
<script src="common.js"></script>
</head>
<body>
<div>
<div id="result" style="display: none;">
<table id="niubi" style="margin: 1em auto;">
<tr class="default">
<td class="default"><h1 id="time1"></h1></td>
<td class="default"><img src="niubi.jpg" width="203" height="103"></td>
</tr>
</table>
<h1 id="time2"></h1>
<h2 id="upload_status" style="display: none;"></h2>
<button id="new_game" style="font-size: x-large;" onclick="generate_map(last_rows, last_cols)"></button>
<span style="font-size: larger; margin: 1em auto 0.75em auto;">
<a id="scoreboard2" class="link" href="https://github.com/plazum/find-keke/issues/10" target="_blank"></a>
<a id="scoreboard_search2" class="link" href="scoreboard" onclick="open_dialog('scoreboard_dialog'); return false;"></a>
</span>
<a id="github" class="link" style="margin-bottom: 1em;" href="https://github.com/plazum/find-keke" target="_blank"></a>
<span style="margin-bottom: 1.5em;">
上GitHub不方便?<a class="link" href="https://t.bilibili.com/667012471278534688" target="_blank">前往B站讨论区</a>
<a class="link" href="bilibili://following/detail/667012471278534688">在客户端中打开</a>
</span>
<video id="good_video" style="margin: auto;" src="good.mp4" loop></video>
</div>
<div id="bubu">
<h1 id="wrong"></h1>
<button id="give_up" style="font-size: x-large; margin: auto auto 1em auto;" onclick="generate_map(last_rows, last_cols)"></button>
<video id="bubu_video" style="margin: auto;" src="bubu.mp4" loop></video>
</div>
<div style="font-size: larger; margin: 1.5em auto 1.25em auto;">
<span style="margin-bottom: 0.75em;">
<label lang="zh"><input id="zh" type="radio" name="language" onchange="set_language('zh')">中文</label>
<label lang="ja"><input id="ja" type="radio" name="language" onchange="set_language('ja')">日本語</label>
<label lang="en"><input id="en" type="radio" name="language" onchange="set_language('en')">English</label>
</span>
<span id="scoreboard_and_search" style="margin-bottom: 0.75em;">
<a id="scoreboard" class="link" href="https://github.com/plazum/find-keke/issues/10" target="_blank"></a>
<a id="scoreboard_search" class="link" href="scoreboard" onclick="open_dialog('scoreboard_dialog'); return false;"></a>
</span>
<span style="margin-bottom: 0.75em;">
<span id="filter"></span>
<button id="add_image" onclick="open_dialog('add_image_dialog')"></button>
</span>
<div style="display: block;">
<button id="classic_mode" onclick="generate_map(14, 10)"></button>
<button id="extended_mode" onclick="generate_map(14, 14)"></button>
<button id="hard_mode" onclick="generate_map(20, 14)"></button>
<form style="display: inline-block;"
onsubmit="generate_map(document.getElementById('rows').valueAsNumber, document.getElementById('cols').valueAsNumber); return false;">
<input id="rows" type="number" value="20" min="1" required><label id="row" for="rows"></label>
×
<input id="cols" type="number" value="20" min="1" required><label id="column" for="cols"></label>
<button id="custom_mode" type="submit"></button>
</form>
<button id="hint" onclick="hint()"></button>
<button id="more_hint" onclick="more_hint()" disabled></button>
</div>
</div>
<a id="debug_link" href="debug" title="" target="_blank">
<div id="banner" style="background-image: url(banner-extension.jpg);">
<img src="banner.jpg">
</div>
</a>
<table id="map" style="margin: auto;"></table>
</div>
<dialog id="bainian" style="padding: 0 0 1em 0;">
<div style="color: yellow; background-color: red; padding: 0 2em; margin-bottom: 1em;">
<h1>本游戏开发者恭祝各位玩家新春大吉!</h1>
</div>
<button style="font-size: 300px;" onclick="close_dialog('bainian')">🧧</button>
</dialog>
<dialog id="add_image_dialog" style="font-size: larger;">
<h2 id="add_image2"></h2>
<span id="disclaimer" style="font-size: large;"></span>
<form autocomplete="off" onsubmit="add_custom_image(); return false;">
<table style="border-spacing: 1em;">
<tr class="default">
<td class="default" style="text-align: left;">
<label id="label_name" for="name"></label>
</td>
<td class="default">
<input id="name" required>
</td>
<td rowspan="4">
<figure>
<img id="preview_img" width="75" height="75" style="display: inline; object-fit: contain; background-image: url(image-background.png);">
<figcaption id="preview"></figcaption>
</figure>
</td>
</tr>
<tr class="default">
<td class="default" style="text-align: left;">
<input id="radio_url" type="radio" name="custom_image" required onchange="set_input_enabled('url')"><label for="radio_url">URL</label>
</td>
<td class="default">
<input id="url" type="url" list="example_url" required disabled onchange="preview_image()">
<datalist id="example_url"></datalist>
</td>
</tr>
<tr class="default">
<td class="default" style="text-align: left;">
<input id="radio_file" type="radio" name="custom_image" required onchange="set_input_enabled('file')"><label id="label_file" for="radio_file"></label>
</td>
<td class="default">
<input id="file" type="file" accept="image/*" required disabled onchange="preview_image(true)">
</td>
</tr>
<tr class="default">
<td class="default" id="fit" style="text-align: left;"></td>
<td class="default">
<input id="contain" type="radio" name="fit" onchange="set_object_fit('contain')" checked><label id="label_contain" for="contain"></label>
<input id="fill" type="radio" name="fit" onchange="set_object_fit('fill')"><label id="label_fill" for="fill"></label>
<input id="cover" type="radio" name="fit" onchange="set_object_fit('cover')"><label id="label_cover" for="cover"></label>
</td>
</tr>
</table>
<span style="display: flex; margin: 0.5em auto; justify-content: space-evenly;">
<button id="cancel" type="button" onclick="close_dialog('add_image_dialog')"></button>
<button id="OK" type="submit"></button>
</span>
</form>
</dialog>
<dialog id="scoreboard_dialog" style="width: 75%; height: 75%;">
<div id="dialog_title_bar" style="display: flex; align-items: center;">
<a id="open_in_new_tab" class="link" href="scoreboard" target="_blank"></a>
<button style="font-size: x-large; font-weight: bold; margin-left: auto;" onclick="close_dialog('scoreboard_dialog')">×</button>
</div>
<iframe id="scoreboard_iframe" style="border: none; width: 100%;"></iframe>
</dialog>
<script src="script-in-body.js"></script>
</body>
</html>