From b000217c5e01efb9d59e255a1256ea95e700cd09 Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sun, 20 Mar 2022 21:24:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B8=96=E5=AD=90=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/assets/styles/topic-detail.scss | 54 +++++++++++++++------------ site/components/Avatar.vue | 8 ++++ site/components/Comment.vue | 56 +++++++++++++++------------- site/pages/topic/_id.vue | 56 +++++++++++++--------------- 4 files changed, 96 insertions(+), 78 deletions(-) diff --git a/site/assets/styles/topic-detail.scss b/site/assets/styles/topic-detail.scss index 401271fe8..cbb1ad609 100644 --- a/site/assets/styles/topic-detail.scss +++ b/site/assets/styles/topic-detail.scss @@ -1,9 +1,19 @@ .topic-detail { margin-bottom: 20px; + background-color: var(--bg-color); + border-radius: 3px; + + .topic-header, + .topic-content, + .topic-tags, + .topic-like-users, + .topic-actions { + margin: 0 16px 16px 16px; + } .topic-header { display: flex; - margin: 0 10px; + // margin: 0 10px; // @media screen and (max-width: 768px) { // .topic-header-right { @@ -48,13 +58,6 @@ } } - .topic-content, - .topic-tags, - .topic-like-users, - .topic-actions { - margin: 20px 12px; - } - .topic-content { font-size: 15px; color: var(--text-color); @@ -62,7 +65,6 @@ word-break: break-all; word-wrap: break-word; padding-top: 0 !important; - margin: 0 12px; .topic-title { font-weight: 700; @@ -192,30 +194,37 @@ .topic-like-users { width: 80%; - margin: 0 auto; display: flex; flex-wrap: wrap; - justify-content: center; + margin-bottom: 10px; .avatar-a { - margin-right: 3px; + margin-right: -3px; + } + + .like-count { + margin-left: 8px; + font-size: 14px; + color: var(--text-color); } } .topic-actions { - margin: 20px auto; - padding: 0 25px; + padding: 10px 0; display: flex; + align-items: center; justify-content: space-between; + border-top: 1px solid var(--border-color); .action { - background: var(--bg-color); - cursor: pointer; flex: 1; display: flex; align-items: center; - flex-direction: column; + justify-content: center; + background: var(--bg-color); + cursor: pointer; color: var(--text-color3); + font-size: 14px; .checked-icon { color: var(--color-red); @@ -234,10 +243,14 @@ } > .action-icon { - font-size: 30px; fill: #8590a6; } + .action-text { + color: var(--text-color); + margin-left: 5px; + } + &:hover { color: var(--text-link-color); @@ -245,11 +258,6 @@ fill: var(--text-link-color); } } - - > .content { - margin-top: 10px; - font-size: 12px; - } } } } diff --git a/site/components/Avatar.vue b/site/components/Avatar.vue index 18c4b4496..7791a799f 100644 --- a/site/components/Avatar.vue +++ b/site/components/Avatar.vue @@ -65,6 +65,7 @@ export default { 40: 'font-size: 20px;line-height: 40px;border-radius: 2px', 35: 'font-size: 18px;line-height: 30px;border-radius: 2px', 30: 'font-size: 18px;line-height: 30px;border-radius: 2px', + 24: 'font-size: 12px;line-height: 24px;border-radius: 2px', 20: 'font-size: 10px;line-height: 20px;border-radius: 2px', }, } @@ -181,6 +182,13 @@ export default { min-height: 30px; border-radius: 2px; } +.avatar-size-24 { + width: 24px; + height: 24px; + min-width: 24px; + min-height: 24px; + border-radius: 2px; +} .avatar-size-20 { width: 20px; height: 20px; diff --git a/site/components/Comment.vue b/site/components/Comment.vue index ad9b1befb..d0e8c32bc 100644 --- a/site/components/Comment.vue +++ b/site/components/Comment.vue @@ -1,7 +1,8 @@