diff --git a/src/pages/common/Announcements.vue b/src/pages/common/Announcements.vue index a076be9b..52f8b981 100644 --- a/src/pages/common/Announcements.vue +++ b/src/pages/common/Announcements.vue @@ -27,7 +27,7 @@ {{ item.subtitle }} -
+
tag {{ item.tagLabel }}
@@ -117,21 +117,25 @@ async function switchNews(): Promise { } .anno-card { - border: 1px solid var(--common-shadow-2); border-radius: 5px; - background: var(--box-bg-1); + background: var(--app-page-bg); color: var(--box-text-1); } +/* 增加辨识度 */ +.dark .anno-card { + border: 1px solid var(--common-shadow-2); +} + .anno-cover { position: relative; display: flex; overflow: hidden; width: 100%; - height: 130px; align-items: center; justify-content: center; border-bottom: 1px solid var(--common-shadow-2); + aspect-ratio: 36 / 13; border-top-left-radius: 5px; border-top-right-radius: 5px; } diff --git a/src/pages/common/News.vue b/src/pages/common/News.vue index f45b08c4..9b4347dd 100644 --- a/src/pages/common/News.vue +++ b/src/pages/common/News.vue @@ -50,8 +50,8 @@
- {{ item.title }} -
+
+
{{ item.title }}
@@ -66,36 +66,33 @@ {{ item.user.label }}
- - 查看详情 - -
- forumIcon - {{ item.forum.name }} -
-
+
mdi-eye {{ item.data.view }}
-
+
mdi-star {{ item.data.mark }}
-
+
mdi-comment {{ item.data.reply }}
-
+
mdi-thumb-up {{ item.data.like }}
-
+
mdi-share-variant {{ item.data.forward }}
+
+ + {{ item.forum.name }} +
@@ -288,18 +285,23 @@ function searchPost(): void { .news-card { border-radius: 5px; - background: var(--box-bg-1); + background: var(--app-page-bg); color: var(--box-text-1); } +/* 增加辨识度 */ +.dark .news-card { + border: 1px solid var(--common-shadow-2); +} + .news-cover { position: relative; display: flex; overflow: hidden; width: 100%; - height: 150px; align-items: center; justify-content: center; + aspect-ratio: 36 / 13; } .news-cover img { @@ -310,27 +312,26 @@ function searchPost(): void { transition: all 0.3s linear; } -.news-card-title { +/* news item info */ +.news-content { position: relative; - height: 50px; + display: flex; + width: 100%; + flex-direction: column; + padding: 10px; + gap: 10px; } -/* news item info */ -.news-card-info { - display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: start; - margin: 0 10px 10px; - gap: 10px; +.news-card-title { + overflow: hidden; + width: 100%; + font-size: 18px; + text-overflow: ellipsis; + white-space: nowrap; } .news-card-user { display: flex; - max-width: 235px; - height: 50px; - align-items: center; - color: var(--box-text-4); } .ncu-left { @@ -372,10 +373,12 @@ function searchPost(): void { } .ncu-right { + position: relative; display: flex; height: 50px; flex-direction: column; align-items: start; + color: var(--box-text-4); } .ncu-right :nth-child(1) { @@ -388,11 +391,12 @@ function searchPost(): void { .ncu-right :nth-child(2) { display: flex; + width: 100%; height: 20px; align-items: center; justify-content: start; border-top: 2px solid var(--common-shadow-2); - font-size: 8px; + font-size: 14px; opacity: 0.7; } @@ -418,21 +422,6 @@ function searchPost(): void { margin-right: 5px; } -.news-card-btn { - border-radius: 5px; - margin-left: auto; -} - -.news-dev-btn img { - width: 20px; - height: 20px; - padding: 5px; - border-radius: 50%; - margin-right: 5px; - background: var(--common-shadow-2); - object-fit: cover; -} - .news-cover img:hover { cursor: pointer; transform: scale(1.1);