Erstes Commit
This commit is contained in:
82
hugo/layouts/_default/baseof.html
Normal file
82
hugo/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="theme-color" content="#6d28d9">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<title>{{ if .Title }}{{ .Title }} – {{ end }}Einheitsumrechner</title>
|
||||
{{ if .Params.description }}
|
||||
<meta name="description" content="{{ .Params.description }}">
|
||||
{{ end }}
|
||||
<link rel="shortcut icon" type="image/jpg" href="/icons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link href="/css/main.min.css" rel="stylesheet">
|
||||
{{ partial "units-data.html" . }}
|
||||
{{ block "headscripts" . }}{{ end }}
|
||||
<script defer src="/js/alpine-ajax-0.12.2.min.js"></script>
|
||||
<script defer src="/js/alpine-3.14.9.min.js"></script>
|
||||
<meta name="pocketbase-url" content="{{ getenv "POCKETBASE_URL" | default .Site.Params.pocketbase_url }}">
|
||||
<script>
|
||||
document.addEventListener('ajax:success', function (event) {
|
||||
const raw = event.detail.raw;
|
||||
if (!raw) return;
|
||||
const doc = new DOMParser().parseFromString(
|
||||
raw, 'text/html');
|
||||
const title = doc.querySelector('title')?.innerText;
|
||||
if (title) {
|
||||
document.title = title;
|
||||
}
|
||||
const desc = doc.querySelector(
|
||||
'meta[name="description"]')?.content;
|
||||
if (desc) {
|
||||
const meta = document.querySelector(
|
||||
'meta[name="description"]');
|
||||
if (meta) {
|
||||
meta.content = desc;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="bg-gray-100 font-sans leading-normal tracking-normal dark:bg-gray-800 dark:text-gray-100">
|
||||
<header class="bg-primary text-white shadow-md">
|
||||
<div class="container mx-auto flex justify-between items-center p-4">
|
||||
<a class="flex items-center" x-target.push="maincontent" href="/">
|
||||
<svg class="h-8 w-8 mr-2 text-white" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17.07 2.93A9.9 9.9 0 0 0 10 0v2a7.86 7.86 0 0 1 5.65 2.34 7.9 7.9 0 0 1 1.72 8.76c-.4.95-.98 1.81-1.72 2.54l-.52.48-.94-1-1.19.02V20h6l-2.45-2.45A9.9 9.9 0 0 0 20 9.99a9.9 9.9 0 0 0-2.93-7.07zM2.93 17.07A9.9 9.9 0 0 0 10 20v-2a7.9 7.9 0 0 1-5.65-2.34A7.9 7.9 0 0 1 2.63 6.9c.4-.95.98-1.81 1.72-2.54l.52-.48.82.8L7 4.66V0H1l2.45 2.45A9.9 9.9 0 0 0 0 10a9.9 9.9 0 0 0 2.93 7.07"/><path d="M14.17 4.02H5.86c-.66 0-1.2.53-1.2 1.18v9.5c0 .65.54 1.19 1.2 1.19h8.3c.66 0 1.2-.54 1.2-1.2V5.2a1.2 1.2 0 0 0-1.2-1.18zM5.86 14.7V5.2h8.3v9.5z"/><path d="M7.04 9.95h1.19v1.19H7.04zm0 2.37h1.19v1.2H7.04zm2.38-2.37h1.18v1.19H9.42zM7.04 6.39h5.94v2.37H7.04zm2.38 5.93h1.18v1.2H9.42zm2.38-2.37h1.18v3.56h-1.19z"/></svg>
|
||||
<div class="text-md md:text-2xl font-bold">Einheitsumrechner</div>
|
||||
</a>
|
||||
<nav>
|
||||
<ul class="flex space-x-4">
|
||||
<li>
|
||||
<a href="/" x-target.push="maincontent" class="hover:underline flex items-center">
|
||||
<svg class="h-5 w-5 mr-2" fill="currentColor" viewBox="0 0 24 24"><path d="M3 13h1v7c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-7h1c.4 0 .77-.24.92-.62.15-.37.07-.8-.22-1.09l-8.99-9a.996.996 0 0 0-1.41 0l-9.01 9c-.29.29-.37.72-.22 1.09s.52.62.92.62Zm9-8.59 6 6V20H6v-9.59z"></path></svg>
|
||||
<span class="hidden md:inline">Startseite</span>
|
||||
</a>
|
||||
</li>
|
||||
<li x-data="{ open: false }" class="relative" @click.outside="open = false">
|
||||
<span class="cursor-pointer hover:underline flex items-center" @click="open = !open">
|
||||
<svg class="h-5 w-5 mr-2" fill="currentColor" viewBox="0 0 24 24"><path d="m7,2h-1v2h1v13c0,2.76,2.24,5,5,5s5-2.24,5-5V4h1v-2H7Zm8,4h-3v2h3v2h-3v2h3v2h-3v2h3v1c0,1.65-1.35,3-3,3s-3-1.35-3-3V4h6v2Z"></path></svg>
|
||||
<span class="hidden md:inline">Einheiten</span>
|
||||
</span>
|
||||
{{ partial "unit-dropdown.html" . }}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main id="maincontent" class="container mx-auto mt-8 p-4 flex flex-wrap md:flex-nowrap gap-8">
|
||||
<div class="max-w-5xl mx-auto">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
{{ block "scripts" . }}{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user