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

View File

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