From 28e387a27339734f6658cc4513f91bd60ccd86f1 Mon Sep 17 00:00:00 2001 From: Besser Sehen Landshut Date: Mon, 24 Aug 2026 19:18:36 +0200 Subject: [PATCH] fix(template): four defects in the server-rendered pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All four sit in `ui/template/`, the pages the Go side renders for search engines and for readers before the interface takes over. They are unrelated to each other and each is a line or two; they arrive together because they were all found the same way — by putting those pages in front of visitors instead of only crawlers. **Broken avatars in the question list.** `src="{{$.baseURL}}/users/{{.Operator. Avatar}}"` prefixes a value that already holds the full reference, so every question renders a broken image. The four other templates that show an avatar use it directly. Also in that tag: `alt="shuai"`, placeholder text from a copied DOM, now the display name; and `width="24px"`, invalid because HTML dimension attributes take no unit, so browsers fall back to the intrinsic size and every row grows. **The sort dropdown ships opened.** `class="show"` on the group, the toggle and the menu, `aria-expanded="true"`, and the inline coordinates Popper had written when that markup was captured. Without the interface the menu stands open over the page, and assistive technology is told a collapsed control is expanded. The same file carries a captured React id, `react-aria8245013726-:r5:`, referenced by an `aria-labelledby`; replaced with a stable name. **The search placeholder is not translated.** `placeholder="Search"` written literally, though the key exists in all 45 language files as `ui.header.search.placeholder`. One English word in an otherwise translated page. **Tags print their slug, not their display name.** For Latin script that is a matter of case; elsewhere the slug is a transliteration, so a tag named 眼镜 renders as `yan-jing`. Changed in four templates — text only, every `href` keeps the slug. Co-Authored-By: Claude Opus 5 (1M context) --- ui/template/header.html | 2 +- ui/template/question-detail.html | 2 +- ui/template/question.html | 4 ++-- ui/template/sort-btns.html | 10 +++++----- ui/template/tag-detail.html | 4 ++-- ui/template/tags.html | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ui/template/header.html b/ui/template/header.html index d5d9a18ac..96e124725 100644 --- a/ui/template/header.html +++ b/ui/template/header.html @@ -170,7 +170,7 @@
- +