Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Metadata } from "next";
import { cachedDb } from "@/lib/cached-db";
import Ad from "@/components/Ad";
import { AD_MREC } from "@/lib/ads";
import { AD_TEXT } from "@/lib/ads";
import Link from "next/link";

const { all, count } = cachedDb(86400);
Expand Down Expand Up @@ -148,7 +148,7 @@ export default async function About() {

{/* One rectangle, at a section break well into the piece — someone
still reading here has settled in. */}
<Ad format={AD_MREC} />
<Ad format={AD_TEXT} />

<h2 id="why-not-popularity">Why not just rank by popularity?</h2>
<p>
Expand Down
1 change: 0 additions & 1 deletion src/app/category/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ export default async function Category({
</div>
{split > 0 && (
<>
<Ad format={AD_TEXT} />
<div className="grid">
{rows.slice(split).map((p) => (
<Card key={p.id} p={p} />
Expand Down
6 changes: 3 additions & 3 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,13 @@ body:has(.player) { padding-bottom: 122px; }
prepends. No label of our own: the banners get that caption and the text
link carries its own "Sponsored" inside the frame. */
.ad { display: block; width: 100%; margin: 0 auto; }
.ad[data-cp-filled] { margin: 34px auto; }
.ad[data-cp-filled] { margin: 10px auto; }

/* ad.js gives the frame display:block inline but no margin, so this is what
centres a 300px creative in a wider column. */
.ad > iframe { margin-left: auto; margin-right: auto; }

.ad-text_link[data-cp-filled] { min-height: 40px; margin: 26px auto; }
.ad-text_link[data-cp-filled] { min-height: 40px; margin: 10px auto; }

.ad-banner_300x250[data-cp-filled] { min-height: 266px; max-width: 300px; }

Expand All @@ -471,7 +471,7 @@ body:has(.player) { padding-bottom: 122px; }

/* A unit sitting in a stack of .row links belongs to the stack, not to the
page around it. */
.rows > .ad[data-cp-filled] { margin: 14px auto; }
.rows > .ad[data-cp-filled] { margin: 10px auto; }

/* Off-screen until it takes focus, then the first thing on the page. Kept out
of the flow with a negative offset rather than display:none, which would
Expand Down
2 changes: 1 addition & 1 deletion src/app/hosts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function Hosts() {

// A stack of 300 compact rows. text_link is the only format that belongs in
// it — a rectangle here would break the column in half.
const ads = adPlan(rows.length, { first: 13, every: 40, max: 3, formats: [AD_TEXT] });
const ads = adPlan(rows.length, { first: 13, every: 40, max: 1, formats: [AD_TEXT] });

return (
<div className="wrap">
Expand Down
1 change: 0 additions & 1 deletion src/app/language/[lang]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export default async function Language({
</div>
{split > 0 && (
<>
<Ad format={AD_TEXT} />
<div className="grid">
{rows.slice(split).map((p) => (
<Card key={p.id} p={p} />
Expand Down
8 changes: 1 addition & 7 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import TimeAgo from "@/components/TimeAgo";
import type { Podcast } from "@/lib/db";
import Card from "@/components/Card";
import Art from "@/components/Art";
import Ad from "@/components/Ad";
import { AD_TEXT } from "@/lib/ads";
import Link from "next/link";

const { all, count, languageBuckets } = cachedDb(300);
Expand Down Expand Up @@ -75,11 +73,7 @@ export default async function Home() {
</div>
</div>

{/* A text link, not a banner: it is the only format that can sit between
the hero and the first row of shows without pushing them down. */}
<div className="wrap">
<Ad format={AD_TEXT} />
</div>
{/* The homepage carries no ad unit. */}

<section className="wrap">
<h2 className="sec">Deep catalogues, still publishing</h2>
Expand Down
4 changes: 2 additions & 2 deletions src/app/podcast/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Podcast } from "@/lib/db";
import Card from "@/components/Card";
import Art from "@/components/Art";
import Ad from "@/components/Ad";
import { AD_MREC } from "@/lib/ads";
import { AD_TEXT } from "@/lib/ads";
import FollowButton from "@/components/FollowButton";
import { LatestButton, ShowEpisodes } from "@/components/ShowEpisodes";
import PlaylistButtons from "@/components/PlaylistButtons";
Expand Down Expand Up @@ -235,7 +235,7 @@ export default async function Show({ params }: { params: Promise<{ slug: string
to look at something, which is the only condition under which a
rectangle is worth its space. Nothing above it — the play button, the
follow button and the feed URL are what this page is for. */}
<Ad format={AD_MREC} />
<Ad format={AD_TEXT} />

{sameHost.length > 0 && (
<section>
Expand Down
1 change: 0 additions & 1 deletion src/app/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export default async function Search({
</div>
{split > 0 && (
<>
<Ad format={AD_TEXT} />
<div className="grid">
{results.slice(split).map((p) => (
<Card key={p.id} p={p} />
Expand Down
Loading