From 5119018feeaa22c47c0e91e15d3b9414dd6e0772 Mon Sep 17 00:00:00 2001 From: grm Date: Wed, 16 Sep 2026 00:20:06 +0300 Subject: Put the header search box in the menu row, and stop saying "Search" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header search was a band of its own under the menu; now it floats at the right end of the menu row and only gets a thin bar when the header has no menu. The forms are a single input — Enter and the phone keyboard's search key submit a one-field form everywhere — with the placeholder as the label, side boxes start without a heading, and the results page shows a box only when no module does, so a page no longer reads "Search" a dozen times. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/web/templates/layouts/blog.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'internal/web/templates/layouts/blog.html') diff --git a/internal/web/templates/layouts/blog.html b/internal/web/templates/layouts/blog.html index 3e854f6..6e8b819 100644 --- a/internal/web/templates/layouts/blog.html +++ b/internal/web/templates/layouts/blog.html @@ -58,7 +58,7 @@ {{- else if eq $m.Kind "logo"}}{{if $t.Logo}}{{if eq $m.Area "header"}} {{else}}{{end}}{{end}} -{{- else if eq $m.Kind "menu"}}{{if eq $m.Area "header"}} +{{- else if eq $m.Kind "menu"}}{{if eq $m.Area "header"}} {{else}}{{end}} {{- else if eq $m.Kind "recent"}}
{{template "modtitle" $m}}
    {{range $i, $p := $r.Data.recent}}{{if lt $i $m.Count}}
  • {{$p.Title}}
  • {{end}}{{end}}
@@ -76,7 +76,7 @@ {{- else if eq $m.Kind "tagcloud"}}
{{template "modtitle" $m}}

{{range $r.Data.tagcloud}}{{.Name}} {{else}}{{t "No tags yet."}}{{end}}

-{{- else if eq $m.Kind "search"}}{{if eq $m.Area "header"}} +{{- else if eq $m.Kind "search"}}{{if eq $m.Area "header"}}{{if not $r.Data.layout.HeaderMenu}}{{end}} {{else}}{{end}} {{- else if eq $m.Kind "html"}}{{if not $m.Body}}{{else if or (eq $m.Area "above") (eq $m.Area "below")}}
{{html $m.Body}}
{{else}}
{{template "modtitle" $m}}{{html $m.Body}}
{{end}} @@ -87,9 +87,11 @@
{{- end}}{{end}} -{{/* The search box: a plain GET form, so it works without JavaScript. .Data.q - only exists on the search page, hence the with. */}} -{{define "searchform"}}
{{end}} +{{/* The search box: a plain GET form, so it works without JavaScript. Just the + input — Enter (or the phone keyboard's search key) submits a one-field + form everywhere, and the placeholder is the label, so the page does not + say "Search" over and over. .Data.q only exists on the search page. */}} +{{define "searchform"}}
{{end}} {{define "modtitle"}}{{if .Title}}

{{.Title}}

{{end}}{{end}} -- cgit v1.2.3