forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

index.html62 lines, 3.3 KiBHistoryRawDownload
1<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8" />
5 <!-- interactive-widget is set at runtime, Android-only (see below): a static
6 key logs "not recognized" on desktop browsers, while Android Chrome
7 needs resizes-content so the soft keyboard resizes the layout viewport
8 and a fixed composer's field stays above the keys. -->
9 <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
10 <meta name="color-scheme" content="light dark" />
11 <!-- Repainted from --background by preferences-context on every theme
12 change; this literal is only the value the first paint uses. -->
13 <meta name="theme-color" content="#f7f7f7" />
14 <meta
15 name="description"
16 content="Hezarfen; eğitim, ders, sınav, ödev, takvim ve kampüs işlemlerini tek yerde yöneten güvenli öğrenme platformudur."
17 />
18 <meta name="robots" content="noindex, nofollow" />
19 <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
20 <title>Hezarfen</title>
21 <script>
22 (() => {
23 try {
24 const theme = localStorage.getItem("hezarfen.theme");
25 const dark =
26 theme === "dark" ||
27 (theme !== "light" && window.matchMedia("(prefers-color-scheme: dark)").matches);
28 document.documentElement.setAttribute("data-kb-theme", dark ? "dark" : "light");
29 if (dark) document.documentElement.classList.add("dark");
30 // The stylesheet has not loaded yet, so these repeat --background /
31 // --background(dark) as literals. Keep them in step with index.css.
32 document.documentElement.style.backgroundColor = dark ? "#0f0f0f" : "#f7f7f7";
33 const themeColor = document.querySelector('meta[name="theme-color"]');
34 if (themeColor) themeColor.setAttribute("content", dark ? "#0f0f0f" : "#f7f7f7");
35 const locale = localStorage.getItem("hezarfen.locale");
36 if (locale === "en" || locale === "tr") document.documentElement.lang = locale;
37 // interactive-widget is Android-Chrome-only: appending it here keeps
38 // desktop browsers from logging "viewport argument key not
39 // recognized", while Android keeps resizes-content so the soft
40 // keyboard resizes the layout viewport instead of just the visual
41 // one. Runs before first paint, next to the other viewport setup.
42 if (/android/i.test(navigator.userAgent)) {
43 const viewport = document.querySelector('meta[name="viewport"]');
44 if (viewport) viewport.setAttribute("content", viewport.getAttribute("content") + ", interactive-widget=resizes-content");
45 }
46 // Android reports only the display cutout through CSS env(), so the
47 // gesture bar is invisible to the page. The Tauri shell exposes its
48 // height here; read before first paint so nothing renders under it.
49 // Absent in a browser, where env(safe-area-inset-bottom) is enough.
50 const shell = window.HezarfenShell;
51 if (shell && typeof shell.bottomInsetPx === "function") {
52 document.documentElement.style.setProperty("--android-nav-inset", shell.bottomInsetPx() + "px");
53 }
54 } catch {}
55 })();
56 </script>
57 </head>
58 <body>
59 <div id="root"></div>
60 <script type="module" src="/src/index.tsx"></script>
61 </body>
62</html>