Commit 7ad3de789e
7ad3de789eb7388381be33637ec3854cc4c7885b
parent: 728618a5da
Verified · cmc ci/build: success
cmc <hello@cleberg.net> · 2026-08-26T02:23:15Z
web: configurable instance title, footer aligned with content
[web] title sets the display name in the header and page titles; the
site host remains the fallback. The footer sits in the pane beside the
rail, so it takes the content's horizontal padding rather than none.
internal/config/config.go
+3
| @@ -64,6 +64,9 @@ type GitDaemon struct { |
| 64 | 64 | type Web struct { |
| 65 | 65 | Mode string `toml:"mode"` // view_only | accounts |
| 66 | 66 | PasswordAuth bool `toml:"password_auth"` |
| 67 | // Title is the instance's display name in the header and page titles. |
| 68 | // Empty falls back to the site host. |
| 69 | Title string `toml:"title"` |
| 67 | 70 | // PrivacyNotice is operator-provided text shown on /privacy under the |
| 68 | 71 | // fixed project-level statement. Plain text; blank paragraphs split. |
| 69 | 72 | PrivacyNotice string `toml:"privacy_notice"` |
internal/httpd/web.go
+5
| @@ -47,7 +47,12 @@ func (s *Server) render(w http.ResponseWriter, page string, data any) { |
| 47 | 47 | buf.WriteTo(w) |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | // siteName is the instance's display name: the operator's [web] title, |
| 51 | // or the site host when they have not set one. |
| 50 | 52 | func (s *Server) siteName() string { |
| 53 | if t := strings.TrimSpace(s.cfg.Web.Title); t != "" { |
| 54 | return t |
| 55 | } |
| 51 | 56 | h := strings.TrimPrefix(strings.TrimPrefix(s.cfg.Server.SiteURL, "https://"), "http://") |
| 52 | 57 | return strings.TrimSuffix(h, "/") |
| 53 | 58 | } |
internal/web/static/style.css
+3 −1
| @@ -1063,7 +1063,9 @@ button:hover { filter: brightness(1.15); } |
| 1063 | 1063 | /* footer */ |
| 1064 | 1064 | footer { |
| 1065 | 1065 | border-top: 1px solid var(--faint); |
| 1066 | | padding: var(--sp-4) 0; |
| 1066 | padding: var(--sp-4) var(--sp-5) var(--sp-5); |
| 1067 | max-width: 78rem; |
| 1068 | width: 100%; |
| 1067 | 1069 | color: var(--muted); |
| 1068 | 1070 | font-size: var(--fs-1); |
| 1069 | 1071 | } |