代码提交

This commit is contained in:
wong
2025-07-06 00:17:24 +08:00
parent e808ee1a90
commit 15b899b0e8
9 changed files with 606 additions and 230 deletions

View File

@@ -153,22 +153,28 @@ export default function MaterialsPage({ params }: { params: Promise<{ id: string
href={first.url}
target="_blank"
rel="noopener noreferrer"
className="flex items-center bg-white rounded p-2 hover:bg-gray-50 transition group"
className=" items-center bg-white rounded p-2 hover:bg-gray-50 transition group"
style={{ textDecoration: 'none' }}
>
{first.image && (
<div className="mb-3">
<p className="text-gray-700 whitespace-pre-line">{material.content}</p>
</div>
<div className="flex items-center" style={{ border: '1px solid #ededed' }}>
<div className="flex-shrink-0 w-14 h-14 rounded overflow-hidden mr-3 bg-gray-100">
<Image
src={first.image}
src={first.image ?? 'https://api.dicebear.com/7.x/avataaars/svg?seed=123'}
alt="封面图"
width={56}
height={56}
className="object-cover w-full h-full"
/>
</div>
)}
<div className="flex-1 min-w-0">
<div className="text-base font-medium truncate group-hover:text-blue-600">{first.desc}</div>
<div className="text-base font-medium truncate">{first.desc ?? '这是一条链接'}</div>
</div>
</div>
</a>
);
@@ -179,6 +185,7 @@ export default function MaterialsPage({ params }: { params: Promise<{ id: string
const videoUrl = typeof first === "string" ? first : (first.url || "");
return videoUrl ? (
<div className="mb-3">
<p className="text-gray-700 whitespace-pre-line">{material.content}</p>
<video src={videoUrl} controls className="rounded w-full max-w-md" />
</div>
) : null;