This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/test by this push:
     new 4c2564e2 update: update html templates
4c2564e2 is described below

commit 4c2564e276c4ac8bc40915ba03229d171b14d185
Author: shuai <[email protected]>
AuthorDate: Tue Sep 30 10:47:43 2025 +0800

    update: update html templates
---
 ui/template/header.html          |  4 +-
 ui/template/question-detail.html | 83 +++++++++++++++-------------------------
 ui/template/question.html        |  2 +-
 3 files changed, 34 insertions(+), 55 deletions(-)

diff --git a/ui/template/header.html b/ui/template/header.html
index 1d20c2dd..d5d9a18a 100644
--- a/ui/template/header.html
+++ b/ui/template/header.html
@@ -144,7 +144,7 @@
         <div id="protect-browser"></div>
       </div>
 
-      <nav id="header" class="sticky-top theme-colored navbar navbar-expand-lg 
navbar-dark">
+      <nav id="header" class="sticky-top theme-dark navbar navbar-expand-xl 
navbar-light">
         <div class="w-100 d-flex align-items-center px-3">
           <button
             aria-controls="navBarContent"
@@ -192,7 +192,7 @@
           <div class="position-sticky px-3 border-end pt-4 d-none d-xl-block" 
id="pcSideNav">
             {{template "sidenav" . }}
           </div>
-          <div class="flex-fill w-100">
+          <div class="flex-fill w-100 overflow-x-hidden">
             {{end}}
           </div>
         </div>
diff --git a/ui/template/question-detail.html b/ui/template/question-detail.html
index e0be5318..18cf4edd 100644
--- a/ui/template/question-detail.html
+++ b/ui/template/question-detail.html
@@ -32,18 +32,36 @@
             {{end}}
           </h1>
           <div
-            class="d-flex flex-wrap align-items-center small mb-3 
text-secondary">
-            <time class="me-3"
+            class="d-flex flex-wrap align-items-center small mb-4 
text-secondary border-bottom pb-3">
+            <div class="d-flex align-items-center  text-secondary me-3">
+              <a class="d-flex align-items-center" 
href="{{$.baseURL}}/users/{{.detail.UserInfo.Username}}">
+                <img
+                src="{{.detail.UserInfo.Avatar}}"
+                width="24px" height="24px"
+                class="rounded me-1"
+                alt=""/>
+                <span class="me-1 name-ellipsis" style="max-width: 
300px;">{{.detail.UserInfo.DisplayName}}</span>
+              </a>
+              <span class="fw-bold" 
title="Reputation">{{.detail.UserInfo.Rank}}</span>
+            </div>
+            <time class="me-3 link-secondary"
                   datetime="{{timeFormatISO $.timezone .detail.CreateTime}}"
-                  title="{{translatorTimeFormatLongDate $.language $.timezone 
.detail.CreateTime}}">{{translator $.language "ui.question_detail.Asked"}} 
{{translatorTimeFormat $.language $.timezone .detail.CreateTime}}
+                  title="{{translatorTimeFormatLongDate $.language $.timezone 
.detail.CreateTime}}">{{translator $.language "ui.question_detail.created"}} 
{{translatorTimeFormat $.language $.timezone .detail.CreateTime}}
             </time>
-            <time class="me-3"
-                  datetime="{{timeFormatISO $.timezone .detail.UpdateTime}}"
-                  title="{{translatorTimeFormatLongDate $.language $.timezone 
.detail.UpdateTime}}">{{translator $.language "ui.question_detail.update"}} 
{{translatorTimeFormat $.language $.timezone .detail.UpdateTime}}
+            <time class="me-3 link-secondary"
+                  datetime="{{timeFormatISO $.timezone .detail.EditTime}}"
+                  title="{{translatorTimeFormatLongDate $.language $.timezone 
.detail.EditTime}}">{{translator $.language "ui.question_detail.Edited"}} 
{{translatorTimeFormat $.language $.timezone .detail.EditTime}}
             </time>
             <div class="me-3">{{translator $.language 
"ui.question_detail.Views"}} {{.detail.ViewCount}}</div>
+            <button type="button" class="p-0 btn-no-border btn btn-link 
btn-sm">{{translator $.language "ui.question_detail.Follow"}}</button>
+          </div>
 
+          <div class="img-viewer">
+            <article class="fmt text-break text-wrap last-p mt-4">
+              {{formatLinkNofollow .detail.HTML}}
+            </article>
           </div>
+
           <div class="m-n1">
             {{range .detail.Tags}}
             <a href="{{$.baseURL}}/tags/{{.SlugName}}"
@@ -52,11 +70,7 @@
             </a>
             {{end}}
           </div>
-          <div class="img-viewer">
-            <article class="fmt text-break text-wrap mt-4">
-              {{formatLinkNofollow .detail.HTML}}
-            </article>
-          </div>
+
           <div class="mt-4">
             <div role="group" class="btn-group">
               <button type="button" class="btn btn-outline-secondary">
@@ -73,50 +87,15 @@
               <i class="br bi-bookmark-fill"></i><span style="padding-left: 
10px">{{.detail.CollectionCount}}</span>
             </button>
           </div>
-          <div class="d-block d-md-flex flex-wrap mt-4 mb-3">
-            <div class="mb-3 mb-md-0 me-4 flex-grow-1">
 
+          <div class="mt-4">
+            <div class="d-flex flex-wrap justify-content-between 
align-items-center"><div class="d-flex flex-wrap"><button type="button" 
class="rounded-pill me-2 link-secondary btn-reaction btn btn-light btn-sm"><i 
class="br bi-chat-text-fill"></i><span class="ms-1">Add 
comment</span></button><button type="button" aria-label="add or remove 
reactions" aria-haspopup="true" class="smile-btn rounded-pill link-secondary 
btn-reaction btn btn-light btn-sm"><i class="br bi-emoji-smile-fill"></i> [...]
+
+            <div class="comments-wrap">
+              {{template "comment" (wrapComments (index $.comments 
$.detail.ID) $.language $.timezone)}}
             </div>
-            <div class="mb-3 me-4 mb-md-0" style="min-width: 196px;">
-              <a href="{{$.baseURL}}/posts/{{.detail.ID}}/timeline">
-                <time class="link-secondary small"
-                      datetime="{{timeFormatISO $.timezone 
.detail.UpdateTime}}"
-                      title="{{translatorTimeFormatLongDate $.language 
$.timezone .detail.UpdateTime}}">
-                  {{translator $.language "ui.question_detail.edit"}} 
{{translatorTimeFormat $.language $.timezone .detail.UpdateTime}}
-                </time>
-              </a>
-            </div>
-            <div style="min-width: 196px;">
-              <div class="d-flex">
-                <a 
href="{{$.baseURL}}/users/{{.detail.UserInfo.Username}}"><img
-                  src="{{.detail.UserInfo.Avatar}}"
-                  width="40px" height="40px"
-                  class="rounded me-2 d-none d-md-block"
-                  alt=""/><img
-                  src="{{.detail.UserInfo.Avatar}}"
-                  width="24px" height="24px"
-                  class="rounded me-2 d-block d-md-none"
-                  alt=""/></a>
-                <div
-                  class="small text-secondary d-flex flex-row flex-md-column 
align-items-center align-items-md-start">
-                  <div class="me-1 me-md-0">
-                    <a class="me-1 text-break"
-                        
href="{{$.baseURL}}/users/{{.detail.UserInfo.Username}}">{{.detail.UserInfo.DisplayName}}</a><span
-                    class="fw-bold" 
title="Reputation">{{.detail.UserInfo.Rank}}</span>
-                  </div>
-                  <a href="{{$.baseURL}}/posts/{{.detail.ID}}/timeline">
-                    <time class="link-secondary"
-                          datetime="{{timeFormatISO $.timezone 
.detail.CreateTime}}"
-                          title="{{translatorTimeFormatLongDate $.language 
$.timezone .detail.CreateTime}}">{{translator $.language 
"ui.question_detail.asked"}} {{translatorTimeFormat $.language $.timezone 
.detail.CreateTime}}
-                    </time>
-                  </a>
-                </div>
-              </div>
-            </div>
-          </div>
-          <div class="comments-wrap">
-            {{template "comment" (wrapComments (index $.comments $.detail.ID) 
$.language $.timezone)}}
           </div>
+
         </div>
         <div class="d-flex align-items-center justify-content-between mt-5 
mb-3"
               id="answerHeader">
diff --git a/ui/template/question.html b/ui/template/question.html
index f8aff896..db135870 100644
--- a/ui/template/question.html
+++ b/ui/template/question.html
@@ -22,7 +22,7 @@
 <div class="d-flex justify-content-center px-0 px-md-4">
   <div class="answer-container">
     <div class="pt-4 mb-5 row">
-      <div class="page-main flex-auto col">
+      <div class="page-main flex-auto overflow-x-hidden col">
         <div>
           <div class="mb-3 d-flex flex-wrap justify-content-between">
             <h5 class="fs-5 text-nowrap mb-3 mb-md-0">

Reply via email to