Update index.html
Browse files- index.html +135 -22
index.html
CHANGED
@@ -20,13 +20,8 @@
|
|
20 |
<link rel="canonical" href="https://huggingface.co/spaces/SenY/GalGameUI">
|
21 |
<link href="https://unpkg.com/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet">
|
22 |
<link href="https://unpkg.com/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
23 |
-
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+JP" rel="stylesheet">
|
24 |
<meta name="theme-color" content="#7952b3">
|
25 |
<style>
|
26 |
-
.wf-notosansjapanese {
|
27 |
-
font-family: "Noto Sans JP";
|
28 |
-
}
|
29 |
-
|
30 |
[aria-expanded=false] .text-expanded {
|
31 |
display: none;
|
32 |
}
|
@@ -87,10 +82,6 @@
|
|
87 |
--userInterfaceHeight: 20%;
|
88 |
}
|
89 |
|
90 |
-
#emptySpace {
|
91 |
-
height: calc(100% - var(--messageWindowSize));
|
92 |
-
}
|
93 |
-
|
94 |
#messageWindow {
|
95 |
margin: 0;
|
96 |
padding: 0;
|
@@ -169,12 +160,37 @@
|
|
169 |
align-items: center;
|
170 |
}
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
.watermark {
|
173 |
-webkit-text-stroke: 1px rgb(0, 0, 0);
|
174 |
paint-order: stroke fill;
|
175 |
color: rgba(255, 255, 255, 0.8);
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
}
|
177 |
</style>
|
|
|
178 |
<style id="fontFamily">
|
179 |
body {
|
180 |
font-family: "Noto Sans JP";
|
@@ -199,9 +215,16 @@
|
|
199 |
</div>
|
200 |
<div class="row">
|
201 |
<div class="col-lg-7 p-0 m-0 relative" id="edit">
|
202 |
-
<div id="emptySpace" class="
|
203 |
-
<
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
</div>
|
206 |
<div id="messageWindow" class="row">
|
207 |
<div class="col-12 p-0 m-0 h-100">
|
@@ -285,6 +308,77 @@
|
|
285 |
<input name="btmAlpha" type="range" class="form-control form-range" id="btmAlpha" value="0.45"
|
286 |
step="0.01" max="1">
|
287 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
<div class="input-group">
|
289 |
<span class="input-group-text bg-secondary text-light">font-size</span>
|
290 |
<input name="fontSizeInput" type="range" class="form-control form-range" id="fontSizeInput"
|
@@ -302,6 +396,7 @@
|
|
302 |
<hr>
|
303 |
<div class="input-group">
|
304 |
<button id="waterMarkToggle" type="button" class="btn btn-warning">WaterMark</button>
|
|
|
305 |
</div>
|
306 |
<hr>
|
307 |
<h6>
|
@@ -313,11 +408,6 @@
|
|
313 |
</a>
|
314 |
</h6>
|
315 |
<div class="collapse" id="collapseExample">
|
316 |
-
<div class="input-group">
|
317 |
-
<span class="input-group-text bg-secondary text-light">font-family</span>
|
318 |
-
<input name="fontFamilyInput" type="text" class="form-control" id="fontFamilyInput"
|
319 |
-
value="">
|
320 |
-
</div>
|
321 |
<div class="input-group">
|
322 |
<span class="input-group-text bg-secondary text-light">NameSpaceLength</span>
|
323 |
<input name="nameSpaceLength" type="range" class="form-control form-range"
|
@@ -380,6 +470,11 @@
|
|
380 |
</ul>
|
381 |
<h2>最近の更新</h2>
|
382 |
<ul>
|
|
|
|
|
|
|
|
|
|
|
383 |
<li>
|
384 |
<ul>
|
385 |
<li>名前欄とメッセージ欄の行数を変更できるようにした。</li>
|
@@ -548,8 +643,8 @@
|
|
548 |
row2.appendChild(shadowText);
|
549 |
input.classList.add("text-light");
|
550 |
input.value = "";
|
551 |
-
if(!window.localStorage.length){
|
552 |
-
input.value = "Line of " + (i+1);
|
553 |
}
|
554 |
let v = window.localStorage.getItem(input.name);
|
555 |
if (v) {
|
@@ -578,7 +673,7 @@
|
|
578 |
row2.appendChild(shadowText);
|
579 |
input.classList.add("text-light");
|
580 |
input.value = "";
|
581 |
-
if(!window.localStorage.length && i == 2){
|
582 |
input.value = "Name";
|
583 |
}
|
584 |
let v = window.localStorage.getItem(input.name);
|
@@ -610,8 +705,7 @@
|
|
610 |
|
611 |
document.getElementById("left").style.height = (100 + sparse) + "%";
|
612 |
document.getElementById("left").style.top = (-1 * sparse) + "%";
|
613 |
-
document.querySelectorAll("#right input, #left input").forEach(el => {
|
614 |
-
console.log(el.parentNode.offsetHeight);
|
615 |
el.style.fontSize = (el.parentNode.offsetHeight * document.querySelector("#fontSizeInput").value) + "px";
|
616 |
});
|
617 |
}
|
@@ -751,6 +845,15 @@
|
|
751 |
f.textContent = 'body { font-family: "' + i.value.trim() + '"; }';
|
752 |
}
|
753 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
754 |
document.getElementById("windowSize").addEventListener("change", function () {
|
755 |
document.documentElement.style.setProperty('--messageWindowSize', this.value + "%");
|
756 |
createEditor();
|
@@ -818,6 +921,16 @@
|
|
818 |
} else {
|
819 |
document.querySelectorAll(".watermark").forEach(el => el.classList.remove("d-none"));
|
820 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
});
|
822 |
|
823 |
document.querySelectorAll("input").forEach(el => {
|
|
|
20 |
<link rel="canonical" href="https://huggingface.co/spaces/SenY/GalGameUI">
|
21 |
<link href="https://unpkg.com/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet">
|
22 |
<link href="https://unpkg.com/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
|
|
23 |
<meta name="theme-color" content="#7952b3">
|
24 |
<style>
|
|
|
|
|
|
|
|
|
25 |
[aria-expanded=false] .text-expanded {
|
26 |
display: none;
|
27 |
}
|
|
|
82 |
--userInterfaceHeight: 20%;
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
85 |
#messageWindow {
|
86 |
margin: 0;
|
87 |
padding: 0;
|
|
|
160 |
align-items: center;
|
161 |
}
|
162 |
|
163 |
+
#emptySpace {
|
164 |
+
height: calc(100% - var(--messageWindowSize));
|
165 |
+
flex-direction: column;
|
166 |
+
}
|
167 |
+
|
168 |
+
#emptySpace>* {
|
169 |
+
width: 100%;
|
170 |
+
display: flex;
|
171 |
+
justify-content: end;
|
172 |
+
align-items: center;
|
173 |
+
height: 5%;
|
174 |
+
font-size: 100%;
|
175 |
+
}
|
176 |
+
|
177 |
+
#emptySpace>*>* {
|
178 |
+
padding-right: 0.5rem;
|
179 |
+
}
|
180 |
+
|
181 |
.watermark {
|
182 |
-webkit-text-stroke: 1px rgb(0, 0, 0);
|
183 |
paint-order: stroke fill;
|
184 |
color: rgba(255, 255, 255, 0.8);
|
185 |
+
font-size: 100%;
|
186 |
+
}
|
187 |
+
|
188 |
+
.recording {
|
189 |
+
color: red;
|
190 |
+
font-weight: bold;
|
191 |
}
|
192 |
</style>
|
193 |
+
<link id="googleFont" href="https://fonts.googleapis.com/css?family=Noto+Sans+JP" rel="stylesheet">
|
194 |
<style id="fontFamily">
|
195 |
body {
|
196 |
font-family: "Noto Sans JP";
|
|
|
215 |
</div>
|
216 |
<div class="row">
|
217 |
<div class="col-lg-7 p-0 m-0 relative" id="edit">
|
218 |
+
<div id="emptySpace" class="p-0 m-0">
|
219 |
+
<div class="recording d-none">
|
220 |
+
<div>●REC</div>
|
221 |
+
</div>
|
222 |
+
<div class="watermark">
|
223 |
+
<div>Gal-Game UI Editor</div>
|
224 |
+
</div>
|
225 |
+
<div class="watermark">
|
226 |
+
<div>https://huggingface.co/spaces/SenY/GalGameUI</div>
|
227 |
+
</div>
|
228 |
</div>
|
229 |
<div id="messageWindow" class="row">
|
230 |
<div class="col-12 p-0 m-0 h-100">
|
|
|
308 |
<input name="btmAlpha" type="range" class="form-control form-range" id="btmAlpha" value="0.45"
|
309 |
step="0.01" max="1">
|
310 |
</div>
|
311 |
+
<div class="input-group">
|
312 |
+
<span class="input-group-text bg-secondary text-light">GoogleFont</span>
|
313 |
+
<select name="googleFontInput" class="form-control" id="googleFontInput">
|
314 |
+
<option>Aoboshi One</option>
|
315 |
+
<option>BIZ UDGothic</option>
|
316 |
+
<option>BIZ UDMincho</option>
|
317 |
+
<option>BIZ UDPGothic</option>
|
318 |
+
<option>BIZ UDPMincho</option>
|
319 |
+
<option>Cherry Bomb One</option>
|
320 |
+
<option>Chokokutai</option>
|
321 |
+
<option>Darumadrop One</option>
|
322 |
+
<option>Dela Gothic One</option>
|
323 |
+
<option>DotGothic16</option>
|
324 |
+
<option>Hachi Maru Pop</option>
|
325 |
+
<option>Hina Mincho</option>
|
326 |
+
<option>IBM Plex Sans JP</option>
|
327 |
+
<option>Kaisei Decol</option>
|
328 |
+
<option>Kaisei HarunoUmi</option>
|
329 |
+
<option>Kaisei Opti</option>
|
330 |
+
<option>Kaisei Tokumin</option>
|
331 |
+
<option>Kiwi Maru</option>
|
332 |
+
<option>Klee One</option>
|
333 |
+
<option>Kosugi</option>
|
334 |
+
<option>Kosugi Maru</option>
|
335 |
+
<option>M PLUS 1</option>
|
336 |
+
<option>M PLUS 1 Code</option>
|
337 |
+
<option>M PLUS 1p</option>
|
338 |
+
<option>M PLUS 2</option>
|
339 |
+
<option>M PLUS Rounded 1c</option>
|
340 |
+
<option>Mochiy Pop One</option>
|
341 |
+
<option>Mochiy Pop P One</option>
|
342 |
+
<option>Monomaniac One</option>
|
343 |
+
<option>Murecho</option>
|
344 |
+
<option>New Tegomin</option>
|
345 |
+
<option selected="selected">Noto Sans JP</option>
|
346 |
+
<option>Noto Serif JP</option>
|
347 |
+
<option>Palette Mosaic</option>
|
348 |
+
<option>Potta One</option>
|
349 |
+
<option>Rampart One</option>
|
350 |
+
<option>Reggae One</option>
|
351 |
+
<option>Rock 3D</option>
|
352 |
+
<option>RocknRoll One</option>
|
353 |
+
<option>Sawarabi Gothic</option>
|
354 |
+
<option>Sawarabi Mincho</option>
|
355 |
+
<option>Shippori Antique</option>
|
356 |
+
<option>Shippori Antique B1</option>
|
357 |
+
<option>Shippori Mincho</option>
|
358 |
+
<option>Shippori Mincho B1</option>
|
359 |
+
<option>Shizuru</option>
|
360 |
+
<option>Slackside One</option>
|
361 |
+
<option>Stick</option>
|
362 |
+
<option>Train One</option>
|
363 |
+
<option>Tsukimi Rounded</option>
|
364 |
+
<option>Yomogi</option>
|
365 |
+
<option>Yuji Boku</option>
|
366 |
+
<option>Yuji Hentaigana Akari</option>
|
367 |
+
<option>Yuji Hentaigana Akebono</option>
|
368 |
+
<option>Yuji Mai</option>
|
369 |
+
<option>Yuji Syuku</option>
|
370 |
+
<option>Yusei Magic</option>
|
371 |
+
<option>Zen Antique</option>
|
372 |
+
<option>Zen Antique Soft</option>
|
373 |
+
<option>Zen Kaku Gothic Antique</option>
|
374 |
+
<option>Zen Kaku Gothic New</option>
|
375 |
+
<option>Zen Kurenaido</option>
|
376 |
+
<option>Zen Maru Gothic</option>
|
377 |
+
<option>Zen Old Mincho</option>
|
378 |
+
</select>
|
379 |
+
<span class="input-group-text bg-secondary text-light">LocalFont</span>
|
380 |
+
<input name="fontFamilyInput" type="text" class="form-control" id="fontFamilyInput" value="">
|
381 |
+
</div>
|
382 |
<div class="input-group">
|
383 |
<span class="input-group-text bg-secondary text-light">font-size</span>
|
384 |
<input name="fontSizeInput" type="range" class="form-control form-range" id="fontSizeInput"
|
|
|
396 |
<hr>
|
397 |
<div class="input-group">
|
398 |
<button id="waterMarkToggle" type="button" class="btn btn-warning">WaterMark</button>
|
399 |
+
<button id="recordingToggle" type="button" class="btn btn-warning opacity-50">●REC</button>
|
400 |
</div>
|
401 |
<hr>
|
402 |
<h6>
|
|
|
408 |
</a>
|
409 |
</h6>
|
410 |
<div class="collapse" id="collapseExample">
|
|
|
|
|
|
|
|
|
|
|
411 |
<div class="input-group">
|
412 |
<span class="input-group-text bg-secondary text-light">NameSpaceLength</span>
|
413 |
<input name="nameSpaceLength" type="range" class="form-control form-range"
|
|
|
470 |
</ul>
|
471 |
<h2>最近の更新</h2>
|
472 |
<ul>
|
473 |
+
<li>
|
474 |
+
<ul>
|
475 |
+
<li>Google Fontsからフォントを選択できるようにした。</li>
|
476 |
+
</ul>
|
477 |
+
</li>
|
478 |
<li>
|
479 |
<ul>
|
480 |
<li>名前欄とメッセージ欄の行数を変更できるようにした。</li>
|
|
|
643 |
row2.appendChild(shadowText);
|
644 |
input.classList.add("text-light");
|
645 |
input.value = "";
|
646 |
+
if (!window.localStorage.length) {
|
647 |
+
input.value = "Line of " + (i + 1);
|
648 |
}
|
649 |
let v = window.localStorage.getItem(input.name);
|
650 |
if (v) {
|
|
|
673 |
row2.appendChild(shadowText);
|
674 |
input.classList.add("text-light");
|
675 |
input.value = "";
|
676 |
+
if (!window.localStorage.length && i == 2) {
|
677 |
input.value = "Name";
|
678 |
}
|
679 |
let v = window.localStorage.getItem(input.name);
|
|
|
705 |
|
706 |
document.getElementById("left").style.height = (100 + sparse) + "%";
|
707 |
document.getElementById("left").style.top = (-1 * sparse) + "%";
|
708 |
+
document.querySelectorAll("#right input, #left input, #emptySpace>*>*").forEach(el => {
|
|
|
709 |
el.style.fontSize = (el.parentNode.offsetHeight * document.querySelector("#fontSizeInput").value) + "px";
|
710 |
});
|
711 |
}
|
|
|
845 |
f.textContent = 'body { font-family: "' + i.value.trim() + '"; }';
|
846 |
}
|
847 |
});
|
848 |
+
|
849 |
+
|
850 |
+
document.getElementById("googleFontInput").addEventListener("change", function () {
|
851 |
+
let f = document.getElementById("fontFamily");
|
852 |
+
let i = this;
|
853 |
+
document.getElementById("googleFont").setAttribute("href", "https://fonts.googleapis.com/css?family=" + i.value.trim());
|
854 |
+
f.textContent = 'body { font-family: "' + i.value.trim() + '"; }';
|
855 |
+
});
|
856 |
+
|
857 |
document.getElementById("windowSize").addEventListener("change", function () {
|
858 |
document.documentElement.style.setProperty('--messageWindowSize', this.value + "%");
|
859 |
createEditor();
|
|
|
921 |
} else {
|
922 |
document.querySelectorAll(".watermark").forEach(el => el.classList.remove("d-none"));
|
923 |
}
|
924 |
+
createEditor();
|
925 |
+
});
|
926 |
+
document.getElementById("recordingToggle").addEventListener("click", function () {
|
927 |
+
this.classList.toggle("opacity-50");
|
928 |
+
if (this.classList.contains("opacity-50")) {
|
929 |
+
document.querySelectorAll(".recording").forEach(el => el.classList.add("d-none"));
|
930 |
+
} else {
|
931 |
+
document.querySelectorAll(".recording").forEach(el => el.classList.remove("d-none"));
|
932 |
+
}
|
933 |
+
createEditor();
|
934 |
});
|
935 |
|
936 |
document.querySelectorAll("input").forEach(el => {
|