aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/theme.go
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-13 00:45:06 +0300
committergrm <grm@eyesin.space>2026-09-13 00:45:06 +0300
commite671381121a63422f0cf4d5b0842f80109a12d20 (patch)
tree9c6d218ea58930fecdd9520beb48b5afad9642e1 /internal/web/theme.go
parentd11e4c9544f544b3a024c7ac705a674b4096cf50 (diff)
downloadblogspace-e671381121a63422f0cf4d5b0842f80109a12d20.tar.gz
blogspace-e671381121a63422f0cf4d5b0842f80109a12d20.tar.bz2
blogspace-e671381121a63422f0cf4d5b0842f80109a12d20.zip
Drop the content width option: the page is always full width
With the column grid, a centred max-width box meant the main content did not fill the page when no side columns were shown. The column percentages now divide the whole page; a blogger who wants a narrower, centred main column keeps the columns' space instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/theme.go')
-rw-r--r--internal/web/theme.go16
1 files changed, 1 insertions, 15 deletions
diff --git a/internal/web/theme.go b/internal/web/theme.go
index 46067ba..1ecd832 100644
--- a/internal/web/theme.go
+++ b/internal/web/theme.go
@@ -24,7 +24,6 @@ type Theme struct {
LinkColor string `json:"link_color"`
LinkHover string `json:"link_hover"` // "" = same as LinkColor
LinkUnderline string `json:"link_underline"` // always | hover | never
- ContentWidth string `json:"content_width"` // narrow | medium | wide (no side columns)
ContentStyle string `json:"content_style"` // card | flat
ContentPadding string `json:"content_padding"` // normal | compact | roomy
Font string `json:"font"` // sans | serif | mono
@@ -79,7 +78,7 @@ func DefaultTheme() Theme {
return Theme{
BgColor: "#e9e6df", BgMode: "cover",
ContentBg: "#ffffff", TextColor: "#222222", LinkColor: "#1a5fb4", LinkUnderline: "always",
- ContentWidth: "medium", ContentStyle: "card", ContentPadding: "normal",
+ ContentStyle: "card", ContentPadding: "normal",
Font: "sans", HeadingFont: "same", FontSize: "normal",
HeaderImageHeight: "medium", HeaderAlign: "left", HeaderBg: "#2f3a4a", HeaderText: "#ffffff",
NavAlign: "left", NavStyle: "normal", NavBg: "#ffffff", NavText: "#222222",
@@ -140,7 +139,6 @@ func (t *Theme) normalize() {
t.LinkColor = color(t.LinkColor, d.LinkColor)
t.LinkHover = optColor(t.LinkHover)
t.LinkUnderline = pick(t.LinkUnderline, "always", "hover", "never")
- t.ContentWidth = pick(t.ContentWidth, "medium", "narrow", "wide")
t.ContentStyle = pick(t.ContentStyle, "card", "flat")
t.ContentPadding = pick(t.ContentPadding, "normal", "compact", "roomy")
t.Font = pick(t.Font, "sans", "serif", "mono")
@@ -198,7 +196,6 @@ func ThemeFromForm(cur Theme, f url.Values) Theme {
t.LinkColor = get("link_color")
t.LinkHover = hover("link_hover")
t.LinkUnderline = get("link_underline")
- t.ContentWidth = get("content_width")
t.ContentStyle = get("content_style")
t.ContentPadding = get("content_padding")
t.Font = get("font")
@@ -371,16 +368,6 @@ func (t Theme) FontSizePx() string {
return "17px"
}
-func (t Theme) MaxWidth() string {
- switch t.ContentWidth {
- case "narrow":
- return "640px"
- case "wide":
- return "1100px"
- }
- return "840px"
-}
-
// ContentPaddingCSS returns desktop and phone paddings; "normal" is left to blog.css.
func (t Theme) ContentPaddingCSS() (desktop, phone string) {
switch t.ContentPadding {
@@ -430,7 +417,6 @@ a { color:{{.LinkColor}};{{if eq .LinkUnderline "always"}} text-decoration:under
{{- if or .LinkHover (eq .LinkUnderline "hover")}}
a:hover {{"{"}}{{if .LinkHover}} color:{{.LinkHover}};{{end}}{{if eq .LinkUnderline "hover"}} text-decoration:underline;{{end}} }
{{- end}}
-.wrap { max-width:{{.MaxWidth}}; margin:0 auto; }
.site-header { background:{{.HeaderBg}}; color:{{.HeaderText}}; text-align:{{.HeaderAlign}}; }
.site-header a { color:{{.HeaderText}}; }
.header-image img { max-height:{{.HeaderImageMaxHeight}}; }