zdravko/web/templates/components/base.tmpl

67 lines
2.1 KiB
Cheetah
Raw Normal View History

2024-02-29 11:15:15 +00:00
{{ define "base" }}
{{ $title := "" }}
{{ $path := "" }}
{{ if ne nil .NavbarActive }}
{{ $title = .NavbarActive.Title }}
{{ $path = .NavbarActive.Path }}
{{ end }}
2024-02-29 11:15:15 +00:00
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Zdravko - {{ $title }}</title>
<link rel="stylesheet" href="/static/css/tailwind.css" />
</head>
<body class="bg-gray-100 flex flex-col">
<header
class="container max-w-screen-md flex flex-col sm:flex-row items-center sm:justify-between p-4 gap-2"
>
<a href="/" class="hover:underline text-2xl font-bold"
>zdravko.mnts.dev</a
>
2024-05-28 20:22:29 +00:00
<nav class="navbar flex sm:flex-row flex-col flex-wrap space-x-2 gap-1">
{{ range .Navbar }}
<a
{{ $active := eq .Path $path }}
{{ if $active }}aria-current="true"{{ end }}
href="{{ .Path }}"
class="{{ if $active }}active{{ end }}"
>
{{ .Title }}
</a>
{{ end }}
</nav>
</header>
2024-02-29 11:15:15 +00:00
{{ template "main" . }}
<div class="container mx-auto">
2024-05-28 20:22:29 +00:00
<footer class="text-center text-gray-600 text-xs mt-8 mb-4">
2024-06-07 09:43:32 +00:00
<a class="hover:underline" href="https://zdravko.mnts.dev"
>Zdravko {{ Version }}</a
>
-
2024-02-29 11:15:15 +00:00
<a
class="hover:underline"
href="https://github.com/mentos1386/zdravko"
>Open Source</a
>
- Made with <span class="text-red-500">❤</span> by
<a class="hover:underline" href="https://mnts.dev/about"
>Mentos1386</a
>
and
<a
class="hover:underline"
href="https://github.com/mentos1386/zdravko/graphs/contributors"
>others</a
>.
2024-02-29 11:15:15 +00:00
</footer>
</div>
<script src="/static/js/htmx.min.js"></script>
</body>
</html>
{{ end }}