show-coverage: add site Header + Footer + in-content 728x90 banner
Both /show-coverage and /show-coverage/[slug] were rendering bare <main> elements with no site chrome — no top nav, no leaderboard ad above the page, no footer, no in-content banners. - Wrap each page in <div className="min-h-screen bg-background"> <Header />…<Footer /></div>. <Header /> already brings the site-wide 728x90 leaderboard with it (see Header.tsx footer of the component) so that banner appears automatically above the page content. - Add one in-content 728x90 banner per page (between Upcoming/Past on the index, and between event header / Coverage list on the detail page) so the show-coverage pages carry the same ad inventory as other sections. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { createClient } from "@supabase/supabase-js";
|
import { createClient } from "@supabase/supabase-js";
|
||||||
|
import Header from "@/components/Header";
|
||||||
|
import Footer from "@/components/Footer";
|
||||||
|
import AdImage from "@/components/AdImage";
|
||||||
|
import { ADS_728X90, shuffle } from "@/lib/ads";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
export const revalidate = 600;
|
export const revalidate = 600;
|
||||||
@@ -156,6 +160,8 @@ export default async function EventCoveragePage({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div className="min-h-screen bg-background">
|
||||||
|
<Header />
|
||||||
<main className="mx-auto max-w-5xl px-6 py-10 text-[#e5e7eb]">
|
<main className="mx-auto max-w-5xl px-6 py-10 text-[#e5e7eb]">
|
||||||
<script
|
<script
|
||||||
type="application/ld+json"
|
type="application/ld+json"
|
||||||
@@ -205,6 +211,13 @@ export default async function EventCoveragePage({
|
|||||||
)}
|
)}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
{/* In-content 728x90 banner */}
|
||||||
|
{ADS_728X90.length > 0 && (
|
||||||
|
<div className="my-8 hidden md:flex justify-center" aria-label="Advertisement">
|
||||||
|
<AdImage ad={shuffle(ADS_728X90)[0]} page="show-coverage" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h2 className="font-mono text-xs uppercase tracking-wider text-[#6b7280] mb-4">
|
<h2 className="font-mono text-xs uppercase tracking-wider text-[#6b7280] mb-4">
|
||||||
Coverage ({articles.length})
|
Coverage ({articles.length})
|
||||||
@@ -233,5 +246,7 @@ export default async function EventCoveragePage({
|
|||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { createClient } from "@supabase/supabase-js";
|
import { createClient } from "@supabase/supabase-js";
|
||||||
|
import Header from "@/components/Header";
|
||||||
|
import Footer from "@/components/Footer";
|
||||||
|
import AdImage from "@/components/AdImage";
|
||||||
|
import { ADS_728X90, shuffle } from "@/lib/ads";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
export const revalidate = 600;
|
export const revalidate = 600;
|
||||||
@@ -62,6 +66,8 @@ export default async function ShowCoverageIndex() {
|
|||||||
const past = events.filter((e) => e.end_date < today);
|
const past = events.filter((e) => e.end_date < today);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div className="min-h-screen bg-background">
|
||||||
|
<Header />
|
||||||
<main className="mx-auto max-w-6xl px-6 py-10 text-[#e5e7eb]">
|
<main className="mx-auto max-w-6xl px-6 py-10 text-[#e5e7eb]">
|
||||||
<header className="mb-8">
|
<header className="mb-8">
|
||||||
<h1 className="font-serif text-4xl font-bold tracking-tight">Show coverage</h1>
|
<h1 className="font-serif text-4xl font-bold tracking-tight">Show coverage</h1>
|
||||||
@@ -85,6 +91,13 @@ export default async function ShowCoverageIndex() {
|
|||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{/* In-content 728x90 banner */}
|
||||||
|
{ADS_728X90.length > 0 && (
|
||||||
|
<div className="my-10 hidden md:flex justify-center" aria-label="Advertisement">
|
||||||
|
<AdImage ad={shuffle(ADS_728X90)[0]} page="show-coverage" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{past.length > 0 && (
|
{past.length > 0 && (
|
||||||
<section>
|
<section>
|
||||||
<h2 className="font-mono text-xs uppercase tracking-wider text-[#6b7280] mb-4">
|
<h2 className="font-mono text-xs uppercase tracking-wider text-[#6b7280] mb-4">
|
||||||
@@ -98,6 +111,8 @@ export default async function ShowCoverageIndex() {
|
|||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
</main>
|
</main>
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user