Commit a0f0d5f4 authored by Jeffrey Carl Faden's avatar Jeffrey Carl Faden
Browse files

Use heroicons instead

parent ca23daf6
......@@ -726,3 +726,29 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
https://github.com/hyperreality/American-British-English-Translator
-----------------
For SVG icons (heroicons):
(The MIT License)
Copyright (c) 2020 Refactoring UI Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
https://github.com/tailwindlabs/heroicons
......@@ -281,6 +281,10 @@ similarity of ${(similarityStory.rest * 100).toFixed(2)}.
storage.setItem("puzzleNumber", puzzleNumber);
}
document.querySelectorAll(".dialog-close").forEach((el) => {
el.replaceChildren($("#x-icon").content.cloneNode(true));
});
if (!storage.getItem("readRules")) {
openRules();
}
......
......@@ -51,6 +51,11 @@ h2 {
padding: 0;
}
#menu button svg {
height: 1.5em;
width: 1.5em;
}
.dialog-underlay {
background: rgba(0,0,0,.5);
bottom: 0;
......@@ -220,6 +225,10 @@ body.dark a {
color: #9af;
}
body.dark #menu button {
color: #fafafa;
}
body.dark .dialog {
background: #333;
}
......
......@@ -7,7 +7,6 @@
<script src="assets/js/secretWords.js?2"></script>
<script src="assets/js/clipboard.js"></script>
<script src="assets/js/british_spellings.js"></script>
<script src="https://kit.fontawesome.com/b6eb2a3998.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="assets/styles.css">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon-16x16.png">
......@@ -29,13 +28,23 @@
<header>
<h2>Semantle</h2>
<nav id="menu">
<button aria-label="Rules" id="rules-button"><i class="fa-regular fa-circle-question"></i></button>
<button aria-label="Settings" id="settings-button"><i class="fa-solid fa-gear"></i></button>
<button id="rules-button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" role="img">
<title>Rules</title>
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/>
</svg>
</button>
<button id="settings-button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" role="img">
<title>Settings</title>
<path fill-rule="evenodd" d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd"/>
</svg>
</button>
</nav>
</header>
<div class="dialog-underlay" id="rules-underlay">
<div class="dialog" id="rules" aria-labelledby="rules-heading" aria-modal="true">
<button class="dialog-close" id="rules-close" aria-label="Close"><i class="fa-solid fa-xmark"></i></button>
<button class="dialog-close" id="rules-close">&times;</button>
<div class="dialog-content" id="rules-content">
<h3 id="rules-heading">Guess the secret word</h3>
<p>
......@@ -225,7 +234,7 @@
</footer>
<div class="dialog-underlay" id="settings-underlay">
<div class="dialog" id="settings" aria-labelledby="settings-heading" aria-modal="true">
<button class="dialog-close" id="settings-close" aria-label="Close"><i class="fa-solid fa-xmark"></i></button>
<button class="dialog-close" id="settings-close">&times;</button>
<div class="dialog-content" id="settings-content">
<div>
<input type="checkbox" name="dark-mode" value="dark-mode" id="dark-mode" />
......@@ -238,5 +247,11 @@
</div>
</div>
</div>
<template id="x-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" role="img">
<title>Close</title>
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/>
</svg>
</template>
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment