Fork of atp.tools as a universal profile for people on the ATmosphere
at main 1.5 kB view raw
1<!doctype html> 2<html lang="en"> 3 <head> 4 <meta charset="UTF-8" /> 5 <link rel="icon" type="image/svg+xml" href="/atpt.png" /> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 7 <script 8 defer 9 src="https://watson.nat.vg/script.js" 10 data-website-id="14b61ed2-7f2d-41bc-8012-38087052bd1f" 11 ></script> 12 <title>atp.tools</title> 13 </head> 14 <body> 15 <div id="app"></div> 16 <script type="module" src="/src/main.tsx"></script> 17 </body> 18 <script> 19 (function () { 20 function getInitialColorMode() { 21 const persistedColorPreference = 22 window.localStorage.getItem("theme"); 23 const hasPersistedPreference = 24 typeof persistedColorPreference === "string"; 25 if (hasPersistedPreference) { 26 return persistedColorPreference; 27 } 28 const mql = window.matchMedia("(prefers-color-scheme: dark)"); 29 const hasMediaQueryPreference = 30 typeof mql.matches === "boolean"; 31 if (hasMediaQueryPreference) { 32 return mql.matches ? "dark" : "light"; 33 } 34 return "light"; 35 } 36 const colorMode = getInitialColorMode(); 37 document.documentElement.className = colorMode; 38 })(); 39 </script> 40</html>