ads: float SidebarAdStack at top of <main> on 7 more pages

gear, technology, search, reading-list, show-coverage, authors/[slug],
forum/thread/[id] all now render the 300x600 + 300x250 stack as a
floating right column at the top of the content area. Existing
single-column page structure preserved (content wraps).

Maximizes impression count: every pageview across these pages now
counts 300x600 + every 300x250 in the stack, on top of the existing
728x90 in Header.
This commit is contained in:
Ryan Salazar
2026-05-24 23:13:30 +00:00
parent 936f283b6d
commit 88edf33155
7 changed files with 14 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import Header from "@/components/Header";
import Footer from "@/components/Footer"; import Footer from "@/components/Footer";
import AdImage from "@/components/AdImage"; import AdImage from "@/components/AdImage";
import { ADS_728X90, shuffle } from "@/lib/ads"; import { ADS_728X90, shuffle } from "@/lib/ads";
import SidebarAdStack from "@/components/SidebarAdStack";
interface AuthorProfile { interface AuthorProfile {
slug: string; slug: string;
@@ -113,6 +114,7 @@ export default function AuthorProfilePage() {
<> <>
<Header /> <Header />
<main className="bg-[#111111] min-h-screen"> <main className="bg-[#111111] min-h-screen">
<aside className="float-right ml-6 mb-6 hidden lg:block max-w-[300px]"><SidebarAdStack /></aside>
{/* Cover Image */} {/* Cover Image */}
<div className="relative h-40 md:h-52 overflow-hidden"> <div className="relative h-40 md:h-52 overflow-hidden">
{profile && ( {profile && (

View File

@@ -7,6 +7,7 @@ import Footer from '@/components/Footer';
import AdImage from '@/components/AdImage'; import AdImage from '@/components/AdImage';
import { ADS_300X250, rotateAll } from '@/lib/ads'; import { ADS_300X250, rotateAll } from '@/lib/ads';
import { createClient } from '@/lib/supabase/client'; import { createClient } from '@/lib/supabase/client';
import SidebarAdStack from "@/components/SidebarAdStack";
// Inline ad slot inserted between forum replies every N posts. // Inline ad slot inserted between forum replies every N posts.
function InThreadAd({ adIndex }: { adIndex: number }) { function InThreadAd({ adIndex }: { adIndex: number }) {
@@ -296,6 +297,7 @@ export default function ForumThreadPage() {
<> <>
<Header /> <Header />
<main className="min-h-screen bg-[#111111]"> <main className="min-h-screen bg-[#111111]">
<aside className="float-right ml-6 mb-6 hidden lg:block max-w-[300px]"><SidebarAdStack /></aside>
<div className="max-w-container mx-auto px-4 py-10 space-y-4"> <div className="max-w-container mx-auto px-4 py-10 space-y-4">
<div className="h-8 bg-[#1a1a1a] rounded animate-pulse w-2/3" /> <div className="h-8 bg-[#1a1a1a] rounded animate-pulse w-2/3" />
<div className="h-32 bg-[#1a1a1a] rounded animate-pulse" /> <div className="h-32 bg-[#1a1a1a] rounded animate-pulse" />

View File

@@ -7,6 +7,7 @@ import AppImage from "@/components/ui/AppImage";
import AdImage from "@/components/AdImage"; import AdImage from "@/components/AdImage";
import { ADS_728X90, shuffle } from "@/lib/ads"; import { ADS_728X90, shuffle } from "@/lib/ads";
import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source"; import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source";
import SidebarAdStack from "@/components/SidebarAdStack";
export const revalidate = 1800; export const revalidate = 1800;
@@ -41,6 +42,7 @@ export default async function GearPage() {
</div> </div>
<main className="max-w-container mx-auto px-4 py-8"> <main className="max-w-container mx-auto px-4 py-8">
<aside className="float-right ml-6 mb-6 hidden lg:block max-w-[300px]"><SidebarAdStack /></aside>
{/* Featured gear grid */} {/* Featured gear grid */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-10"> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-10">
{articles.map((article) => ( {articles.map((article) => (

View File

@@ -7,6 +7,7 @@ import Footer from "@/components/Footer";
import AdImage from "@/components/AdImage"; import AdImage from "@/components/AdImage";
import { ADS_728X90, shuffle } from "@/lib/ads"; import { ADS_728X90, shuffle } from "@/lib/ads";
import { createClient } from "@/lib/supabase/client"; import { createClient } from "@/lib/supabase/client";
import SidebarAdStack from "@/components/SidebarAdStack";
interface SavedArticle { interface SavedArticle {
id: string; id: string;
@@ -116,6 +117,7 @@ export default function ReadingListPage() {
<> <>
<Header /> <Header />
<main className="bg-[#111111] min-h-screen"> <main className="bg-[#111111] min-h-screen">
<aside className="float-right ml-6 mb-6 hidden lg:block max-w-[300px]"><SidebarAdStack /></aside>
{/* Toast */} {/* Toast */}
{toast && ( {toast && (
<div className="fixed bottom-6 left-1/2 -translate-x-1/2 z-50 bg-[#1a2535] border border-[#3b82f6] text-[#e0e0e0] font-body text-sm px-5 py-3 rounded-sm shadow-lg flex items-center gap-2"> <div className="fixed bottom-6 left-1/2 -translate-x-1/2 z-50 bg-[#1a2535] border border-[#3b82f6] text-[#e0e0e0] font-body text-sm px-5 py-3 rounded-sm shadow-lg flex items-center gap-2">

View File

@@ -6,6 +6,7 @@ import AppImage from "@/components/ui/AppImage";
import AdImage from "@/components/AdImage"; import AdImage from "@/components/AdImage";
import { ADS_728X90, shuffle } from "@/lib/ads"; import { ADS_728X90, shuffle } from "@/lib/ads";
import { searchLegacyArticles } from "@/lib/articles/legacy-source"; import { searchLegacyArticles } from "@/lib/articles/legacy-source";
import SidebarAdStack from "@/components/SidebarAdStack";
export const revalidate = 60; export const revalidate = 60;
@@ -46,6 +47,7 @@ export default async function SearchPage({ searchParams }: SearchPageProps) {
</div> </div>
<main className="max-w-container mx-auto px-4 py-8"> <main className="max-w-container mx-auto px-4 py-8">
<aside className="float-right ml-6 mb-6 hidden lg:block max-w-[300px]"><SidebarAdStack /></aside>
{query && results.length === 0 && ( {query && results.length === 0 && (
<div className="py-16 text-center"> <div className="py-16 text-center">
<p className="text-[#555] font-body text-sm mb-3">No articles match your search.</p> <p className="text-[#555] font-body text-sm mb-3">No articles match your search.</p>

View File

@@ -4,6 +4,7 @@ import Header from "@/components/Header";
import Footer from "@/components/Footer"; import Footer from "@/components/Footer";
import AdImage from "@/components/AdImage"; import AdImage from "@/components/AdImage";
import { ADS_728X90, shuffle } from "@/lib/ads"; import { ADS_728X90, shuffle } from "@/lib/ads";
import SidebarAdStack from "@/components/SidebarAdStack";
export const dynamic = "force-dynamic"; export const dynamic = "force-dynamic";
export const revalidate = 600; export const revalidate = 600;
@@ -69,6 +70,7 @@ export default async function ShowCoverageIndex() {
<div className="min-h-screen bg-background"> <div className="min-h-screen bg-background">
<Header /> <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]">
<aside className="float-right ml-6 mb-6 hidden lg:block max-w-[300px]"><SidebarAdStack /></aside>
<header className="mb-8"> <header className="mb-8">
<h1 className="font-serif text-4xl font-bold tracking-tight">Industry Show Coverage</h1> <h1 className="font-serif text-4xl font-bold tracking-tight">Industry Show Coverage</h1>
<p className="text-sm text-[#9ca3af] mt-2 font-mono"> <p className="text-sm text-[#9ca3af] mt-2 font-mono">

View File

@@ -7,6 +7,7 @@ import AppImage from "@/components/ui/AppImage";
import AdImage from "@/components/AdImage"; import AdImage from "@/components/AdImage";
import { ADS_728X90, shuffle } from "@/lib/ads"; import { ADS_728X90, shuffle } from "@/lib/ads";
import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source"; import { getLegacyArticlesBySection } from "@/lib/articles/legacy-source";
import SidebarAdStack from "@/components/SidebarAdStack";
export const revalidate = 1800; export const revalidate = 1800;
@@ -125,6 +126,7 @@ export default async function TechnologyPage({ searchParams }: PageProps) {
</div> </div>
<main className="max-w-container mx-auto px-4 py-8"> <main className="max-w-container mx-auto px-4 py-8">
<aside className="float-right ml-6 mb-6 hidden lg:block max-w-[300px]"><SidebarAdStack /></aside>
{articles.length === 0 && ( {articles.length === 0 && (
<div className="text-center py-16"> <div className="text-center py-16">
<p className="font-body text-[#888] text-base"> <p className="font-body text-[#888] text-base">