From d40c930a5d6de79cb8a99fc9b8d022b1252b892c Mon Sep 17 00:00:00 2001 From: Amolith Date: Sun, 12 Oct 2025 22:06:35 -0600 Subject: [PATCH] feat: add git-bug integration to web UI Implement web interface for displaying git-bug issues including bug listing page, individual bug details, and navigation integration. Add styling and handlers for bug display functionality. Implements: bug-7d32125 Co-Authored-By: Crush --- pkg/web/static/overrides.css | 42 +++- pkg/web/templates/base.html | 3 + pkg/web/templates/bug.html | 88 +++++++ pkg/web/templates/bugs.html | 64 +++++ pkg/web/webui.go | 7 + pkg/web/webui_blob.go | 1 + pkg/web/webui_branches.go | 1 + pkg/web/webui_bugs.go | 448 +++++++++++++++++++++++++++++++++++ pkg/web/webui_commit.go | 1 + pkg/web/webui_commits.go | 1 + pkg/web/webui_overview.go | 1 + pkg/web/webui_tags.go | 1 + pkg/web/webui_tree.go | 1 + 13 files changed, 658 insertions(+), 1 deletion(-) create mode 100644 pkg/web/templates/bug.html create mode 100644 pkg/web/templates/bugs.html create mode 100644 pkg/web/webui_bugs.go diff --git a/pkg/web/static/overrides.css b/pkg/web/static/overrides.css index b974f316ca94320ecf4f2de9aaa69cee0ff5e112..78caec623b111b7b9a920324a68ff40e1cbf36c4 100644 --- a/pkg/web/static/overrides.css +++ b/pkg/web/static/overrides.css @@ -103,6 +103,46 @@ section[aria-labelledby="diff-heading"] article h4:focus-within .secondary { --pico-font-family-monospace: "0xProto","JetBrains Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace,var(--pico-font-family-emoji); } +.badge { + display: inline-block; + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + font-weight: 600; + line-height: 1; + border-radius: 0.25rem; + text-transform: lowercase; +} + +.badge-open { + background-color: #22c55e; + color: #ffffff; +} + +.badge-closed { + background-color: #ef4444; + color: #ffffff; +} + +.bug-message { + margin: 1rem 0; +} + +.muted { + color: var(--pico-muted-color); +} + +.visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + article > header > h1, article > header > h2, article > header > h3, @@ -115,4 +155,4 @@ article > header > p { article > p:only-child { margin-bottom: 0; -} +} diff --git a/pkg/web/templates/base.html b/pkg/web/templates/base.html index c46d5cd931004f2ef632ffe93ccb609e214d75fb..edddf1d39b6b8533f23076853ec4184670b232a9 100644 --- a/pkg/web/templates/base.html +++ b/pkg/web/templates/base.html @@ -49,6 +49,9 @@