From ffb1314af96c47ee314e7c5925cc35d3cf13fae2 Mon Sep 17 00:00:00 2001 From: Besser Sehen Landshut Date: Mon, 24 Aug 2026 05:30:45 +0200 Subject: [PATCH] fix(template): repair avatar images in the server-rendered question list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The avatar in question.html is built as `{{$.baseURL}}/users/{{.Operator.Avatar}}`. `.Operator.Avatar` already holds the full avatar reference, so prefixing it with `/users/` produces an address that cannot resolve — every question in the list renders a broken image. The four other templates that show an avatar (question-detail.html twice, homepage.html) use `{{.UserInfo.Avatar}}` directly; this is the only place with the prefix. Two further defects in the same tag: - `alt="shuai"` is placeholder text left over from a copied DOM. It is read out for every avatar on the page, so the alternative text is now the display name of the person who asked. - `width="24px"` and `height="24px"` are invalid: HTML dimension attributes take a number without a unit. The browser discards them and falls back to the intrinsic size of the image, which makes every row of the list taller than intended. Co-Authored-By: Claude Opus 5 (1M context) --- ui/template/question.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/template/question.html b/ui/template/question.html index db1358704..035352f31 100644 --- a/ui/template/question.html +++ b/ui/template/question.html @@ -36,7 +36,7 @@