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
14 changes: 7 additions & 7 deletions src/app/blog/BlogAd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import { useEffect, useState } from 'react';
import { useAuthStore } from '@/lib/stores/auth.js';

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

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

return (
<div className="container" style={{ maxWidth: '48rem', margin: '0 auto', padding: '1.5rem 0', display: 'flex', justifyContent: 'center' }}>
<div className="container" style={{ maxWidth: '48rem', margin: '8px auto' }}>
<iframe
src={AD_SRC}
title="Advertisement"
width={300}
height={250}
title="Sponsored"
height={40}
scrolling="no"
loading="lazy"
referrerPolicy="no-referrer-when-downgrade"
style={{ border: 0, width: 300, height: 250, maxWidth: '100%' }}
style={{ border: 0, width: '100%', height: 40, display: 'block' }}
/>
</div>
);
Expand Down
13 changes: 6 additions & 7 deletions src/app/blog/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import BlogAd from './BlogAd.jsx';

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

export default function BlogLayout({ children }) {
return (
<>
{/* Top of the blog content, never at the bottom against the footer. */}
{/* Primary: standard CrawlProof snippet via ad.js, logged-out visitors only. */}
{/* Primary: a text_link frame, logged-out visitors only. */}
<BlogAd />
{/* No-JS fallback — renders only when JavaScript is disabled (e.g. Tor
Safest mode / .onion). A plain cross-origin iframe that renders and is
Expand All @@ -18,11 +18,10 @@ export default function BlogLayout({ children }) {
<div className="container" style={AD_WRAP}>
<iframe
src={`https://crawlproof.com/api/ads/frame?slot=${AD_SLOT}&format=${AD_FORMAT}`}
title="Advertisement"
width={300}
height={250}
title="Sponsored"
height={40}
scrolling="no"
style={{ border: 0, width: 300, height: 250, maxWidth: '100%' }}
style={{ border: 0, width: '100%', height: 40, display: 'block' }}
/>
</div>
</noscript>
Expand Down
26 changes: 0 additions & 26 deletions src/app/home-content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ import { useI18n } from '@/lib/hooks/useI18n.js';

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

// qrypt.chat's ad.network listing (a CrawlProof slot). Like the blog's BlogAd,
// a plain cross-origin <iframe> to CrawlProof's server-rendered ad: no
// third-party JavaScript runs in this page.
const AD_NETWORK_CODE = 'LifRx90nnLMtBYAw';
const AD_SLOT = 'db16349c-888d-4f7a-b04e-1a4bf1afcb57';
const AD_FORMAT = 'banner_300x250';

export default function HomeContent() {
const { t } = useI18n();
const [copied, setCopied] = useState(false);
Expand Down Expand Up @@ -58,25 +51,6 @@ export default function HomeContent() {
</div>
</div>

<aside
data-ad-network={AD_NETWORK_CODE}
data-cp-ad=""
data-slot={AD_SLOT}
data-format={AD_FORMAT}
className="container"
style={{ display: 'flex', justifyContent: 'center', padding: '1.5rem 0' }}
>
<iframe
src={`https://crawlproof.com/api/ads/frame?slot=${AD_SLOT}&format=${AD_FORMAT}`}
title="Advertisement"
width={300}
height={250}
scrolling="no"
loading="lazy"
style={{ border: 0, width: 300, height: 250, maxWidth: '100%' }}
/>
</aside>

<section className="features">
<div className="container">
<div className="section-header">
Expand Down
Loading