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
30 changes: 22 additions & 8 deletions web/public/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1101,9 +1101,25 @@ body.gated .nav-items button:not(#nav-account) {
display: block;
color: var(--text);
}
/* CrawlProof ad unit, docked above the footer: zero height until ad.js fills
it, and never on the sign-in / account screens. Filled only from
mountAd() in app.js, the first time a home or settings sheet opens. */
/* CrawlProof ad unit, docked at the top of the sheet (under the nav): zero
height until ad.js fills it, and never on the sign-in / account screens.
Filled only from mountAd() in app.js, the first time a home or settings
sheet opens. */
.ad-dock {
display: none;
}
#sheet:not([hidden]):not([data-screen="account"]) ~ .ad-dock {
position: absolute;
left: 0;
right: 0;
top: 0;
z-index: 11;
display: block;
color: var(--text);
}
body.nav-on #sheet:not([hidden]) ~ .ad-dock {
top: var(--nav-h);
}
.cp-ad {
display: block;
max-width: 48rem;
Expand All @@ -1115,12 +1131,10 @@ body.gated .nav-items button:not(#nav-account) {
.cp-ad[data-cp-filled] {
height: auto;
overflow: visible;
padding: 0.6rem 1rem;
}
#sheet[data-screen="account"]:not([hidden]) ~ .ring-dock .cp-ad {
display: none;
}
#sheet:not([hidden]):not([data-screen="account"]):has(~ .ring-dock .cp-ad[data-cp-filled]) {
padding-bottom: 10rem;
#sheet:not([hidden]):not([data-screen="account"]):has(~ .ad-dock .cp-ad[data-cp-filled]) {
padding-top: 4rem;
}
.ring-dock .pfs-footer {
--pfs-footer-muted: var(--dim);
Expand Down
6 changes: 5 additions & 1 deletion web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@
<!-- Setup and settings share one sheet. -->
<section id="sheet" class="sheet" hidden></section>

<!-- CrawlProof ad unit, docked at the top of a home/settings sheet (never in
the footer, never over the picture or on sign-in). -->
<div class="ad-dock"><aside id="cp-ad" class="cp-ad" data-cp-ad></aside></div>

<!-- @profullstack/footer (copyright + Profullstack webring), shown under the
setup/settings sheet, never over the picture. The server renders it between
the markers from the current @latest template on every page load. -->
<div class="ring-dock"><aside id="cp-ad" class="cp-ad" data-cp-ad></aside><!--pfs-footer--><!--/pfs-footer--></div>
<div class="ring-dock"><!--pfs-footer--><!--/pfs-footer--></div>
</div>
<script type="module" src="/app.js"></script>
<script src="https://crawlproof.com/ad.js" async></script>
Expand Down
2 changes: 1 addition & 1 deletion web/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2204,7 +2204,7 @@ function navCurrent() {
return 'live';
}

// CrawlProof ad unit in the footer dock (index.html). The element ships without
// CrawlProof ad unit in the top-of-sheet ad dock (index.html). The element ships without
// a slot so ad.js's own DOMContentLoaded pass skips it; the first home or
// settings sheet sets the slot and asks ad.js to fill it, once. Bounded retry
// while ad.js is still loading, so a blocker never leaves a timer running.
Expand Down
Loading