From c31d883486416f1c3dcd41ec60643a0e4b27b2f7 Mon Sep 17 00:00:00 2001
From: mackt <1033530438@qq.com>
Date: Thu, 18 Apr 2024 22:25:59 +0800
Subject: [PATCH] =?UTF-8?q?update(journalList):=20=E6=91=98=E8=A6=81=202?=
=?UTF-8?q?=20=E8=A1=8C=E6=BA=A2=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/about/page.tsx | 2 +-
src/app/globals.css | 1 +
src/components/Journal/JournalItem.tsx | 14 ++++--
.../Journal/JournalList/VolListCoverCard.tsx | 14 +-----
tsconfig.json | 2 +-
uno.config.ts | 46 ++++++++++++++-----
6 files changed, 48 insertions(+), 31 deletions(-)
diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx
index ae045c9..712cb2b 100644
--- a/src/app/about/page.tsx
+++ b/src/app/about/page.tsx
@@ -72,7 +72,7 @@ export default async function About() {
如果你也想加入我们,无论是提供技术、资金或是其他任何方式的支持,都可以加微信号
- indier
+ indier
联系到我们。
感谢音乐,感谢遇见,感谢所有的贡献者。还有感谢那些途中参与过,给予我们帮助的人们。所有的奉献都值得被铭记。
diff --git a/src/app/globals.css b/src/app/globals.css
index 662aff9..2ec4b6b 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -7,6 +7,7 @@
:root {
--body-bg-color: #fff;
+ --primary-color: #c43737;
}
@media (prefers-color-scheme: dark) {
diff --git a/src/components/Journal/JournalItem.tsx b/src/components/Journal/JournalItem.tsx
index 767a1fa..c575dce 100644
--- a/src/components/Journal/JournalItem.tsx
+++ b/src/components/Journal/JournalItem.tsx
@@ -1,6 +1,6 @@
import Link from 'next/link';
-import { Avatar, JournalCard, ButtonCollect } from '@/components';
+import { Avatar, VolListCoverCard, ButtonCollect } from '@/components';
export default function JournalItem({
journalNo,
@@ -16,12 +16,16 @@ export default function JournalItem({
return (
-
+
+
{/* 摘要 */}
-
- {summary}
-
+
+
+ {summary}
+
+
+
{/* 精选评论 */}
{!!commentList.length && (
diff --git a/src/components/Journal/JournalList/VolListCoverCard.tsx b/src/components/Journal/JournalList/VolListCoverCard.tsx
index c5c4098..8d06227 100644
--- a/src/components/Journal/JournalList/VolListCoverCard.tsx
+++ b/src/components/Journal/JournalList/VolListCoverCard.tsx
@@ -2,19 +2,9 @@ import styles from '../index.module.css';
import { JournalCard } from '@/components';
-export default function CoverCard({
- title,
- img,
- no,
-}: {
- title: string;
- img: string;
- no: string;
- playStatus: boolean;
- onPlay: () => void;
-}) {
+export default function CoverCard({ title, img, no }: { title: string; img: string; no: string }) {
return (
-
+
diff --git a/tsconfig.json b/tsconfig.json
index 7ca4c1c..e504774 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -22,5 +22,5 @@
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "dist/types/**/*.ts"],
- "exclude": ["node_modules"]
+ "exclude": ["node_modules", "uno.config.css"]
}
diff --git a/uno.config.ts b/uno.config.ts
index 32f35e9..d180c0b 100644
--- a/uno.config.ts
+++ b/uno.config.ts
@@ -1,6 +1,7 @@
import { defineConfig, presetUno, presetAttributify, presetIcons } from 'unocss';
import presetAnimations from 'unocss-preset-animations';
import { presetShadcn } from 'unocss-preset-shadcn';
+import { colors } from 'unocss/preset-mini';
export default defineConfig({
presets: [
@@ -16,18 +17,39 @@ export default defineConfig({
}),
],
- rules: [['text-flow', { 'text-overflow': 'ellipsis', 'white-space': 'nowrap', overflow: 'hidden' }]],
+ rules: [
+ ['text-flow', { 'text-overflow': 'ellipsis', 'white-space': 'nowrap', overflow: 'hidden' }],
+ [
+ /^text-overflow-(\d+)$/,
+ ([, d]) => ({
+ overflow: 'hidden',
+ 'text-overflow': 'ellipsis',
+ display: '-webkit-box',
+ '-webkit-line-clamp': parseInt(d),
+ /* autoprefixer: ignore next */
+ '-webkit-box-orient': 'vertical',
+ }),
+ ],
+ ],
+
+ shortcuts: [
+ {
+ 'switch-animation': 'transition duration-300',
+ 'bg-base': 'bg-[#fff] dark:bg-[#20202a] switch-animation',
+ 'card-base': 'bg-[#ffffff] dark:bg-[#10101a] switch-animation',
+ '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-overflow': 'overflow-hidden whitespace-nowrap truncate',
+ 'text-brand': 'text-brand',
+ 'bg-brand': 'bg-brand',
+ 'border-brand': 'border-brand',
+ },
+ ],
- shortcuts: {
- 'switch-animation': 'transition duration-300',
- 'bg-base': 'bg-[#fff] dark:bg-[#20202a] switch-animation',
- 'card-base': 'bg-[#ffffff] dark:bg-[#10101a] switch-animation',
- '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-overflow': 'overflow-hidden whitespace-nowrap truncate',
- 'text-brand': 'text-[#C43737]',
- 'bg-brand': 'bg-[#C43737]',
- 'border-brand': 'border-[#C43737]',
+ theme: {
+ colors: {
+ brand: 'var(--primary-color)',
+ },
},
});