Skip to content

Commit b09aae5

Browse files
ralyodioclaude
andauthored
No ads on the homepage; low-profile text-link ads elsewhere (#317)
- Homepage: removed the ad.network 300x250 iframe unit (the ad.network meta verification tag in app/page.jsx stays). - Blog: the one logged-out unit (and its no-JS <noscript> twin, which never renders alongside it) is now a 40px full-width text_link frame with an 8px margin instead of a centred 300x250. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7344180 commit b09aae5

3 files changed

Lines changed: 13 additions & 40 deletions

File tree

‎src/app/blog/BlogAd.jsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import { useEffect, useState } from 'react';
44
import { useAuthStore } from '@/lib/stores/auth.js';
55

6-
// CrawlProof banner for logged-out visitors on /blog/*.
6+
// CrawlProof text_link line (one thin 40px row with its own "Sponsored" mark)
7+
// for logged-out visitors on /blog/*.
78
//
89
// qrypt.chat deliberately loads NO third-party JavaScript for ads: instead of
910
// the data-cp-ad + ad.js snippet, the ad is a plain cross-origin <iframe>
@@ -17,7 +18,7 @@ import { useAuthStore } from '@/lib/stores/auth.js';
1718
// a signed-in user. Visitors with JS disabled get the <noscript> iframe in the
1819
// blog layout instead.
1920
const AD_SLOT = '4a5b5f93-ebd9-4d02-b927-05544fdeb81e';
20-
const AD_FORMAT = 'banner_300x250';
21+
const AD_FORMAT = 'text_link';
2122
const AD_SRC = `https://crawlproof.com/api/ads/frame?slot=${AD_SLOT}&format=${AD_FORMAT}`;
2223

2324
export default function BlogAd() {
@@ -32,16 +33,15 @@ export default function BlogAd() {
3233
if (!mounted || loading || user) return null;
3334

3435
return (
35-
<div className="container" style={{ maxWidth: '48rem', margin: '0 auto', padding: '1.5rem 0', display: 'flex', justifyContent: 'center' }}>
36+
<div className="container" style={{ maxWidth: '48rem', margin: '8px auto' }}>
3637
<iframe
3738
src={AD_SRC}
38-
title="Advertisement"
39-
width={300}
40-
height={250}
39+
title="Sponsored"
40+
height={40}
4141
scrolling="no"
4242
loading="lazy"
4343
referrerPolicy="no-referrer-when-downgrade"
44-
style={{ border: 0, width: 300, height: 250, maxWidth: '100%' }}
44+
style={{ border: 0, width: '100%', height: 40, display: 'block' }}
4545
/>
4646
</div>
4747
);

‎src/app/blog/layout.jsx‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import BlogAd from './BlogAd.jsx';
22

33
const AD_SLOT = '4a5b5f93-ebd9-4d02-b927-05544fdeb81e';
4-
const AD_FORMAT = 'banner_300x250';
5-
const AD_WRAP = { maxWidth: '48rem', margin: '0 auto', padding: '1.5rem 0', display: 'flex', justifyContent: 'center' };
4+
const AD_FORMAT = 'text_link';
5+
const AD_WRAP = { maxWidth: '48rem', margin: '8px auto' };
66

77
export default function BlogLayout({ children }) {
88
return (
99
<>
1010
{/* Top of the blog content, never at the bottom against the footer. */}
11-
{/* Primary: standard CrawlProof snippet via ad.js, logged-out visitors only. */}
11+
{/* Primary: a text_link frame, logged-out visitors only. */}
1212
<BlogAd />
1313
{/* No-JS fallback — renders only when JavaScript is disabled (e.g. Tor
1414
Safest mode / .onion). A plain cross-origin iframe that renders and is
@@ -18,11 +18,10 @@ export default function BlogLayout({ children }) {
1818
<div className="container" style={AD_WRAP}>
1919
<iframe
2020
src={`https://crawlproof.com/api/ads/frame?slot=${AD_SLOT}&format=${AD_FORMAT}`}
21-
title="Advertisement"
22-
width={300}
23-
height={250}
21+
title="Sponsored"
22+
height={40}
2423
scrolling="no"
25-
style={{ border: 0, width: 300, height: 250, maxWidth: '100%' }}
24+
style={{ border: 0, width: '100%', height: 40, display: 'block' }}
2625
/>
2726
</div>
2827
</noscript>

‎src/app/home-content.jsx‎

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ import { useI18n } from '@/lib/hooks/useI18n.js';
66

77
const INSTALL_CMD = 'curl -fsSL https://qrypt.chat/install.sh | sh';
88

9-
// qrypt.chat's ad.network listing (a CrawlProof slot). Like the blog's BlogAd,
10-
// a plain cross-origin <iframe> to CrawlProof's server-rendered ad: no
11-
// third-party JavaScript runs in this page.
12-
const AD_NETWORK_CODE = 'LifRx90nnLMtBYAw';
13-
const AD_SLOT = 'db16349c-888d-4f7a-b04e-1a4bf1afcb57';
14-
const AD_FORMAT = 'banner_300x250';
15-
169
export default function HomeContent() {
1710
const { t } = useI18n();
1811
const [copied, setCopied] = useState(false);
@@ -58,25 +51,6 @@ export default function HomeContent() {
5851
</div>
5952
</div>
6053

61-
<aside
62-
data-ad-network={AD_NETWORK_CODE}
63-
data-cp-ad=""
64-
data-slot={AD_SLOT}
65-
data-format={AD_FORMAT}
66-
className="container"
67-
style={{ display: 'flex', justifyContent: 'center', padding: '1.5rem 0' }}
68-
>
69-
<iframe
70-
src={`https://crawlproof.com/api/ads/frame?slot=${AD_SLOT}&format=${AD_FORMAT}`}
71-
title="Advertisement"
72-
width={300}
73-
height={250}
74-
scrolling="no"
75-
loading="lazy"
76-
style={{ border: 0, width: 300, height: 250, maxWidth: '100%' }}
77-
/>
78-
</aside>
79-
8054
<section className="features">
8155
<div className="container">
8256
<div className="section-header">

0 commit comments

Comments
 (0)