From 4d2069abdbcaba3ab6eb1345ad745901c891d444 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 3 Feb 2026 09:40:02 -0500 Subject: [PATCH] fix: replace Tailwind CDN with local CSS in docs templates - Remove Tailwind CDN dependency from documentation pages - Load local /static/style.css instead (includes typography plugin) - Remove inline tailwind.config script (no longer needed) - Code blocks now use proper dark colors from input.css overrides - Consistent with other templates (admin, dashboard, analytics) - Faster loading (no external CDN request) - Local build includes all needed CSS (typography + custom overrides) - Add Zed editor configuration for CSS at-rule warnings --- .zed/settings.json | 7 ++--- templates/docs.templ | 48 +++------------------------------- templates/docs_templ.go | 58 ++++++++++++++++++++--------------------- 3 files changed, 36 insertions(+), 77 deletions(-) diff --git a/.zed/settings.json b/.zed/settings.json index 77f9b95..d70c7a9 100644 --- a/.zed/settings.json +++ b/.zed/settings.json @@ -1,8 +1,9 @@ { "languages": { "CSS": { + "language_servers": ["tailwindcss-language-server"], "tab_size": 2, - "formatter": "auto" - } - } + "formatter": "auto", + }, + }, } diff --git a/templates/docs.templ b/templates/docs.templ index c549fb2..e789261 100644 --- a/templates/docs.templ +++ b/templates/docs.templ @@ -11,32 +11,11 @@ templ DocsLayout(nav Navigation, doc Document, user User) { { doc.Title } - Bookhoard Documentation - + - @@ -354,39 +333,18 @@ templ DocsLayout(nav Navigation, doc Document, user User) { } - templ DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer APIExplorerData) { + templ DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer APIExplorerData) { { doc.Title } - Bookhoard Documentation - + - diff --git a/templates/docs_templ.go b/templates/docs_templ.go index 0180556..781dade 100644 --- a/templates/docs_templ.go +++ b/templates/docs_templ.go @@ -46,7 +46,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " - Bookhoard Documentation
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " - Bookhoard Documentation
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -58,7 +58,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(section.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 76, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 55, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -81,7 +81,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var4 templ.SafeURL templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(item.URL) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 84, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 63, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -94,7 +94,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(item.Icon) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 85, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 64, Col: 40} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -107,7 +107,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(item.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 85, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 64, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -135,7 +135,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var7 templ.SafeURL templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(item.URL) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 92, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 71, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -148,7 +148,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(item.Icon) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 93, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 72, Col: 40} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -161,7 +161,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(item.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 93, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 72, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -205,7 +205,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var10 templ.SafeURL templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinURLErrs(crumb.URL) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 111, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 90, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { @@ -218,7 +218,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(crumb.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 111, Col: 91} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 90, Col: 91} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) if templ_7745c5c3_Err != nil { @@ -241,7 +241,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var12 string templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(doc.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 117, Col: 69} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 96, Col: 69} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) if templ_7745c5c3_Err != nil { @@ -264,7 +264,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var13 templ.SafeURL templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinURLErrs("#" + item.Anchor) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 125, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 104, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) if templ_7745c5c3_Err != nil { @@ -277,7 +277,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var14 string templ_7745c5c3_Var14, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("margin-left: " + fmt.Sprintf("%drem", item.Level)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 127, Col: 66} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 106, Col: 66} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { @@ -290,7 +290,7 @@ func DocsLayout(nav Navigation, doc Document, user User) templ.Component { var templ_7745c5c3_Var15 string templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(item.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 129, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 108, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) if templ_7745c5c3_Err != nil { @@ -350,13 +350,13 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var17 string templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(doc.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 363, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 342, Col: 21} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, " - Bookhoard Documentation
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, " - Bookhoard Documentation
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -368,7 +368,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var18 string templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(section.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 426, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 384, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) if templ_7745c5c3_Err != nil { @@ -391,7 +391,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var19 templ.SafeURL templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinURLErrs(item.URL) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 434, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 392, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) if templ_7745c5c3_Err != nil { @@ -404,7 +404,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var20 string templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(item.Icon) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 435, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 393, Col: 40} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) if templ_7745c5c3_Err != nil { @@ -417,7 +417,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var21 string templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(item.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 435, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 393, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21)) if templ_7745c5c3_Err != nil { @@ -445,7 +445,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var22 templ.SafeURL templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinURLErrs(item.URL) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 442, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 400, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) if templ_7745c5c3_Err != nil { @@ -458,7 +458,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var23 string templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(item.Icon) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 443, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 401, Col: 40} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) if templ_7745c5c3_Err != nil { @@ -471,7 +471,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var24 string templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(item.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 443, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 401, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24)) if templ_7745c5c3_Err != nil { @@ -515,7 +515,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var25 templ.SafeURL templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinURLErrs(crumb.URL) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 461, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 419, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) if templ_7745c5c3_Err != nil { @@ -528,7 +528,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var26 string templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(crumb.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 461, Col: 91} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 419, Col: 91} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) if templ_7745c5c3_Err != nil { @@ -551,7 +551,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var27 string templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(doc.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 467, Col: 89} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 425, Col: 89} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) if templ_7745c5c3_Err != nil { @@ -574,7 +574,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var28 templ.SafeURL templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinURLErrs("#" + item.Anchor) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 475, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 433, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) if templ_7745c5c3_Err != nil { @@ -587,7 +587,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var29 string templ_7745c5c3_Var29, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues("margin-left: " + fmt.Sprintf("%drem", item.Level)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 477, Col: 66} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 435, Col: 66} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29)) if templ_7745c5c3_Err != nil { @@ -600,7 +600,7 @@ func DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer AP var templ_7745c5c3_Var30 string templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(item.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 479, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `docs.templ`, Line: 437, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) if templ_7745c5c3_Err != nil {