]> git.ardis.lu - ard.is/commitdiff
Deduplicate ASCII art
authorArdis Lu <ardisglu@gmail.com>
Mon, 27 May 2024 00:02:08 +0000 (17:02 -0700)
committerArdis Lu <ardisglu@gmail.com>
Mon, 27 May 2024 00:02:08 +0000 (17:02 -0700)
index.html

index 080afd65db9f843a36fc3083cfd40139beea7f5f..1af9df83ce5ef2327bd022c38c15cdba72a5e315 100644 (file)
 
 <body>
   <main>
-    <pre role="img" aria-label="Minimalist ASCII art showing the text 'ard.is'." id="ascii-container"><noscript>               _
-              | |  (_)
-  ____ ____ __| |   _ ___
+    <pre role="img" aria-label="Minimalist ASCII art showing the text 'ard.is'." id="ascii-container"><noscript>               _          
+              | |  (_)    
+  ____ ____ __| |   _ ___ 
  / _  |  __/ _  |  | | __|
 | |_| | | | |_| |  | |__ |
 |_____|_| |_____|(_)_|___|</noscript></pre>
     const msPerFrame = 50; // 1000ms / 20fps = 50
     const totalFrames = 100; // 50 * 100 = 5s animation duration
     const cycle = '<>?\\[]{}-~`*+=.!@#$%^&'; // Characters to cycle through randomly before settling
-    const ascii =
-`               _          
-              | |  (_)    
-  ____ ____ __| |   _ ___ 
- / _  |  __/ _  |  | | __|
-| |_| | | | |_| |  | |__ |
-|_____|_| |_____|(_)_|___|`;
+    const ascii = asciiContainer.textContent;
 
     // Pre-generate all frames for the animation 
     const rng = [...crypto.getRandomValues(new Uint8Array(ascii.length * totalFrames))];
This page took 0.044062 seconds and 4 git commands to generate.