2022-03-21 17:43:24 +13:00
|
|
|
<!DOCTYPE html>
|
2022-10-23 00:51:22 +13:00
|
|
|
<html lang="en" class="<%= "#{@configured_theme}" %>">
|
2022-03-21 17:43:24 +13:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8"/>
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
|
|
<%= csrf_meta_tag() %>
|
2022-03-26 10:17:01 +13:00
|
|
|
<%= live_title_tag assigns[:page_title] || "Ash Framework" %>
|
2022-08-31 07:26:22 +12:00
|
|
|
<%= if Application.get_env(:ash_hq, :analytics?) do %>
|
|
|
|
<script defer data-domain="ash-hq.org" src="https://plausible.io/js/plausible.js"></script>
|
|
|
|
<% end %>
|
2022-09-06 05:29:38 +12:00
|
|
|
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
|
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
|
2022-12-15 21:28:03 +13:00
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.6.2/jquery.min.js"></script>
|
2022-08-07 17:07:06 +12:00
|
|
|
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/assets/app.css") %>"/>
|
|
|
|
<script>
|
2022-04-02 11:49:26 +13:00
|
|
|
const configuredThemeRow = document.cookie
|
|
|
|
.split('; ')
|
|
|
|
.find(row => row.startsWith('theme='))
|
|
|
|
|
|
|
|
if (!configuredThemeRow || configuredThemeRow === "theme=system") {
|
|
|
|
let theme;
|
|
|
|
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
|
|
theme = "dark";
|
|
|
|
} else {
|
|
|
|
theme = "light";
|
|
|
|
}
|
|
|
|
|
|
|
|
document.documentElement.classList.add(theme);
|
|
|
|
if(theme === "dark") {
|
|
|
|
document.documentElement.classList.remove("light");
|
|
|
|
} else {
|
|
|
|
document.documentElement.classList.remove("dark");
|
|
|
|
};
|
|
|
|
|
|
|
|
document.cookie = 'theme=system;path=/';
|
|
|
|
}
|
|
|
|
</script>
|
2022-03-21 17:43:24 +13:00
|
|
|
</head>
|
2022-03-26 10:17:01 +13:00
|
|
|
<body class="h-full">
|
2023-01-13 17:52:58 +13:00
|
|
|
<%= case live_flash(@flash, :info) do %>
|
|
|
|
<% nil -> %>
|
|
|
|
<% flash -> %>
|
|
|
|
<p class="alert alert-info" role="alert" phx-click="lv:clear-flash" phx-value-key="info">
|
|
|
|
<%= flash %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<%= case live_flash(@flash, :error) do %>
|
|
|
|
<% nil -> %>
|
|
|
|
<% flash -> %>
|
|
|
|
<p class="alert alert-danger" role="alert" phx-click="lv:clear-flash" phx-value-key="error">
|
|
|
|
<%= flash %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2022-03-21 17:43:24 +13:00
|
|
|
<%= @inner_content %>
|
2022-10-23 00:51:22 +13:00
|
|
|
<%= if @live_action == :docs do %>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
|
|
|
<script>mermaid.init(".mermaid")</script>
|
|
|
|
<% end %>
|
2022-12-19 13:04:50 +13:00
|
|
|
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8" ></script>
|
2022-08-07 17:07:06 +12:00
|
|
|
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/assets/app.js") %>"></script>
|
2022-03-21 17:43:24 +13:00
|
|
|
</body>
|
|
|
|
</html>
|