You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2025/08/15 06:23:11 UTC
(answer) branch test updated: style: ui optimization
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 1aeea01c style: ui optimization
1aeea01c is described below
commit 1aeea01c6f5b136b22530a4e1664b1c820001065
Author: shuai <li...@sifou.com>
AuthorDate: Fri Aug 15 14:22:54 2025 +0800
style: ui optimization
---
ui/src/index.scss | 4 +++-
.../Questions/Detail/components/Question/index.tsx | 26 +++++++++++++---------
ui/src/pages/Questions/index.tsx | 2 +-
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/ui/src/index.scss b/ui/src/index.scss
index e3153fd2..508598ac 100644
--- a/ui/src/index.scss
+++ b/ui/src/index.scss
@@ -119,10 +119,12 @@ img[src=''] {
display: flex;
flex-direction: column;
}
-#root > footer {
+#root footer {
margin-top: auto !important;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
+ padding-left: 12px !important;
+ padding-right: 12px !important;
}
.bg-f5 {
diff --git a/ui/src/pages/Questions/Detail/components/Question/index.tsx b/ui/src/pages/Questions/Detail/components/Question/index.tsx
index 19b73b06..97ca1fd4 100644
--- a/ui/src/pages/Questions/Detail/components/Question/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/Question/index.tsx
@@ -104,17 +104,21 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer }) => {
<div className="d-flex flex-wrap align-items-center small mb-4 text-secondary border-bottom pb-3">
<BaseUserCard data={data.user_info} className="me-3" />
- <FormatTime
- time={data.create_time}
- preFix={t('created')}
- className="me-3"
- />
+ <Link to={`/posts/${data.id}/timeline`}>
+ <FormatTime
+ time={data.create_time}
+ preFix={t('created')}
+ className="me-3 link-secondary"
+ />
+ </Link>
- <FormatTime
- time={data.edit_time}
- preFix={t('Edited')}
- className="me-3"
- />
+ <Link to={`/posts/${data.id}/timeline`}>
+ <FormatTime
+ time={data.edit_time}
+ preFix={t('Edited')}
+ className="me-3 link-secondary"
+ />
+ </Link>
{data?.view_count > 0 && (
<div className="me-3">
@@ -137,7 +141,7 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer }) => {
<ImgViewer>
<article
ref={ref}
- className="fmt text-break text-wrap"
+ className="fmt text-break text-wrap last-p mb-4"
dangerouslySetInnerHTML={{ __html: data?.html }}
/>
</ImgViewer>
diff --git a/ui/src/pages/Questions/index.tsx b/ui/src/pages/Questions/index.tsx
index 2f08cbf0..7239feb6 100644
--- a/ui/src/pages/Questions/index.tsx
+++ b/ui/src/pages/Questions/index.tsx
@@ -69,7 +69,7 @@ const Questions: FC = () => {
usePageTags({ title: pageTitle, subtitle: slogan });
return (
<Row className="pt-4 mb-5">
- <Col className="page-main flex-auto">
+ <Col className="page-main flex-auto overflow-x-hidden">
<QuestionList
source="questions"
data={listData}