Recount-Server/web/templates/index.html

62 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/static/site.css">
<script src="/static/htmx.min.js"></script>
</head>
<body>
<header>
</header>
<div id="below-header">
<div id="left-col">
<nav>
<button class="title" href="/">Recount!</button>
<ul>
<li>
<a
hx-get="/"
hx-swap="innerHtml swap:0.2s settle:0.2s"
hx-push-url="true"
hx-boost="true"
hx-target="#main-body-content"
{{ if (eq .ActivePage "index") }}
class="active"
{{ end }}
>
Home!
</a>
</li>
<li>
<a
hx-get="/hello"
hx-swap="innerHtml swap:0.2s settle:0.2s"
hx-push-url="true"
hx-boost="true"
hx-target="#main-body-content"
{{ if (eq .ActivePage "hello") }}
class="active"
{{ end }}
>
Not home!
</a>
</li>
</ul>
</nav>
</div>
<div id="main-body-content">
{{.InnerHtml}}
</div>
</div>
<script type="module" src="/static/index.js"></script>
<script type="module">
import {say_hello, register_nav_links} from "/static/index.js";
say_hello();
register_nav_links();
</script>
</body>
</html>