|
121 | 121 | display: block; |
122 | 122 | } |
123 | 123 |
|
| 124 | + .bracket-both::before, |
| 125 | + .bracket-left::before { |
| 126 | + content: "⌜ "; |
| 127 | + } |
| 128 | + |
| 129 | + .bracket-both::after, |
| 130 | + .bracket-right::after { |
| 131 | + content: " ⌟"; |
| 132 | + } |
| 133 | + |
124 | 134 | /* options */ |
125 | | - #nav-container a.mode-b, |
126 | | - #nav-container a.mode-bm, |
127 | | - #nav-container a.mode-bu, |
128 | | - #nav-container a.mode-4c { |
| 135 | + #nav-container label.mode-b, |
| 136 | + #nav-container label.mode-bm, |
| 137 | + #nav-container label.mode-bu, |
| 138 | + #nav-container label.mode-4c { |
129 | 139 | color: #555; |
130 | 140 | } |
131 | 141 |
|
132 | | - #nav-container.mode-b a.mode-b, |
133 | | - #nav-container.mode-bm a.mode-bm, |
134 | | - #nav-container.mode-bu a.mode-bu, |
135 | | - #nav-container.mode-4c a.mode-4c { |
| 142 | + #nav-container.mode-b label.mode-b, |
| 143 | + #nav-container.mode-bm label.mode-bm, |
| 144 | + #nav-container.mode-bu label.mode-bu, |
| 145 | + #nav-container.mode-4c label.mode-4c { |
136 | 146 | color: #9fa6b2; |
137 | 147 | } |
138 | 148 |
|
|
298 | 308 | border: 1px solid #444; |
299 | 309 | } |
300 | 310 |
|
301 | | - #nav-content li a { |
| 311 | + /* resets */ |
| 312 | + .mode-fieldset { |
| 313 | + border: none; |
| 314 | + padding: 0; |
| 315 | + margin: 0; |
| 316 | + } |
| 317 | + |
| 318 | + .nav-action { |
| 319 | + background: none; |
| 320 | + border: none; |
| 321 | + font-family: inherit; |
| 322 | + cursor: pointer; |
| 323 | + width: 100%; |
| 324 | + text-align: inherit; |
| 325 | + color: inherit; |
| 326 | + } |
| 327 | + |
| 328 | + .sr-only { |
| 329 | + position: absolute; |
| 330 | + width: 1px; |
| 331 | + height: 1px; |
| 332 | + padding: 0; |
| 333 | + margin: -1px; |
| 334 | + overflow: hidden; |
| 335 | + clip: rect(0, 0, 0, 0); |
| 336 | + border: 0; |
| 337 | + } |
| 338 | + |
| 339 | + .nav-heading { |
| 340 | + display: block; |
| 341 | + width: 100%; |
| 342 | + text-align: center; |
| 343 | + margin: 0 auto; |
| 344 | + font-weight: bold; |
| 345 | + font-size: 1.1em; |
| 346 | + color: inherit; |
| 347 | + } |
| 348 | + |
| 349 | + /* nav pt 2 */ |
| 350 | + #nav-content li a, |
| 351 | + #nav-content li .nav-action { |
302 | 352 | display: block; |
303 | 353 | padding: 10px 5px; |
304 | 354 | color: #9fa6b2; |
305 | 355 | text-decoration: none; |
306 | 356 | transition: color .1s; |
307 | 357 | } |
308 | 358 |
|
309 | | - #nav-content li a.attention { |
| 359 | + #nav-content li:hover, |
| 360 | + #nav-content li a:hover, |
| 361 | + #nav-content li .nav-action:hover { |
| 362 | + background-color: #2c323c; |
| 363 | + } |
| 364 | + |
| 365 | + #nav-content li a:focus, |
| 366 | + #nav-content li .nav-action:focus, |
| 367 | + .mode-radios input[type="radio"]:focus+label { |
310 | 368 | animation: glowing 1.5s infinite alternate; |
| 369 | + background-color: #2c323c; |
| 370 | + outline: 0px; |
311 | 371 | } |
312 | 372 |
|
313 | | - #nav-content li a { |
| 373 | + #fps-slider:focus { |
| 374 | + background-color: #2c323c; |
| 375 | + outline: 2px solid #00ffff; |
| 376 | + outline-offset: 4px; |
| 377 | + } |
| 378 | + |
| 379 | + #nav-content li a, |
| 380 | + #nav-content li .nav-action, |
| 381 | + #nav-content li.modesel label { |
314 | 382 | font-variant: small-caps; |
315 | 383 | font-size: 2em; |
316 | 384 | } |
317 | 385 |
|
318 | | - #nav-content h4 { |
| 386 | + #nav-content h4, |
| 387 | + #nav-content .nav-heading { |
319 | 388 | font-variant: small-caps; |
320 | 389 | padding-top: 1em; |
321 | 390 | } |
322 | 391 |
|
323 | | - #nav-content li.modesel a { |
| 392 | + #nav-content li.modesel a, |
| 393 | + #nav-content li.modesel label { |
324 | 394 | display: inline-block; |
325 | 395 | width: 2em; |
326 | | - } |
327 | | - |
328 | | - #nav-content li:hover { |
329 | | - background-color: #2c323c; |
| 396 | + cursor: pointer; |
| 397 | + padding: 10px 5px; |
330 | 398 | } |
331 | 399 |
|
332 | 400 | #nav-content li:not(.small)+.small { |
|
338 | 406 | align-self: center; |
339 | 407 | } |
340 | 408 |
|
341 | | - #nav-content li.small a { |
| 409 | + #nav-content li.small a, |
| 410 | + #nav-content li.small .nav-action { |
342 | 411 | font-size: 1em; |
343 | 412 | } |
344 | 413 |
|
|
361 | 430 | <div id="status"></div> |
362 | 431 | <div id="dragdrop" class="dragdrop" title="Drag and drop a file" onclick="Main.clickNav()"> |
363 | 432 | <div class="drop-message"> |
364 | | - <p class="msg-default">⌜ Tap to start! ⌟</p> |
365 | | - <p class="msg-error">⌜ Error! WebGL is not enabled :( ⌟</p> |
366 | | - <p class="msg-default msg-bottom">⌜ PHOTOSENSITIVITY WARNING!</p> |
| 433 | + <p class="msg-default bracket-both">Tap to start!</p> |
| 434 | + <p class="msg-error bracket-both">Error! WebGL is not enabled :(</p> |
| 435 | + <p class="msg-default msg-bottom bracket-left">PHOTOSENSITIVITY WARNING!</p> |
367 | 436 | <p class="msg-default msg-long">Photosensitive epilepsy + flickering lights = seizures!</p> |
368 | | - <p class="msg-default msg-long">Be safe! Have fun! ⌟</p> |
| 437 | + <p class="msg-default msg-long bracket-right">Be safe! Have fun!</p> |
369 | 438 | </div> |
370 | 439 | <canvas id="canvas" class="canvas"></canvas> |
371 | 440 | </div> |
|
374 | 443 |
|
375 | 444 | <div id="nav-container" class="mode-b"> |
376 | 445 | <div class="bg" onpointerdown="Main.blurNav(); event.preventDefault();"></div> |
377 | | - <button id="nav-button" tabindex="0" onclick="Main.clickNav();"> |
| 446 | + <button id="nav-button" tabindex="0" onclick="Main.clickNav();" aria-label="Open Menu"> |
378 | 447 | <span class="icon-bar"></span> |
379 | 448 | <span class="icon-bar"></span> |
380 | 449 | <span class="icon-bar"></span> |
|
383 | 452 | <div id="nav-content" tabindex="-1"> |
384 | 453 | <span id="current-file">No file selected</span> |
385 | 454 | <ul> |
386 | | - <li><a class="attention" id="nav-find-file-link" href="javascript:void(0)" onclick="Main.clickFileInput()">Find |
387 | | - File</a></li> |
| 455 | + <li> |
| 456 | + <button type="button" class="nav-action" id="nav-find-file-link" onclick="Main.clickFileInput()">Find |
| 457 | + File</button> |
| 458 | + </li> |
388 | 459 | <hr> |
389 | 460 | <li class="modesel"> |
390 | | - <h4>Mode</h4> |
391 | | - <a class="mode-b" href="javascript:void(0)" onclick="Main.setMode('B')">B</a> |
392 | | - <a class="mode-bm" href="javascript:void(0)" onclick="Main.setMode('Bm')">Bm</a> |
393 | | - <a class="mode-bu" href="javascript:void(0)" onclick="Main.setMode('Bu')">Bu</a> |
394 | | - <a class="mode-4c" href="javascript:void(0)" onclick="Main.setMode('4C')">4C</a> |
| 461 | + <fieldset class="mode-fieldset"> |
| 462 | + <legend class="nav-heading">Mode</legend> |
| 463 | + <div class="mode-radios"> |
| 464 | + <input type="radio" class="sr-only" name="mode" id="mode-b" value="B" onclick="Main.setMode('B')" checked> |
| 465 | + <label for="mode-b" class="mode-b">B</label> |
| 466 | + |
| 467 | + <input type="radio" class="sr-only" name="mode" id="mode-bm" value="Bm" onclick="Main.setMode('Bm')"> |
| 468 | + <label for="mode-bm" class="mode-bm">Bm</label> |
| 469 | + |
| 470 | + <input type="radio" class="sr-only" name="mode" id="mode-bu" value="Bu" onclick="Main.setMode('Bu')"> |
| 471 | + <label for="mode-bu" class="mode-bu">Bu</label> |
| 472 | + |
| 473 | + <input type="radio" class="sr-only" name="mode" id="mode-4c" value="4C" onclick="Main.setMode('4C')"> |
| 474 | + <label for="mode-4c" class="mode-4c">4C</label> |
| 475 | + </div> |
| 476 | + </fieldset> |
395 | 477 | </li> |
396 | 478 | <li> |
397 | | - <h4>Framerate</h4> |
398 | | - <input type="range" class="range" min="5" max="20" step="5" value="15" oninput="Main.setFPS(this.value)" |
399 | | - onchange="Main.setFPS(this.value)" /> |
| 479 | + <label for="fps-slider" class="nav-heading">Framerate</label> |
| 480 | + <input type="range" id="fps-slider" class="range" min="5" max="20" step="5" value="15" |
| 481 | + oninput="Main.setFPS(this.value)" onchange="Main.setFPS(this.value)" /> |
| 482 | + </li> |
| 483 | + <li class="small"> |
| 484 | + <button type="button" class="nav-action" onclick="Main.toggleFullscreen()">Fullscreen</button> |
400 | 485 | </li> |
401 | | - <li class="small"><a href="javascript:void(0)" onclick="Main.toggleFullscreen()">Fullscreen</a></li> |
402 | 486 | <li class="small"><a href="https://github.com/sz3/libcimbar">github</a></li> |
403 | 487 | <li class="small"><a href="https://github.com/sz3/cfc/releases/latest">android app</a></li> |
404 | 488 | </ul> |
|
0 commit comments