diff --git a/src/assets/index.css b/src/assets/index.css index 0bdd7eb5..3a3a58d4 100644 --- a/src/assets/index.css +++ b/src/assets/index.css @@ -74,13 +74,3 @@ html { height: 20px; margin: 5px; } - -.card-dev-btn { - background: #546d8b; - color: #faf7e8; -} - -.card-dev-btn img { - width: 18px; - height: 18px; -} diff --git a/src/plugins/Mys/utils/getNewsCard.ts b/src/plugins/Mys/utils/getNewsCard.ts index f31847fc..bc98778a 100644 --- a/src/plugins/Mys/utils/getNewsCard.ts +++ b/src/plugins/Mys/utils/getNewsCard.ts @@ -20,19 +20,19 @@ const defaultCover = "/source/UI/defaultCover.webp"; const EnumStatus = { STARTED: { status: "进行中", - colorCss: "#1EE2BA !important", + colorCss: "#1EE2BA", }, FINISHED: { status: "已结束", - colorCss: "#C0C5C8 !important", + colorCss: "#C0C5C8", }, SELECTION: { status: "评选中", - colorCss: "#FF983B !important", + colorCss: "#FF983B", }, UNKNOWN: { status: "未知", - colorCss: "#3C3F41 !important", + colorCss: "#F03F24", // 胭脂红 }, }; diff --git a/src/views/t-news.vue b/src/views/t-news.vue index c592192d..c2ab4dd4 100644 --- a/src/views/t-news.vue +++ b/src/views/t-news.vue @@ -49,8 +49,20 @@ {{ item.user.label }} - 查看详情 - + + 查看详情 + + right JSON @@ -59,7 +71,6 @@ {{ item.forum.name }}
-
mdi-eye {{ item.data.view }} @@ -95,12 +106,31 @@
cover -
- {{ item.status?.status }} +
+ +
+ {{ item.status?.status }} +
+
+ {{ item.status?.status }} +
+
+ mdi-clock-time-four-outline + {{ item.subtitle }} +
{{ item.title }} - {{ item.subtitle }}
@@ -116,8 +146,20 @@ {{ item.user.label }}
- 查看详情 - + + 查看详情 + + right JSON @@ -126,7 +168,6 @@ {{ item.forum.name }}
-
mdi-eye {{ item.data.view }} @@ -179,8 +220,20 @@ {{ item.user.label }}
- 查看详情 - + + 查看详情 + + right JSON @@ -189,7 +242,6 @@ {{ item.forum.name }}
-
mdi-eye {{ item.data.view }} @@ -361,25 +413,24 @@ async function loadMore(data: "notice" | "activity" | "news"): Promise { } async function toPost(item: TGApp.Plugins.Mys.News.RenderCard | string) { - console.log(item); - // if (typeof item === "string") { - // const path = router.resolve({ - // name: "帖子详情", - // params: { - // // eslint-disable-next-line camelcase - // post_id: item, - // }, - // }).href; - // createTGWindow(path, "帖子-Dev", item, 960, 720, false, false); - // } else { - // const path = router.resolve({ - // name: "帖子详情", - // params: { - // post_id: item.postId.toString(), - // }, - // }).href; - // createTGWindow(path, "帖子", item.title, 960, 720, false, false); - // } + if (typeof item === "string") { + const path = router.resolve({ + name: "帖子详情", + params: { + // eslint-disable-next-line camelcase + post_id: item, + }, + }).href; + createTGWindow(path, "帖子-Dev", item, 960, 720, false, false); + } else { + const path = router.resolve({ + name: "帖子详情", + params: { + post_id: item.postId.toString(), + }, + }).href; + createTGWindow(path, "帖子", item.title, 960, 720, false, false); + } } async function toJson(item: TGApp.Plugins.Mys.News.RenderCard | string) { @@ -472,12 +523,6 @@ async function searchPost() { transition: all 0.3s linear; } -.news-cover :hover { - cursor: pointer; - transform: scale(1.1); - transition: all 0.3s linear; -} - .news-card-title { position: relative; height: 50px; @@ -605,9 +650,6 @@ async function searchPost() { .news-dev-btn { border-radius: 5px; margin-left: auto; - background: var(--common-bg-1); - box-shadow: 0 0 10px var(--common-shadow-4); - color: var(--common-bgt-1); font-family: var(--font-title); } @@ -621,12 +663,18 @@ async function searchPost() { object-fit: cover; } +.news-cover img:hover { + cursor: pointer; + transform: scale(1.1); + transition: all 0.3s linear; +} + .news-card-data { display: flex; width: 100%; height: 20px; align-items: center; - justify-content: flex-start; + justify-content: flex-end; padding: 5px; column-gap: 10px; } @@ -642,18 +690,47 @@ async function searchPost() { } /* 活动页 */ -.news-act-process { +.news-card-act { position: absolute; bottom: 0; left: 0; display: flex; + width: 100%; align-items: center; - justify-content: center; - padding: 5px; + justify-content: space-between; backdrop-filter: blur(20px); - background: rgb(0 0 0/20%); - border-top-right-radius: 5px; - box-shadow: 0 0 10px rgb(0 0 0); + background: rgb(0 0 0/50%); + font-size: 12px; +} + +.nca-status-bg { + position: absolute; + top: 0; + left: 0; + align-items: center; + justify-content: flex-start; + padding: 5px 30px 5px 5px; + clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%); + opacity: 0.6; +} + +.nca-status { + display: flex; + align-items: center; + justify-content: flex-start; + padding: 5px 20px 5px 5px; + clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%); + color: #faf7e8; +} + +.nca-time { + display: flex; + align-items: center; + justify-content: flex-start; + margin: 5px; + color: #faf7e8; + gap: 5px; + opacity: 0.8; } /* load more */ @@ -661,20 +738,14 @@ async function searchPost() { display: flex; align-items: center; justify-content: center; - padding: 10px; - border-radius: 5px; - margin-top: 10px; - font-family: Genshin, serif; + margin: 10px; + font-family: var(--font-title); transition: all 0.3s linear; } .load-news button { - background: var(--btn-bg-3); - color: #faf7e8; -} - -.load-news button img { - width: 18px; - height: 18px; + border-radius: 5px; + background: var(--common-bg-1); + color: var(--common-bgt-1); }