ads: add in-content 728x90 banner to gear, technology, forum, authors
These four landing pages already had the site-wide header leaderboard via <Header />, but no additional in-content banner. Add one 728x90 slot at the bottom of the main column on each, gated on ADS_728X90.length > 0 and hidden on mobile to match the header banner's display rules. - /gear — category landing - /technology — category landing - /forum — community landing - /authors/[slug] — author profile Brings these pages in line with /show-coverage and /about/* which got the same treatment earlier. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,8 @@ import { useParams } from "next/navigation";
|
|||||||
import AppImage from "@/components/ui/AppImage";
|
import AppImage from "@/components/ui/AppImage";
|
||||||
import Header from "@/components/Header";
|
import Header from "@/components/Header";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
|
import AdImage from "@/components/AdImage";
|
||||||
|
import { ADS_728X90, shuffle } from "@/lib/ads";
|
||||||
|
|
||||||
interface AuthorProfile {
|
interface AuthorProfile {
|
||||||
slug: string;
|
slug: string;
|
||||||
@@ -475,6 +477,13 @@ export default function AuthorProfilePage() {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* In-content 728x90 banner */}
|
||||||
|
{ADS_728X90.length > 0 && (
|
||||||
|
<div className="max-w-container mx-auto px-4 mt-10 hidden md:flex justify-center" aria-label="Advertisement">
|
||||||
|
<AdImage ad={shuffle(ADS_728X90)[0]} page="authors" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</>);
|
</>);
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import React, { useState, useEffect } from 'react';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import Header from '@/components/Header';
|
import Header from '@/components/Header';
|
||||||
import Footer from '@/components/Footer';
|
import Footer from '@/components/Footer';
|
||||||
|
import AdImage from '@/components/AdImage';
|
||||||
|
import { ADS_728X90, shuffle } from '@/lib/ads';
|
||||||
import { createClient } from '@/lib/supabase/client';
|
import { createClient } from '@/lib/supabase/client';
|
||||||
|
|
||||||
interface ForumCategory {
|
interface ForumCategory {
|
||||||
@@ -567,6 +569,13 @@ export default function ForumIndexPage() {
|
|||||||
<li>• No spam, self-promotion, or vendor pitches without disclosure</li>
|
<li>• No spam, self-promotion, or vendor pitches without disclosure</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* In-content 728x90 banner */}
|
||||||
|
{ADS_728X90.length > 0 && (
|
||||||
|
<div className="mt-10 hidden md:flex justify-center" aria-label="Advertisement">
|
||||||
|
<AdImage ad={shuffle(ADS_728X90)[0]} page="forum" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import Link from "next/link";
|
|||||||
import Header from "@/components/Header";
|
import Header from "@/components/Header";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
import AppImage from "@/components/ui/AppImage";
|
import AppImage from "@/components/ui/AppImage";
|
||||||
|
import AdImage from "@/components/AdImage";
|
||||||
|
import { ADS_728X90, shuffle } from "@/lib/ads";
|
||||||
import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source";
|
import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source";
|
||||||
|
|
||||||
export const revalidate = 1800;
|
export const revalidate = 1800;
|
||||||
@@ -85,6 +87,13 @@ export default async function GearPage() {
|
|||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* In-content 728x90 banner */}
|
||||||
|
{ADS_728X90.length > 0 && (
|
||||||
|
<div className="mt-12 hidden md:flex justify-center" aria-label="Advertisement">
|
||||||
|
<AdImage ad={shuffle(ADS_728X90)[0]} page="gear" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import Link from "next/link";
|
|||||||
import Header from "@/components/Header";
|
import Header from "@/components/Header";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
import AppImage from "@/components/ui/AppImage";
|
import AppImage from "@/components/ui/AppImage";
|
||||||
|
import AdImage from "@/components/AdImage";
|
||||||
|
import { ADS_728X90, shuffle } from "@/lib/ads";
|
||||||
import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source";
|
import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source";
|
||||||
|
|
||||||
export const revalidate = 1800;
|
export const revalidate = 1800;
|
||||||
@@ -112,6 +114,13 @@ export default async function TechnologyPage() {
|
|||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* In-content 728x90 banner */}
|
||||||
|
{ADS_728X90.length > 0 && (
|
||||||
|
<div className="mt-12 hidden md:flex justify-center" aria-label="Advertisement">
|
||||||
|
<AdImage ad={shuffle(ADS_728X90)[0]} page="technology" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user