@@ -0,0 +1,44 @@
|
||||
import { AdIcons } from "@/components/common/ads";
|
||||
import { FriendLinks } from "@/components/common/friend-links";
|
||||
import { SeoBreadcrumb } from "@/components/seo/seo-breadcrumb";
|
||||
import type { HomePlayletResponse } from "@/lib/api/types";
|
||||
|
||||
import { FloatingActions } from "./floating-actions";
|
||||
import { HeroBanner } from "./hero-banner";
|
||||
import { HomeModules } from "./home-modules";
|
||||
import { HomePageH5 } from "./home-page-h5";
|
||||
import { NoticeMarquee } from "./notice-marquee";
|
||||
import { DownloadBanner } from "./page-sections";
|
||||
|
||||
const HOME_H1_FALLBACK = "海角社区 - 热门短剧在线看";
|
||||
|
||||
export function HomePage({
|
||||
home,
|
||||
heading,
|
||||
}: {
|
||||
home?: HomePlayletResponse | null;
|
||||
/** 与首页 TDK 对齐的主标题(H1) */
|
||||
heading?: string | null;
|
||||
}) {
|
||||
const hasModules = Boolean(home?.modules?.some((module) => module.list?.length || module.topicList?.length));
|
||||
const h1 = heading?.trim() || HOME_H1_FALLBACK;
|
||||
|
||||
return (
|
||||
<>
|
||||
<SeoBreadcrumb items={[{ name: "首页", href: "/" }]} />
|
||||
<h1 className="sr-only">{h1}</h1>
|
||||
<HomePageH5 home={home} />
|
||||
<main data-component="home-page" className="design-frame hidden flex-col gap-8 pt-8 pb-10 lg:flex">
|
||||
<HeroBanner banners={home?.homeBannerData} />
|
||||
<NoticeMarquee items={home?.announcements} />
|
||||
<AdIcons variant="pc" advitise={home?.advitise} />
|
||||
|
||||
{hasModules ? <HomeModules modules={home?.modules} /> : null}
|
||||
|
||||
<DownloadBanner />
|
||||
<FriendLinks advitise={home?.advitise} />
|
||||
</main>
|
||||
<FloatingActions />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user