added staging banner

This commit is contained in:
2026-03-07 13:24:36 +11:00
parent 04389970ac
commit 78db8d0324
5 changed files with 26 additions and 14 deletions

View File

@@ -40,6 +40,9 @@ templ Layout(title string) {
id="main-content"
class="flex flex-col h-screen"
>
if devInfo.StagingBanner {
@stagingBanner()
}
@Navbar()
if previewRole != nil {
@previewModeBanner(previewRole)
@@ -57,6 +60,12 @@ templ Layout(title string) {
</html>
}
templ stagingBanner() {
<div class="bg-peach text-crust text-center text-xs font-bold py-1 tracking-wider uppercase">
Staging Environment - For Testing Only
</div>
}
// Preview mode banner (private helper)
templ previewModeBanner(previewRole *db.Role) {
<div class="bg-yellow/20 border-b border-yellow/40 px-4 py-3">