mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 20:19:13 +00:00
73 lines
2.1 KiB
Plaintext
73 lines
2.1 KiB
Plaintext
<!DOCTYPE html>
|
|
<html
|
|
lang="en"
|
|
data-layout="{{ layout }}"
|
|
data-shoelace-version="{{ meta.version }}"
|
|
>
|
|
<head>
|
|
{# Metadata #}
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="description" content="{{ meta.description }}" />
|
|
<title>{{ meta.title }}</title>
|
|
|
|
{# Opt out of Turbo caching #}
|
|
<meta name="turbo-cache-control" content="no-cache">
|
|
<meta name="turbo-cache-control" content="no-preview">
|
|
|
|
{# Favicons #}
|
|
<link rel="icon" href="{{ assetUrl('images/favicon.svg') }}" type="image/x-icon" />
|
|
|
|
{# Twitter Cards #}
|
|
<meta name="twitter:card" content="summary" />
|
|
<meta name="twitter:creator" content="shoelace_style" />
|
|
<meta name="twitter:image" content="{{ assetUrl(meta.image, true) }}" />
|
|
|
|
{# OpenGraph #}
|
|
<meta property="og:url" content="{{ rootUrl(page.url, true) }}" />
|
|
<meta property="og:title" content="{{ meta.title }}" />
|
|
<meta property="og:description" content="{{ meta.description }}" />
|
|
<meta property="og:image" content="{{ assetUrl(meta.image, true) }}" />
|
|
|
|
{# WebAwesome #}
|
|
<link rel="stylesheet" href="/dist/themes/default.css" />
|
|
<link rel="stylesheet" href="/dist/themes/applied.css" />
|
|
<script type="module" src="/dist/webawesome.js"></script>
|
|
|
|
{# Set the initial theme and menu states here to prevent flashing #}
|
|
<script>
|
|
(() => {
|
|
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
const theme = localStorage.getItem('theme') || 'auto';
|
|
document.documentElement.classList.toggle('wa-theme-dark', theme === 'dark' || (theme === 'auto' && prefersDark));
|
|
|
|
if (window.Turbo) {
|
|
window.Turbo.session.drive = false
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
<style>
|
|
*, *:before, *:after {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html, body {
|
|
min-height: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
}
|
|
|
|
[hidden] {
|
|
display: none !important;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
{% block content %}
|
|
{{ content | safe }}
|
|
{% endblock %}
|
|
</body>
|
|
</html>
|