Files
spend-sparrow/template/layout.templ
Tim Wundenberg 81380f184e
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 4m16s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 4m51s
fix: migrate toasts from daisyui to tailwind
2025-05-06 15:40:28 +02:00

53 lines
1.5 KiB
Plaintext

package template
templ Layout(slot templ.Component, user templ.Component) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>SpendSparrow</title>
<link rel="icon" href="/static/favicon.svg" />
<link rel="stylesheet" href="/static/css/tailwind.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="htmx-config" content='{
"includeIndicatorStyles": false,
"selfRequestsOnly": true,
"allowScriptTags": false
}' />
<script src="/static/js/htmx.min.js"></script>
<script src="/static/js/toast.js"></script>
</head>
<body hx-headers='{"csrf-token": "CSRF_TOKEN"}'>
<div class="h-screen flex flex-col">
// Header
<div class="sticky top-0">
<div class="flex bg-white justify-end items-center gap-2 py-1 px-2 h-12 md:gap-10 md:px-10 md:py-2">
<a href="/" class="flex-1 flex gap-2">
<img class="w-6" src="/static/favicon.svg" alt="SpendSparrow logo" />
<span class="text-4xl font-bold font-pirata">SpendSparrow</span>
</a>
@user
</div>
<div class="h-12 inset-0 bg-linear-0 from-transparent to-white"></div>
</div>
// Content
<div class="flex-1">
if slot != nil {
@slot
}
</div>
// Footer
</div>
<div id="toasts" class="fixed bottom-4 right-4 ml-4 max-w-96 flex flex-col gap-2 z-50">
<div id="toast"
class="transition-all duration-300 opacity-0 px-4 py-2 text-lg hidden text-bold rounded bg-amber-900 text-white">
M
</div>
</div>
</body>
</html>
}