52 lines
2.0 KiB
Plaintext
52 lines
2.0 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="csrf-token" content={get_csrf_token()} />
|
|
<link rel="icon" href={~p"/favicon.ico"} sizes="any" />
|
|
<% meta_title = assigns[:page_title] || "Mixer"
|
|
|
|
meta_description =
|
|
assigns[:page_description] ||
|
|
"Mixer is a social feed for all. Come join the conversation — built with Elixir." %>
|
|
<meta name="description" content={meta_description} />
|
|
<meta name="robots" content={assigns[:robots] || "index, follow"} />
|
|
<meta property="og:site_name" content="Mixer" />
|
|
<meta property="og:title" content={meta_title} />
|
|
<meta property="og:description" content={meta_description} />
|
|
<meta property="og:type" content="website" />
|
|
<meta name="twitter:card" content="summary" />
|
|
<meta name="twitter:title" content={meta_title} />
|
|
<meta name="twitter:description" content={meta_description} />
|
|
<.live_title suffix=" · Mixer">
|
|
{assigns[:page_title] || "Mixer"}
|
|
</.live_title>
|
|
<link phx-track-static rel="stylesheet" href={~p"/assets/css/app.css"} />
|
|
<script defer phx-track-static type="module" src={~p"/assets/app.js"}>
|
|
</script>
|
|
<script>
|
|
(() => {
|
|
const setTheme = (theme) => {
|
|
if (theme === "system") {
|
|
localStorage.removeItem("phx:theme");
|
|
document.documentElement.removeAttribute("data-theme");
|
|
} else {
|
|
localStorage.setItem("phx:theme", theme);
|
|
document.documentElement.setAttribute("data-theme", theme);
|
|
}
|
|
};
|
|
if (!document.documentElement.hasAttribute("data-theme")) {
|
|
setTheme(localStorage.getItem("phx:theme") || "system");
|
|
}
|
|
window.addEventListener("storage", (e) => e.key === "phx:theme" && setTheme(e.newValue || "system"));
|
|
|
|
window.addEventListener("phx:set-theme", (e) => setTheme(e.target.dataset.phxTheme));
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
{@inner_content}
|
|
</body>
|
|
</html>
|