bin/views/pages/pages.templ

37 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2023-09-11 23:26:50 +02:00
package pages
2023-09-10 23:40:19 +02:00
2023-09-11 23:26:50 +02:00
import (
"git.myrkvi.com/myrkvi/bin/models"
"git.myrkvi.com/myrkvi/bin/views/components"
)
2023-09-10 23:40:19 +02:00
2023-09-11 23:26:50 +02:00
templ page(inner templ.Component, menu []models.MenuItem, currentMenu int, title string) {
2023-09-10 23:40:19 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="/static/htmx.min.js"></script>
2023-09-12 22:30:58 +02:00
<script src="/static/hyperscript.min.js"></script>
2023-09-10 23:40:19 +02:00
<link rel="stylesheet" href="/static/tailwind.css" />
2023-09-11 23:26:50 +02:00
if title == "" {
<title id="title">bin</title>
} else {
<title id="title">{ title } - bin</title>
}
2023-09-10 23:40:19 +02:00
</head>
2023-09-11 23:26:50 +02:00
<body class="mt-4 sm:mt-12 mx-16 xl:mx-72 lg:mx-64 md:mx-32 sm:mx-24 bg-amber-50">
2023-09-10 23:40:19 +02:00
<header class="flex flex-row justify-between my-16">
<h1 class="text-5xl">bin</h1>
2023-09-11 23:26:50 +02:00
@components.NavMenu(menu, currentMenu, false)
2023-09-10 23:40:19 +02:00
</header>
<main id="main-content">
{! inner }
</main>
<div class="fixed left-0 bottom-1 flex flex-row justify-center w-screen pointer-events-none">
<div id="toast" class="w-fit pointer-events-auto">
</div>
</div>
</body>
</html>
}