MasterDee/chat-ui
0
1<!DOCTYPE html>2<html lang="en" class="h-full">3 <head>4 <meta charset="utf-8" />5 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />6 <meta name="theme-color" content="rgb(249, 250, 251)" />7 <script>8 if (9 localStorage.theme === "dark" ||10 (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)11 ) {12 document.documentElement.classList.add("dark");13 document14 .querySelector('meta[name="theme-color"]')15 .setAttribute("content", "rgb(26, 36, 50)");16 }17 18 // For some reason, Sveltekit doesn't let us load env variables from .env here, so we load it from hooks.server.ts19 window.gaId = "%gaId%";20 </script>21 %sveltekit.head%22 </head>23 <body data-sveltekit-preload-data="hover" class="h-full dark:bg-gray-900">24 <div id="app" class="contents h-full">%sveltekit.body%</div>25 26 <!-- Google Tag Manager -->27 <script>28 if (window.gaId) {29 const script = document.createElement("script");30 script.src = "https://www.googletagmanager.com/gtag/js?id=" + window.gaId;31 script.async = true;32 document.head.appendChild(script);33 34 window.dataLayer = window.dataLayer || [];35 function gtag() {36 dataLayer.push(arguments);37 }38 gtag("js", new Date());39 /// ^ See https://developers.google.com/tag-platform/gtagjs/install40 gtag("config", window.gaId);41 gtag("consent", "default", { ad_storage: "denied", analytics_storage: "denied" });42 /// ^ See https://developers.google.com/tag-platform/gtagjs/reference#consent43 /// TODO: ask the user for their consent and update this with gtag('consent', 'update')44 }45 </script>46 </body>47</html>48 