From 96d19671c83cd5447023e436fd659c45040333a6 Mon Sep 17 00:00:00 2001 From: Tim Wundenberg Date: Fri, 25 Jul 2025 22:42:22 +0200 Subject: [PATCH] feat(layout): #211 update for more "app" like feel --- internal/template/{root.templ => index.templ} | 0 internal/template/layout.templ | 51 ++++++++++--------- 2 files changed, 27 insertions(+), 24 deletions(-) rename internal/template/{root.templ => index.templ} (100%) diff --git a/internal/template/root.templ b/internal/template/index.templ similarity index 100% rename from internal/template/root.templ rename to internal/template/index.templ diff --git a/internal/template/layout.templ b/internal/template/layout.templ index 52edb1c..15e5be3 100644 --- a/internal/template/layout.templ +++ b/internal/template/layout.templ @@ -1,10 +1,12 @@ package template func layoutLinkClass(isActive bool) string { + common := "text-2xl p-2 text-gray-900 decoration-yellow-400 decoration-[0.25rem] hover:bg-gray-200 rounded-lg" if isActive { - return "text-xl hover:bg-gray-100 p-1 duration-100 rounded-xl transition-colors text-gray-900" + return common + " " + "underline" } - return "text-xl hover:bg-gray-100 hover:text-gray-900 p-1 duration-200 rounded-xl transition-colors text-gray-400" + + return common + " " + "hover:underline" } templ Layout(slot templ.Component, user templ.Component, loggedIn bool, path string) { @@ -22,7 +24,7 @@ templ Layout(slot templ.Component, user templ.Component, loggedIn bool, path str "includeIndicatorStyles": false, "selfRequestsOnly": true, "allowScriptTags": false - }' + }' /> @@ -30,39 +32,40 @@ templ Layout(slot templ.Component, user templ.Component, loggedIn bool, path str - - // Header - -
+ // Content -
- if slot != nil { - @slot +
+ if loggedIn { + } -
- // Footer - +
+ if slot != nil { + @slot + } +
+
+ class="transition-all duration-300 + opacity-0 px-4 py-2 text-lg hidden text-bold rounded bg-amber-900 text-white" + >