Update index.html
Browse files- index.html +68 -39
index.html
CHANGED
|
@@ -18,6 +18,22 @@
|
|
| 18 |
font-family: "Noto Sans JP";
|
| 19 |
}
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
#left {
|
| 22 |
background-repeat: no-repeat;
|
| 23 |
background-position: center bottom;
|
|
@@ -265,6 +281,7 @@
|
|
| 265 |
<div class="input-group">
|
| 266 |
<button id="render" type="button" class="btn btn-success">Render</button>
|
| 267 |
</div>
|
|
|
|
| 268 |
<h6>Image</h6>
|
| 269 |
<div class="input-group">
|
| 270 |
<label for="upload">
|
|
@@ -280,7 +297,8 @@
|
|
| 280 |
<button id="faceRemoveButton" type="button" class="btn btn-danger">Remove Icon</button>
|
| 281 |
</label>
|
| 282 |
</div>
|
| 283 |
-
<
|
|
|
|
| 284 |
<div class="input-group">
|
| 285 |
<span class="input-group-text bg-secondary text-light">TopColor</span>
|
| 286 |
<input name="topColor" type="color" class="form-control form-control-color" id="topColor"
|
|
@@ -299,11 +317,6 @@
|
|
| 299 |
<input name="btmAlpha" type="range" class="form-control form-range" id="btmAlpha" value="0.45"
|
| 300 |
step="0.01" max="1">
|
| 301 |
</div>
|
| 302 |
-
<h6>Font</h6>
|
| 303 |
-
<div class="input-group">
|
| 304 |
-
<span class="input-group-text bg-secondary text-light">font-family</span>
|
| 305 |
-
<input name="fontFamilyInput" type="text" class="form-control" id="fontFamilyInput" value="">
|
| 306 |
-
</div>
|
| 307 |
<div class="input-group">
|
| 308 |
<span class="input-group-text bg-secondary text-light">font-size</span>
|
| 309 |
<input name="fontSizeInput" type="range" class="form-control form-range" id="fontSizeInput"
|
|
@@ -318,36 +331,51 @@
|
|
| 318 |
<button id="userInterfaceToggle" type="button"
|
| 319 |
class="btn btn-primary opacity-50">Fake-UI</button>
|
| 320 |
</div>
|
| 321 |
-
<
|
| 322 |
-
<div class="input-group">
|
| 323 |
-
<span class="input-group-text bg-secondary text-light">WindowSize</span>
|
| 324 |
-
<input name="windowSize" type="range" class="form-control form-range" id="windowSize" value="25"
|
| 325 |
-
step="1" min="16" max="30">
|
| 326 |
-
<span class="input-group-text bg-secondary text-light">Padding</span>
|
| 327 |
-
<input name="mainMessagePaddingSize" type="range" class="form-control form-range"
|
| 328 |
-
id="mainMessagePaddingSize" value="0" step="0.1" min="0" max="2">
|
| 329 |
-
</div>
|
| 330 |
-
<div class="input-group">
|
| 331 |
-
<span class="input-group-text bg-secondary text-light">StrokeColor</span>
|
| 332 |
-
<input name="strokeColor" type="color" class="form-control form-control-color" id="strokeColor"
|
| 333 |
-
value="#000000">
|
| 334 |
-
<span class="input-group-text bg-secondary text-light">StrokeWeight</span>
|
| 335 |
-
<input name="strokeWeight" type="range" class="form-control form-range" id="strokeWeight"
|
| 336 |
-
value="0.05" step="0.01" min="0.01" max="0.2">
|
| 337 |
-
</div>
|
| 338 |
<div class="input-group">
|
| 339 |
<button id="waterMarkToggle" type="button" class="btn btn-warning">WaterMark</button>
|
| 340 |
</div>
|
| 341 |
-
<div class="input-group">
|
| 342 |
-
<span class="input-group-text bg-secondary text-light">Render Scale</span>
|
| 343 |
-
<input name="renderScale" type="range" class="form-control form-range" id="renderScale"
|
| 344 |
-
value="2" step="0.5" min="1" max="4">
|
| 345 |
-
</div>
|
| 346 |
<hr>
|
| 347 |
-
<
|
| 348 |
-
<
|
| 349 |
-
|
| 350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
</div>
|
| 352 |
</div>
|
| 353 |
<div class="col-lg-12 text-light bg-dark bg-gradient p-4" id="help">
|
|
@@ -372,8 +400,9 @@
|
|
| 372 |
<ul>
|
| 373 |
<li>
|
| 374 |
<ul>
|
| 375 |
-
<li
|
| 376 |
-
<li
|
|
|
|
| 377 |
</ul>
|
| 378 |
</li>
|
| 379 |
</ul>
|
|
@@ -663,13 +692,13 @@
|
|
| 663 |
const setStroke = function (mode) {
|
| 664 |
let strokeSize = Math.ceil(document.querySelector("#left input").style.fontSize.replace("px", "") * document.getElementById("strokeWeight").value);
|
| 665 |
let strokeColor = hex2rgb(document.getElementById("strokeColor").value);
|
| 666 |
-
let css = '.shadow-text {-webkit-text-stroke: ' + strokeSize + 'px rgb(0, 0, 0) ;paint-order: stroke fill;}'.replaceAll('rgb(0, 0, 0)', 'rgb('+strokeColor+')');
|
| 667 |
-
let css2 = '#mainMassage input {text-shadow: 1px -0px 0 rgb(0, 0, 0), 1px 0px 0 rgb(0, 0, 0), 1px 1px 0 rgb(0, 0, 0), 0px 1px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0), -1px 0px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0);}'.replaceAll('rgb(0, 0, 0)', 'rgb('+strokeColor+')');
|
| 668 |
document.getElementById("text-shadow").textContent = css;
|
| 669 |
document.getElementById("text-shadowPreview").textContent = css2;
|
| 670 |
-
if(mode == "b"){
|
| 671 |
-
document.getElementById("text-shadow").textContent = '.shadow-text {text-shadow: 1px -0px 0 rgb(0, 0, 0), 1px 0px 0 rgb(0, 0, 0), 1px 1px 0 rgb(0, 0, 0), 0px 1px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0), -1px 0px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0);}'.replaceAll('rgb(0, 0, 0)', 'rgb('+strokeColor+')');
|
| 672 |
-
document.getElementById("text-shadowPreview").textContent = '#mainMassage input {text-shadow: 1px -0px 0 rgb(0, 0, 0), 1px 0px 0 rgb(0, 0, 0), 1px 1px 0 rgb(0, 0, 0), 0px 1px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0), -1px 0px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0);}'.replaceAll('rgb(0, 0, 0)', 'rgb('+strokeColor+')');
|
| 673 |
}
|
| 674 |
}
|
| 675 |
setStroke();
|
|
|
|
| 18 |
font-family: "Noto Sans JP";
|
| 19 |
}
|
| 20 |
|
| 21 |
+
[aria-expanded=false] .text-expanded {
|
| 22 |
+
display: none;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
[aria-expanded=true] .text-collapsed {
|
| 26 |
+
display: none;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
a {
|
| 30 |
+
color: inherit;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
hr {
|
| 34 |
+
margin: 0.5rem;
|
| 35 |
+
padding: 0;
|
| 36 |
+
}
|
| 37 |
#left {
|
| 38 |
background-repeat: no-repeat;
|
| 39 |
background-position: center bottom;
|
|
|
|
| 281 |
<div class="input-group">
|
| 282 |
<button id="render" type="button" class="btn btn-success">Render</button>
|
| 283 |
</div>
|
| 284 |
+
<hr>
|
| 285 |
<h6>Image</h6>
|
| 286 |
<div class="input-group">
|
| 287 |
<label for="upload">
|
|
|
|
| 297 |
<button id="faceRemoveButton" type="button" class="btn btn-danger">Remove Icon</button>
|
| 298 |
</label>
|
| 299 |
</div>
|
| 300 |
+
<hr>
|
| 301 |
+
<h6>Window</h6>
|
| 302 |
<div class="input-group">
|
| 303 |
<span class="input-group-text bg-secondary text-light">TopColor</span>
|
| 304 |
<input name="topColor" type="color" class="form-control form-control-color" id="topColor"
|
|
|
|
| 317 |
<input name="btmAlpha" type="range" class="form-control form-range" id="btmAlpha" value="0.45"
|
| 318 |
step="0.01" max="1">
|
| 319 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
<div class="input-group">
|
| 321 |
<span class="input-group-text bg-secondary text-light">font-size</span>
|
| 322 |
<input name="fontSizeInput" type="range" class="form-control form-range" id="fontSizeInput"
|
|
|
|
| 331 |
<button id="userInterfaceToggle" type="button"
|
| 332 |
class="btn btn-primary opacity-50">Fake-UI</button>
|
| 333 |
</div>
|
| 334 |
+
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 335 |
<div class="input-group">
|
| 336 |
<button id="waterMarkToggle" type="button" class="btn btn-warning">WaterMark</button>
|
| 337 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 338 |
<hr>
|
| 339 |
+
<h6>
|
| 340 |
+
<a data-bs-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false"
|
| 341 |
+
aria-controls="collapseExample">
|
| 342 |
+
Advanced
|
| 343 |
+
<i class="fa fa-angle-left text-expanded"></i>
|
| 344 |
+
<i class="fa fa-angle-down text-collapsed"></i>
|
| 345 |
+
</a>
|
| 346 |
+
</h6>
|
| 347 |
+
<div class="collapse" id="collapseExample">
|
| 348 |
+
<div class="input-group">
|
| 349 |
+
<span class="input-group-text bg-secondary text-light">font-family</span>
|
| 350 |
+
<input name="fontFamilyInput" type="text" class="form-control" id="fontFamilyInput" value="">
|
| 351 |
+
</div>
|
| 352 |
+
<div class="input-group">
|
| 353 |
+
<span class="input-group-text bg-secondary text-light">StrokeColor</span>
|
| 354 |
+
<input name="strokeColor" type="color" class="form-control form-control-color"
|
| 355 |
+
id="strokeColor" value="#000000">
|
| 356 |
+
<span class="input-group-text bg-secondary text-light">StrokeWeight</span>
|
| 357 |
+
<input name="strokeWeight" type="range" class="form-control form-range" id="strokeWeight"
|
| 358 |
+
value="0.05" step="0.01" min="0.01" max="0.2">
|
| 359 |
+
</div>
|
| 360 |
+
<div class="input-group">
|
| 361 |
+
<span class="input-group-text bg-secondary text-light">WindowSize</span>
|
| 362 |
+
<input name="windowSize" type="range" class="form-control form-range" id="windowSize"
|
| 363 |
+
value="25" step="1" min="16" max="30">
|
| 364 |
+
<span class="input-group-text bg-secondary text-light">Padding</span>
|
| 365 |
+
<input name="mainMessagePaddingSize" type="range" class="form-control form-range"
|
| 366 |
+
id="mainMessagePaddingSize" value="0" step="0.1" min="0" max="2">
|
| 367 |
+
</div>
|
| 368 |
+
<div class="input-group">
|
| 369 |
+
<span class="input-group-text bg-secondary text-light">Render Scale</span>
|
| 370 |
+
<input name="renderScale" type="range" class="form-control form-range" id="renderScale"
|
| 371 |
+
value="2" step="0.5" min="1" max="4">
|
| 372 |
+
</div>
|
| 373 |
+
<hr>
|
| 374 |
+
<div class="input-group">
|
| 375 |
+
<label for="upload">
|
| 376 |
+
<button id="resetStorage" type="button" class="btn btn-danger">ResetCookies</button>
|
| 377 |
+
</label>
|
| 378 |
+
</div>
|
| 379 |
</div>
|
| 380 |
</div>
|
| 381 |
<div class="col-lg-12 text-light bg-dark bg-gradient p-4" id="help">
|
|
|
|
| 400 |
<ul>
|
| 401 |
<li>
|
| 402 |
<ul>
|
| 403 |
+
<li>UIを整理すると共にAdvanced部を折りたたむようにした。</li>
|
| 404 |
+
<li>ストロークの色と太さの変更に対応した。</li>
|
| 405 |
+
<li>ストロークの選択をデフォルトでRecommendedにすると共に、プレビューは常にプレビュー用のCSSを使うよう仕様変更した。</li>
|
| 406 |
</ul>
|
| 407 |
</li>
|
| 408 |
</ul>
|
|
|
|
| 692 |
const setStroke = function (mode) {
|
| 693 |
let strokeSize = Math.ceil(document.querySelector("#left input").style.fontSize.replace("px", "") * document.getElementById("strokeWeight").value);
|
| 694 |
let strokeColor = hex2rgb(document.getElementById("strokeColor").value);
|
| 695 |
+
let css = '.shadow-text {-webkit-text-stroke: ' + strokeSize + 'px rgb(0, 0, 0) ;paint-order: stroke fill;}'.replaceAll('rgb(0, 0, 0)', 'rgb(' + strokeColor + ')');
|
| 696 |
+
let css2 = '#mainMassage input {text-shadow: 1px -0px 0 rgb(0, 0, 0), 1px 0px 0 rgb(0, 0, 0), 1px 1px 0 rgb(0, 0, 0), 0px 1px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0), -1px 0px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0);}'.replaceAll('rgb(0, 0, 0)', 'rgb(' + strokeColor + ')');
|
| 697 |
document.getElementById("text-shadow").textContent = css;
|
| 698 |
document.getElementById("text-shadowPreview").textContent = css2;
|
| 699 |
+
if (mode == "b") {
|
| 700 |
+
document.getElementById("text-shadow").textContent = '.shadow-text {text-shadow: 1px -0px 0 rgb(0, 0, 0), 1px 0px 0 rgb(0, 0, 0), 1px 1px 0 rgb(0, 0, 0), 0px 1px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0), -1px 0px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0);}'.replaceAll('rgb(0, 0, 0)', 'rgb(' + strokeColor + ')');
|
| 701 |
+
document.getElementById("text-shadowPreview").textContent = '#mainMassage input {text-shadow: 1px -0px 0 rgb(0, 0, 0), 1px 0px 0 rgb(0, 0, 0), 1px 1px 0 rgb(0, 0, 0), 0px 1px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0), -1px 0px 0 rgb(0, 0, 0), -1px -1px 0 rgb(0, 0, 0);}'.replaceAll('rgb(0, 0, 0)', 'rgb(' + strokeColor + ')');
|
| 702 |
}
|
| 703 |
}
|
| 704 |
setStroke();
|