mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 17:25:32 +00:00
Introduced templating and views
This commit is contained in:
1
views/layouts/components/_footer.gohtml
Normal file
1
views/layouts/components/_footer.gohtml
Normal file
@@ -0,0 +1 @@
|
||||
<div class="mt-12">Datenschutz, Impressum.</div>
|
||||
3
views/layouts/components/_header.gohtml
Normal file
3
views/layouts/components/_header.gohtml
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="mt-8">
|
||||
<h1 class="text-2xl">Königsberger gelehrte und politische Zeitungen</h1>
|
||||
</div>
|
||||
30
views/layouts/components/_menu.gohtml
Normal file
30
views/layouts/components/_menu.gohtml
Normal file
@@ -0,0 +1,30 @@
|
||||
<div class="flex flex-row justify-center mt-8">
|
||||
<div class="w-6/12">
|
||||
<input type="search" placeholder="Suche" class="px-2.5 py-1.5 border w-full" />
|
||||
</div>
|
||||
|
||||
<div x-data="{ open: false }">
|
||||
<button
|
||||
class="ml-2 text-2xl border px-4 h-full"
|
||||
:class="open? 'open bg-slate-200' : 'closed'"
|
||||
@click="open = !open">
|
||||
<i class="ri-menu-line"></i>
|
||||
</button>
|
||||
<div :class="open? 'open' : 'closed'" x-show="open" class="absolute bg-slate-50 px-5 py-3">
|
||||
<div>
|
||||
<div>Übersicht nach</div>
|
||||
<div class="ml-2 flex flex-col gap-y-2 mt-2">
|
||||
<a href="/">Jahrgängen</a>
|
||||
<a href="/akteure/a">Personen</a>
|
||||
<a href="/kategorie/">Betragsarten</a>
|
||||
<a href="/ort/">Orten</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-y-2 mt-2">
|
||||
<a href="/edition/">Geschichte & Edition der KGPZ</a>
|
||||
<a href="/zitation/">Zitation</a>
|
||||
<a href="/kontakt/">Kontakt</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
58
views/layouts/default/root.gohtml
Normal file
58
views/layouts/default/root.gohtml
Normal file
@@ -0,0 +1,58 @@
|
||||
<!doctype html>
|
||||
<html class="w-full h-full" {{ if .lang }}lang="{{ .lang }}"{{ end }}>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
{{ block "head" . }}
|
||||
<!-- Default Head elements -->
|
||||
{{ end }}
|
||||
|
||||
{{ if .isDev }}
|
||||
<link rel="icon" href="/assets/logo/dev_favicon.png" />
|
||||
{{ else }}
|
||||
<link rel="icon" href="/assets/logo/favicon.png" />
|
||||
{{ end }}
|
||||
|
||||
|
||||
<link href="/assets/css/remixicon.css" rel="stylesheet" />
|
||||
<script src="/assets/js/alpine.min.js" defer></script>
|
||||
<script src="/assets/js/htmx.min.js" defer></script>
|
||||
<script src="/assets/js/htmx-response-targets.js" defer></script>
|
||||
<script src="/assets/js/client-side-templates.js" defer></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/fonts.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/assets/style.css" />
|
||||
|
||||
<script type="module">
|
||||
import { setup } from "/assets/scripts.js";
|
||||
setup();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="w-full" hx-ext="response-targets" hx-boost="true">
|
||||
<div class="container flex flex-col min-h-screen max-w-(--breakpoint-2xl) mx-auto">
|
||||
<header>
|
||||
{{ block "_header" . }}
|
||||
<!-- Default app header... -->
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
<div>
|
||||
{{ block "_menu" . }}
|
||||
<!-- Default app menu... -->
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<main class="">
|
||||
{{ block "body" . }}
|
||||
<!-- Default app body... -->
|
||||
{{ end }}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
{{ block "_footer" . }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user