fix(web): keep the navigation on legal pages
Signed-in users see the console navigation on the legal notice and privacy policy; visitors get a header with sign-in and language choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
e6be8f15d3
commit
e458984dcb
4 files changed
+208
-125
No files matched your search
@@ -31,12 +31,29 @@ templ legalBody(html string) {
|
||||
}
|
||||
|
||||
// LegalPage shows a platform legal document.
|
||||
templ LegalPage(p Page, html string) {
|
||||
@Layout(p) {
|
||||
<main class="mx-auto max-w-3xl px-6 py-14">
|
||||
<p class="mb-10"><a href="/" class="font-mono text-xs tracking-wide text-muted hover:text-ink">uptimesebi</a></p>
|
||||
// LegalPage shows a platform legal document: inside the console for
|
||||
// signed-in users, with a plain header for everyone else, who must be able
|
||||
// to read it too.
|
||||
templ LegalPage(p Page, me *Me, html string) {
|
||||
if me != nil {
|
||||
@consoleShell(p, *me) {
|
||||
@legalBody(html)
|
||||
</main>
|
||||
}
|
||||
} else {
|
||||
@Layout(p) {
|
||||
<header class="border-b border-rule">
|
||||
<div class="mx-auto flex max-w-5xl items-center justify-between gap-6 px-6 py-3 text-sm">
|
||||
<a href="/" class="font-mono text-xs tracking-wide">uptimesebi</a>
|
||||
<div class="flex items-center gap-5">
|
||||
<a href="/login" class="text-muted hover:text-ink">{ i18n.T(ctx, "auth.login.title") }</a>
|
||||
@languageSwitch(p.Languages)
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main class="mx-auto max-w-5xl px-6 py-10">
|
||||
@legalBody(html)
|
||||
</main>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user