feat(web): update html and css for lighthouse performance
authorMA Beaudet <ma@beaudet.xyz>
Thu, 4 Nov 2021 18:01:23 +0000 (19:01 +0100)
committerMA Beaudet <ma@beaudet.xyz>
Thu, 4 Nov 2021 18:01:23 +0000 (19:01 +0100)
static/index.html
static/robots.txt [new file with mode: 0644]
static/styles.css

index a9abd05..107ab1a 100644 (file)
@@ -1,15 +1,16 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
   <head>
-    <meta charset="utf-8">
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
+    <meta name="description" content="A simple and fast poker hand evaluator" />
     <title>Poker hand evaluator</title>
     <link rel="stylesheet" href="styles.css" />
-    <link rel="icon" href="favicon.ico" type="image/x-icon">
+    <link rel="icon" href="favicon.ico" type="image/x-icon" />
   </head>
   <body>
     <noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>
     <h1>Poker hand evaluator</h1>
-    <p>Based on Kevin L. Suffecool <a href="http://suffe.cool/poker/evaluator.html">poker hand evaluator</a>.</p>
     <p>Returns the hand's equivalence value.
     The evaluator orders hands from 1 to 7462.
     The lower the score is, the better it is.
@@ -21,7 +22,8 @@
     <input class="input" id="eval-input" placeholder="2s 3d Td Kc 2d" type="text" />
     <button class="input" id="eval-button" type="submit">Evaluate</button>
     <div id="result">Score:<br />Hand value:</div>
-    <footer>Code available on my <a href="https://git.beaudet.xyz/?p=poker-eval.git">git repository</a>
-      <script src="index.js" type="module" defer></script>
+    <p>Based on Kevin L. Suffecool <a href="http://suffe.cool/poker/evaluator.html">poker hand evaluator</a>.</p>
+    <footer>Code available on my <a href="https://git.beaudet.xyz/?p=poker-eval.git">git repository</a></footer>
+    <script src="index.js" type="module" defer></script>
   </body>
 </html>
diff --git a/static/robots.txt b/static/robots.txt
new file mode 100644 (file)
index 0000000..a77ff4b
--- /dev/null
@@ -0,0 +1,2 @@
+User-agent:*
+Disallow:
index fa81fe6..d2abf41 100644 (file)
@@ -17,11 +17,24 @@ body {
   display: grid;
   place-content: center;
   gap: 0.5rem;
+  font-size: 1.10rem;
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
   background-color: #e9f2fd;
   padding: 1rem;
 }
 
+h1 {
+  font-size: clamp(1.75rem, 4vw + 1rem, 3rem);
+}
+
+a {
+  text-decoration-line: none;
+}
+
+p {
+  line-height: 1.5;
+}
+
 label {
   font-size: 1.125rem;
   font-weight: 500;