ui: hide layout for unauthenticated users

This commit is contained in:
2026-05-02 18:28:00 +02:00
committed by Mikkel Elvers
parent d9ffa20d98
commit 7bc7dfcd46
2 changed files with 22 additions and 18 deletions

View File

@@ -104,6 +104,7 @@
</head>
<body class="bg-background text-neutral-200">
<div class="flex min-h-screen flex-col">
{{if .User}}
<div class="sticky top-0 z-50">
{{block "header" .}}
{{template "header" .}}
@@ -124,6 +125,11 @@
{{template "content" .}}
</main>
</div>
{{else}}
<main class="w-full flex-1">
{{template "content" .}}
</main>
{{end}}
</div>
</body>
</html>

View File

@@ -1,6 +1,4 @@
{{define "title"}}Login{{end}}
{{define "header"}}{{end}}
{{define "sidebar"}}{{end}}
{{define "content"}}
<div class="flex min-h-screen items-center justify-center p-4">
<div class="w-full max-w-md">