minesweeper/src/main/index.html

215 lines
9.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="Florine W. Dekker" />
<meta name="application-name" content="Minesweeper" />
<meta name="description" content="Just Minesweeper!" />
<meta name="theme-color" content="#0033cc" />
<meta name="fwd:auto:show-main" />
<meta name="fwd:nav:target" content="#nav" />
<meta name="fwd:nav:highlight-path" content="/Tools/Minesweeper/" />
<meta name="fwd:footer:target" content="#footer" />
<meta name="fwd:footer:vcs-url" content="https://git.fwdekker.com/tools/minesweeper/" />
<meta name="fwd:footer:version" content="v%%VERSION_NUMBER%%" />
<title>Minesweeper | FWDekker</title>
<link rel="stylesheet" href="https://static.fwdekker.com/fonts/fork-awesome/1.x.x/fork-awesome.css" />
<link rel="stylesheet" href="https://static.fwdekker.com/lib/template/3.x.x/template.css?v=%%VERSION_NUMBER%%" />
<!--suppress HtmlUnknownTarget -->
<link rel="stylesheet" href="main.css?v=%%VERSION_NUMBER%%" />
<script async src="https://stats.fwdekker.com/count.js"
data-goatcounter="https://stats.fwdekker.com/count"></script>
</head>
<body>
<noscript class="fwd-js-notice">
<img src="https://stats.fwdekker.com/count?p=/tools/minesweeper/" alt="Counting pixel" />
<p>
This website does not function if JavaScript is disabled.
Please check the <a href="https://www.enable-javascript.com/">
instructions on how to enable JavaScript in your web browser</a>.
</p>
</noscript>
<nav id="nav"></nav>
<main class="container hidden">
<div role="document">
<section>
<header class="fwd-header">
<hgroup>
<h1><a href=".">Minesweeper</a></h1>
<h2>Just Minesweeper!</h2>
</hgroup>
</header>
<article>
<header class="controls-group">
<div class="controls">
<a role="button" href="#" id="preferences-open"><i class="fa fa-cogs"></i>&emsp;Preferences</a>
<a role="button" href="#" id="statistics-open"><i class="fa fa-tachometer"></i>&emsp;Statistics</a>
<a role="button" href="#" id="high-scores-open">
<i class="fa fa-trophy"></i>&emsp;High scores</a>
</div>
<div class="controls">
<a role="button" href="#" id="new-game"><i class="fa fa-random"></i>&emsp;New game</a>
<a role="button" href="#" id="restart"><i class="fa fa-sync"></i>&emsp;Restart game</a>
<a role="button" href="#" id="seed-open"><i class="fa fa-tree"></i>&emsp;Enter seed</a>
</div>
<div class="controls">
<!--suppress HtmlFormInputWithoutLabel -->
<select id="difficulty">
<option>Select difficulty</option>
</select>
</div>
</header>
<div id="canvas-container">
<canvas id="canvas" class="hidden" width="1" height="1">
Your browser must support the &lt;canvas&gt; element to run this game.
</canvas>
</div>
<footer class="controls">
<a role="button" id="undo"><i class="fa fa-undo"></i>&emsp;Undo</a>
<a role="button" id="redo"><i class="fa fa-repeat"></i>&emsp;Redo</a>
<a role="button" id="hint"><i class="fa fa-lightbulb-o"></i>&emsp;Hint</a>
<a role="button" id="solve"><i class="fa fa-key"></i>&emsp;Solve</a>
</footer>
</article>
</section>
<footer id="footer"></footer>
</div>
<!-- Custom difficulty dialog -->
<dialog id="custom-difficulty-dialog">
<article>
<header>
<hgroup>
<h1>Custom difficulty</h1>
<h2>Configure a custom difficulty.</h2>
</hgroup>
</header>
<form id="custom-difficulty-form">
<label for="settings-width">Width</label>
<input type="number" id="settings-width" min="3" max="99" value="9" autofocus />
<label for="settings-height">Height</label>
<input type="number" id="settings-height" min="3" max="99" value="9" />
<label for="settings-mines">Mines</label>
<input type="number" id="settings-mines" min="0" value="10" />
<input type="checkbox" id="settings-solvable" />
<label for="settings-solvable">Ensure solvability. <small>(Slow for complex settings.)</small></label>
</form>
<footer>
<a role="button" href="#" id="custom-difficulty-cancel" class="secondary">Cancel</a>
<a role="button" href="#" id="custom-difficulty-submit">New game</a>
</footer>
</article>
</dialog>
<!-- Seed input dialog -->
<dialog id="seed-dialog">
<article>
<header>
<hgroup>
<h1>Seed</h1>
<h2>
Enter a number to generate a minefield with.
Given a difficulty level and first click position, the same seed always generates the exact same
minefield.
</h2>
</hgroup>
</header>
<form id="seed-form">
<!--suppress HtmlFormInputWithoutLabel Only one input, so header already explains everything -->
<input id="seed" autofocus />
</form>
<footer>
<a role="button" href="#" id="seed-cancel" class="secondary">Cancel</a>
<a role="button" href="#" id="seed-submit">New game</a>
</footer>
</article>
</dialog>
<!-- Preferences dialog -->
<dialog id="preferences-dialog">
<article>
<header>
<hgroup>
<h1>Preferences</h1>
<h2>Configure the gameplay to your liking.</h2>
</hgroup>
</header>
<article>
Options marked with * make the game considerably easier, and are not recommended except for learning.
</article>
<form id="preferences-form">
<input role="switch" type="checkbox" id="preferences-enable-marks" autofocus />
<label for="preferences-enable-marks">Right-clicking a square twice places a question mark.</label>
<br /><br />
<input role="switch" type="checkbox" id="preferences-show-too-many-flags-hints" />
<label for="preferences-show-too-many-flags-hints">
Highlight squares in red if there are too many adjacent flags.
</label>
<br /><br />
<input role="switch" type="checkbox" id="preferences-show-chordable-hints" />
<label for="preferences-show-chordable-hints">
*Highlight squares in green if they can be
<a href="https://www.minesweeper.info/wiki/Chord">chorded</a>.
</label>
<br /><br />
<input role="switch" type="checkbox" id="preferences-show-all-neighbors-are-mines-hints" />
<label for="preferences-show-all-neighbors-are-mines-hints">
*Highlight squares in green if all neighbors have mines.
</label>
</form>
<footer>
<a role="button" href="#" id="preferences-cancel" class="secondary">Cancel</a>
<a role="button" href="#" id="preferences-submit">Save</a>
</footer>
</article>
</dialog>
<!-- Statistics dialog -->
<dialog id="statistics-dialog">
<article tabindex="-1" autofocus>
<header>
<hgroup>
<h1>Statistics</h1>
<h2>Your achievements expressed in numbers.</h2>
</hgroup>
</header>
<div id="statistics-div"></div>
<footer>
<a role="button" href="#" id="statistics-close" class="secondary">Close</a>
<a role="button" href="#" id="statistics-reset" class="secondary">Reset</a>
</footer>
</article>
</dialog>
<!-- High scores dialog -->
<dialog id="high-scores-dialog">
<article tabindex="-1" autofocus>
<header>
<hgroup>
<h1>High scores</h1>
<h2>Your best moments playing Minesweeper.</h2>
</hgroup>
</header>
<div id="high-scores-div"></div>
<footer>
<a role="button" href="#" id="high-scores-close" class="secondary">Close</a>
<a role="button" href="#" id="high-scores-reset" class="secondary">Reset</a>
</footer>
</article>
</dialog>
</main>
<script src="https://static.fwdekker.com/lib/template/3.x.x/template.js?v=%%VERSION_NUMBER%%"></script>
<!--suppress HtmlUnknownTarget -->
<script src="bundle.js?v=%%VERSION_NUMBER%%"></script>
</body>
</html>