From 2cbdc00a275ded2c6197deff81af8a3b721a14d3 Mon Sep 17 00:00:00 2001 From: mackt <1033530438@qq.com> Date: Wed, 27 Mar 2024 22:39:37 +0800 Subject: [PATCH] update(style): Update some styles --- public/img/download/back.svg | 24 +++++++++++++++++-- src/app/about/page.tsx | 8 ++----- src/app/download/components/DownloadCard.tsx | 6 ++--- src/app/download/components/index.module.css | 12 ++++++++++ src/app/download/page.tsx | 2 +- src/app/vol/[journalId]/page.tsx | 2 +- .../vol/list/[category]/[[...page]]/page.tsx | 2 +- src/components/ContributorCard.tsx | 4 +++- src/components/Journal/HotJournalList.tsx | 2 +- src/components/Journal/JournalItem.tsx | 6 ++--- src/components/Journal/JournalList.tsx | 8 ++++--- 11 files changed, 54 insertions(+), 22 deletions(-) diff --git a/public/img/download/back.svg b/public/img/download/back.svg index feadb45..66f8126 100644 --- a/public/img/download/back.svg +++ b/public/img/download/back.svg @@ -1,3 +1,23 @@ - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index d9f1c05..3c93fb3 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -12,15 +12,11 @@ export interface ContributorCardType { contributorRole: string; } -let contributorList: UserInfo[] = []; +export default async function Download() { + let contributorList: UserInfo[] = []; -const handleGetThanks = async () => { const result = await apiThanks(); if (result) contributorList = result; -}; - -export default async function Download() { - handleGetThanks(); return (
diff --git a/src/app/download/components/DownloadCard.tsx b/src/app/download/components/DownloadCard.tsx index e4c643e..b926090 100644 --- a/src/app/download/components/DownloadCard.tsx +++ b/src/app/download/components/DownloadCard.tsx @@ -19,16 +19,16 @@ export default function Footer({ platform, iconUrl, qrCode }: DownloadQrcodeCard
{/* 卡片 */}
{`${platform}-icon`}
-

+

下载应用

-

{platform}

+

{platform}

diff --git a/src/app/download/components/index.module.css b/src/app/download/components/index.module.css index 754edb3..c18aefc 100644 --- a/src/app/download/components/index.module.css +++ b/src/app/download/components/index.module.css @@ -19,3 +19,15 @@ border-right: 6px solid transparent; border-bottom: 6px solid #fff; } + +.hover_mask:hover::after { + z-index: 4; + content: ''; + position: absolute; + top: 0; + left: 0; + width: 200px; + height: 72px; + border-radius: 9px; + background-color: rgba(255, 255, 255, 0.1); /* 白色蒙层,透明度为10% */ +} diff --git a/src/app/download/page.tsx b/src/app/download/page.tsx index e60eb7e..7306c95 100644 --- a/src/app/download/page.tsx +++ b/src/app/download/page.tsx @@ -25,7 +25,7 @@ export default function Download() { {/* slogan */}
为独立音乐,雀跃 - / + / 独立 不独于世
diff --git a/src/app/vol/[journalId]/page.tsx b/src/app/vol/[journalId]/page.tsx index 76aaa77..67e22d5 100644 --- a/src/app/vol/[journalId]/page.tsx +++ b/src/app/vol/[journalId]/page.tsx @@ -13,7 +13,7 @@ export default async function JournalDetail({ params: { journalId } }: { params: return (
- {journalInfo && } + {!!journalInfo && }
{songList && diff --git a/src/app/vol/list/[category]/[[...page]]/page.tsx b/src/app/vol/list/[category]/[[...page]]/page.tsx index d692190..f6496fa 100644 --- a/src/app/vol/list/[category]/[[...page]]/page.tsx +++ b/src/app/vol/list/[category]/[[...page]]/page.tsx @@ -17,7 +17,7 @@ export default async function Journal({ params }: { params: { category?: string;
{/* 右侧 */} -
+
{/* 热门推荐 */}
diff --git a/src/components/ContributorCard.tsx b/src/components/ContributorCard.tsx index 7a22d8a..9bfe374 100644 --- a/src/components/ContributorCard.tsx +++ b/src/components/ContributorCard.tsx @@ -6,7 +6,9 @@ export default function ContributorCard({ nickName, avatar, contributorRole }: C return (
-

{nickName}

+

+ {nickName} +

{contributorRole}

); diff --git a/src/components/Journal/HotJournalList.tsx b/src/components/Journal/HotJournalList.tsx index 8d2fbc6..a1f96eb 100644 --- a/src/components/Journal/HotJournalList.tsx +++ b/src/components/Journal/HotJournalList.tsx @@ -21,7 +21,7 @@ const RecommondJournal = async (prop: any) => { } return ( -
+
{/* 分类 & 电台 */}
热门推荐
diff --git a/src/components/Journal/JournalItem.tsx b/src/components/Journal/JournalItem.tsx index 426c5c0..63b5346 100644 --- a/src/components/Journal/JournalItem.tsx +++ b/src/components/Journal/JournalItem.tsx @@ -15,14 +15,14 @@ export default function JournalItem({ return (
- + {/* 摘要 */}

{summary}

- {/* 评论 */} - {commentList.length && ( + {/* 精选评论 */} + {!!commentList.length && (
{commentList?.[0]?.avatar && } diff --git a/src/components/Journal/JournalList.tsx b/src/components/Journal/JournalList.tsx index 46ce11b..a229e19 100644 --- a/src/components/Journal/JournalList.tsx +++ b/src/components/Journal/JournalList.tsx @@ -1,5 +1,4 @@ import Image from 'next/image'; -import Link from 'next/link'; import JournalItem from './JournalItem'; @@ -14,12 +13,14 @@ interface Props { } const JournalList = async ({ categoryId, nameCh, journalNoRange, pageNum, pageSize }: Props) => { - const journalList: JournalList = await apiJournalList({ + const res = await apiJournalList({ categoryId, journalNoRange, pageNum, pageSize, }); + let journalList; + if (res) journalList = res; return (
@@ -34,7 +35,8 @@ const JournalList = async ({ categoryId, nameCh, journalNoRange, pageNum, pageSi {/* 期刊 list */}
- {journalList?.rows.length && journalList.rows.map((item: JournalInfo) => )} + {journalList?.rows.length && + journalList.rows.map((item: JournalInfo) => )}
);