From 14dd841363222f5d4d639cf50c4db11653bd83b7 Mon Sep 17 00:00:00 2001 From: mackt <1033530438@qq.com> Date: Wed, 17 Apr 2024 23:28:33 +0800 Subject: [PATCH] =?UTF-8?q?update(journal):=20=E8=B0=83=E6=95=B4=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/img/icon/play-journal-card.svg | 4 +++ src/components/Category.tsx | 2 +- src/components/Journal/JournalCard.tsx | 26 ++++++++++++------- src/components/Journal/JournalItem.tsx | 4 +-- .../Journal/JournalRecommendCard.tsx | 4 +-- src/components/Journal/index.module.css | 3 +++ uno.config.ts | 4 +-- 7 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 public/img/icon/play-journal-card.svg create mode 100644 src/components/Journal/index.module.css diff --git a/public/img/icon/play-journal-card.svg b/public/img/icon/play-journal-card.svg new file mode 100644 index 0000000..1cd7729 --- /dev/null +++ b/public/img/icon/play-journal-card.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/Category.tsx b/src/components/Category.tsx index 73d0757..62264c9 100644 --- a/src/components/Category.tsx +++ b/src/components/Category.tsx @@ -7,7 +7,7 @@ const Category = async ({ list, current }: { list: Category[]; current: string } {item.nameCh} diff --git a/src/components/Journal/JournalCard.tsx b/src/components/Journal/JournalCard.tsx index 347ead3..488628f 100644 --- a/src/components/Journal/JournalCard.tsx +++ b/src/components/Journal/JournalCard.tsx @@ -1,13 +1,15 @@ import Image from 'next/image'; -function VolNo({ no }: { no: string }) { +import styles from './index.module.css'; + +function VolNo({ text }: { text: string }) { return ( -
-

- {no.toString().padStart(4, '0')} +

+

+ {text.toString().padStart(4, '0')}

-
-

VOL

+
+

VOL

); } @@ -15,9 +17,9 @@ function VolNo({ no }: { no: string }) { export default function JournalCard({ image, title, journalNo }: { image: string; title?: string; journalNo: string }) { return ( /* banner container */ -
- {/* 左上角标 */} - +
+ {/* 左上方 角标 */} + {/* banner */} {/* 标题 */} - {title &&

{title}

} +
+

{title}

+
+ {/* 遮罩层 */} +
); } diff --git a/src/components/Journal/JournalItem.tsx b/src/components/Journal/JournalItem.tsx index 1d694a6..cdede23 100644 --- a/src/components/Journal/JournalItem.tsx +++ b/src/components/Journal/JournalItem.tsx @@ -19,7 +19,7 @@ export default function JournalItem({ {/* 摘要 */} -

+

{summary}

{/* 精选评论 */} @@ -33,7 +33,7 @@ export default function JournalItem({
)}
-

+

{commentList[0].content}

diff --git a/src/components/Journal/JournalRecommendCard.tsx b/src/components/Journal/JournalRecommendCard.tsx index b0320ac..b44b9e9 100644 --- a/src/components/Journal/JournalRecommendCard.tsx +++ b/src/components/Journal/JournalRecommendCard.tsx @@ -5,10 +5,10 @@ export default function JournalRecommendCard({ title, image, userCollectCount }:
{title}{' '}
-

+

{title}

-

{`${userCollectCount}人收藏`}

+

{`${userCollectCount}人收藏`}

); diff --git a/src/components/Journal/index.module.css b/src/components/Journal/index.module.css new file mode 100644 index 0000000..64a6640 --- /dev/null +++ b/src/components/Journal/index.module.css @@ -0,0 +1,3 @@ +.title_background { + background: linear-gradient(180deg, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.6) 100%); +} diff --git a/uno.config.ts b/uno.config.ts index 007eae3..32f35e9 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -25,9 +25,9 @@ export default defineConfig({ 'text-base': 'text-[rgba(0,0,0,0.95)] dark:text-[#f0f0f0] switch-animation', 'switch-label-base': 'bg-gray-200 dark:bg-gray-800 switch-animation', 'switch-span-base': 'bg-white dark:bg-gray-300 switch-animation', - 'text-brand': 'text-[#C43737]', 'text-overflow': 'overflow-hidden whitespace-nowrap truncate', - 'border-brand': 'border-[#C43737]', + 'text-brand': 'text-[#C43737]', 'bg-brand': 'bg-[#C43737]', + 'border-brand': 'border-[#C43737]', }, });