zerotab

Zerotab - the zero-javascript lightweight startpage. Demo at https://tab.alex.balgavy.eu
git clone git://git.alex.balgavy.eu/zerotab.git
Log | Files | Refs | README

index.html.head (1456B)


      1 <!DOCTYPE html>
      2 <html lang="en">
      3   <head>
      4     <meta charset="UTF-8">
      5     <title>New Tab</title>
      6     <meta charset="utf-8">
      7     <meta name="viewport" content="width=device-width, initial-scale=1.0">
      8     <!-- For browsers without prefers-color-scheme, change theme based on time of day -->
      9     <script type="text/javascript">
     10       if (window.matchMedia('(prefers-color-scheme: dark)').media === 'not all') {
     11         document.documentElement.style.display = 'none';
     12         var hour = new Date().getHours();
     13         var sheet = (hour >= 18 || hour < 7) ? "css/dark.css" : "css/light.css";
     14         document.head.insertAdjacentHTML(
     15           'beforeend',
     16           '<link rel="stylesheet" type="text/css" href="'+sheet+'" onload="document.documentElement.style.display = \'\'">'
     17         );
     18       }
     19     </script>
     20     <!-- For browsers without JS, load the light theme -->
     21     <noscript><link rel="stylesheet" type="text/css" href="css/light.css"></noscript>
     22     <!-- For browsers supporting prefers-color-scheme, use that -->
     23     <link rel="stylesheet" type="text/css" href="css/dark.css" media="(prefers-color-scheme: dark)">
     24     <link rel="stylesheet" type="text/css" href="css/light.css" media="(prefers-color-scheme: light)">
     25   </head>
     26   <body>
     27     <h1>Zerotab</h1>
     28     <form action="https://search.alex.balgavy.eu/" method="get">
     29       <input type="text" class="text" value="" name="q" placeholder="Search..." autocomplete="off" tabindex="0">
     30     </form>