update(journalList): 摘要 2 行溢出

mack-mac
mackt 5 months ago
parent 244839c383
commit c31d883486

@ -72,7 +72,7 @@ export default async function About() {
<br />
<p className="mt-[9px] text-[15px] leading-[24px]">
&nbsp;
<span className="text-[#C43737]">indier</span>
<span className="text-brand">indier</span>
&nbsp; <br />
</p>

@ -7,6 +7,7 @@
:root {
--body-bg-color: #fff;
--primary-color: #c43737;
}
@media (prefers-color-scheme: dark) {

@ -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 (
<div className="flex flex-col w-[712px] rounded-[6px] bg-base ">
<Link href={`/vol/${journalNo}`}>
<JournalCard showPlay image={image} title={title} journalNo={journalNo} className="cursor-pointer" />
<VolListCoverCard img={image} title={title} no={journalNo} />
</Link>
{/* 摘要 */}
<p className="w-full mt-[15px] mb-[12px] text-[17px] leading-[23.8px] text-base cursor-pointer overflow-hidden whitespace-nowrap truncate">
{summary}
</p>
<Link href={`/vol/${journalNo}`}>
<p className="w-full mt-[15px] mb-[12px] text-[17px] leading-[24px] text-base cursor-pointer text-overflow-2">
{summary}
</p>
</Link>
{/* 精选评论 */}
{!!commentList.length && (
<div className="flex flex-row mb-[24px]">

@ -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 (
<JournalCard image={img} journalNo={no}>
<JournalCard image={img} journalNo={no} className="cursor-pointer">
<div className={`absolute bottom-0 w-full h-[126px] ${styles.title_background}`}>
<p className="absolute bottom-[23px] left-[23px] text-[#fff] text-[24px] leading-[33.6px]">{title}</p>
</div>

@ -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"]
}

@ -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)',
},
},
});

Loading…
Cancel
Save