This commit is contained in:
root
2026-06-07 23:18:53 +08:00
parent ebd3d6a317
commit 934b9a4a23
36 changed files with 2272 additions and 296 deletions

View File

@@ -5,6 +5,7 @@ import { Link, useLocale } from "@/i18n/navigation";
import { apiFetch } from "@/app/lib/api-client";
import Footer from "@/app/components/Footer";
import ContentSubmissionModal from "@/app/components/ContentSubmissionModal";
import { mediaUrl } from "@/app/lib/media";
interface ContentItem {
slug: string;
@@ -58,7 +59,7 @@ export default function EbookPage({ params }: { params: Promise<{ slug: string }
<main className="mx-auto max-w-6xl px-4 py-8 sm:px-6 sm:py-12">
<div className="grid gap-8 lg:grid-cols-[360px_1fr]">
<div className="overflow-hidden rounded-2xl bg-white shadow-lg dark:bg-gray-900">
<img src={item.coverImage} alt={title} className="h-96 w-full object-cover" />
<img src={mediaUrl(item.coverImage)} alt={title} className="h-96 w-full object-cover" />
</div>
<section>
<p className="text-sm font-semibold text-[#ff4d4f]">电子书</p>
@@ -80,7 +81,7 @@ export default function EbookPage({ params }: { params: Promise<{ slug: string }
<div className="mt-8 flex flex-wrap gap-3">
{item.mediaUrl ? (
<a href={item.mediaUrl} className="rounded-full bg-[#ff4d4f] px-5 py-3 text-sm font-semibold text-white hover:bg-[#ff7a45]">
<a href={mediaUrl(item.mediaUrl)} className="rounded-full bg-[#ff4d4f] px-5 py-3 text-sm font-semibold text-white hover:bg-[#ff7a45]">
下载电子书
</a>
) : (