refactor(all): shadcn rewrite
This commit is contained in:
parent
a3c7945750
commit
e111bdffb4
34 changed files with 1003 additions and 173 deletions
|
@ -1,30 +1,58 @@
|
|||
---
|
||||
import "/src/css/app.css";
|
||||
import "/src/styles/globals.css";
|
||||
---
|
||||
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="/assets/favicon.svg" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png" />
|
||||
|
||||
<link rel="canonical" href="https://z0x.ca" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
<title>z0x</title>
|
||||
|
||||
<meta name="title" content="z0x" />
|
||||
<meta name="description" content="z0x" />
|
||||
<meta name="description" content="z0x's webpage" />
|
||||
<meta name="keywords" content="z0x" />
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://z0x.ca" />
|
||||
<meta property="og:site_name" content="z0x" />
|
||||
<meta property="og:title" content="z0x" />
|
||||
<meta property="og:description" content="z0x" />
|
||||
<meta property="og:description" content="z0x's webpage" />
|
||||
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:url" content="https://z0x.ca" />
|
||||
<meta property="twitter:title" content="z0x" />
|
||||
<meta property="twitter:description" content="z0x" />
|
||||
<meta property="twitter:description" content="z0x's webpage" />
|
||||
|
||||
<meta name="darkreader-lock" />
|
||||
|
||||
<link rel="canonical" href="https://z0x.ca" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||
|
||||
<script src="/src/js/index.ts"></script>
|
||||
|
||||
<script is:inline>
|
||||
const getThemePreference = () => {
|
||||
if (typeof localStorage !== "undefined" && localStorage.getItem("theme")) {
|
||||
return localStorage.getItem("theme");
|
||||
}
|
||||
return window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
? "dark"
|
||||
: "light";
|
||||
};
|
||||
const isDark = getThemePreference() === "dark";
|
||||
document.documentElement.classList[isDark ? "add" : "remove"]("dark");
|
||||
|
||||
if (typeof localStorage !== "undefined") {
|
||||
const observer = new MutationObserver(() => {
|
||||
const isDark = document.documentElement.classList.contains("dark");
|
||||
localStorage.setItem("theme", isDark ? "dark" : "light");
|
||||
});
|
||||
observer.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ["class"],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue