From 7068fabbee4184ccf7294bef82025aa438afe6fd Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 13 Mar 2026 12:50:51 -0400 Subject: [PATCH] refactor(docs): remove inline JS from docs template - Removed ~400 lines of inline JavaScript from docs.templ - Moved toggleSection function to docs.ts (now uses Alpine ) - Added highlightCurrentPage function to docs.ts - Added initializeCodeCopyButtons function to docs.ts - Updated template to use x-init for initialization - Functions exported for use in Alpine.data --- templates/docs.templ | 427 +--------------------------------------- templates/docs_templ.go | 6 +- web/src/docs.ts | 65 +++++- 3 files changed, 67 insertions(+), 431 deletions(-) diff --git a/templates/docs.templ b/templates/docs.templ index af5fbf4..389421c 100644 --- a/templates/docs.templ +++ b/templates/docs.templ @@ -13,7 +13,7 @@ templ DocsLayout(nav Navigation, doc Document, user User, currentPath string) { - + @Header(user, currentPath)