Skip to content

Commit f4e27b6

Browse files
aclark4lifeCopilot
andcommitted
Address copilot review
- Remove back-to-top from tab order while hidden - Add visibility:hidden alongside opacity/pointer-events so keyboard and screen-reader users can't focus the button when it's not shown. - Replace inline style with a semantic .sponsor-cta class - Update footer copyright year range to 2026 - Pre-bake hero background blur/saturation, drop CSS filter - Replace the runtime CSS `filter: blur(1px) saturate(1.3)` on the full-viewport .hero::before layer with a pre-processed JPEG (blurred/saturated at build time via Pillow), avoiding the GPU compositing cost of filtering a large layer on every paint. Visual result is unchanged. - Fix grammar in sponsor pitch: hyphenate well-maintained, add comma - Name back-to-top bottom-fudge constant for clarity Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5172ece commit f4e27b6

5 files changed

Lines changed: 22 additions & 10 deletions

File tree

assets/css/pillow.css

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
- Coral/terracotta and magenta are pulled directly from the flowers in
66
the Pillow logo photo.
77
- Sky blue is pulled from the desert/sky photo in the same logo.
8-
- All three also appear in assets/images/psychedelic-glow.png, the
8+
- All three also appear in assets/images/psychedelic-glow.jpg, the
99
psychedelic rainbow texture from the original PIL-era site (art by
1010
Jeremy Kun), which we reuse as a subtle glow behind the hero logo for
11-
a bit of the site's history and visual uniqueness.
11+
a bit of the site's history and visual uniqueness. Pre-blurred and
12+
pre-saturated at build time (rather than via CSS `filter`) to avoid
13+
the runtime GPU cost of filtering a full-viewport layer.
1214
- Ink (near-black) and warm paper (off-white) anchor everything so the
1315
brighter accent colors stay legible and don't overwhelm the page.
1416
========================================================================== */
@@ -239,14 +241,15 @@ img {
239241
}
240242

241243
.hero::before {
242-
/* Psychedelic art by Jeremy Kun, from the original PIL-era site */
244+
/* Psychedelic art by Jeremy Kun, from the original PIL-era site.
245+
Blur/saturation are pre-baked into the image itself (see the
246+
palette rationale note above), so no CSS filter is needed here. */
243247
content: "";
244248
position: absolute;
245249
inset: 0;
246-
background-image: url(../images/psychedelic-glow.png);
250+
background-image: url(../images/psychedelic-glow.jpg);
247251
background-size: cover;
248252
background-position: center;
249-
filter: blur(1px) saturate(1.3);
250253
opacity: .45;
251254
mix-blend-mode: screen;
252255
z-index: -2;
@@ -469,6 +472,10 @@ section {
469472
margin-right: .5rem;
470473
}
471474

475+
.sponsor-cta {
476+
text-align: center;
477+
}
478+
472479
@media (max-width: 760px) {
473480
.sponsor-grid {
474481
grid-template-columns: 1fr;
@@ -737,13 +744,15 @@ section {
737744
font-size: 1.1rem;
738745
z-index: 10;
739746
opacity: 0;
747+
visibility: hidden;
740748
transform: translateY(.5rem);
741749
pointer-events: none;
742-
transition: opacity .2s ease-in-out, transform .2s ease-in-out, background-color .15s ease-in-out;
750+
transition: opacity .2s ease-in-out, transform .2s ease-in-out, background-color .15s ease-in-out, visibility .2s;
743751
}
744752

745753
.back-to-top.is-visible {
746754
opacity: 1;
755+
visibility: visible;
747756
transform: translateY(0);
748757
pointer-events: auto;
749758
}

assets/images/psychedelic-glow.jpg

114 KB
Loading

assets/images/psychedelic-glow.png

-73.9 KB
Binary file not shown.

assets/js/back-to-top.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
if (!button) return;
66

77
var SHOW_AFTER_PX = 600;
8+
// Small fudge factor so sub-pixel scroll rounding still counts as "at
9+
// the bottom" of the page.
10+
var BOTTOM_FUDGE_PX = 4;
811
var ticking = false;
912

1013
function update() {
1114
var scrollY = window.scrollY || window.pageYOffset;
1215
var pageHeight = document.documentElement.scrollHeight;
1316
var isScrollable = pageHeight > window.innerHeight;
14-
var atBottom = isScrollable && window.innerHeight + scrollY >= pageHeight - 4;
17+
var atBottom = isScrollable && window.innerHeight + scrollY >= pageHeight - BOTTOM_FUDGE_PX;
1518
button.classList.toggle("is-visible", scrollY > SHOW_AFTER_PX || atBottom);
1619
ticking = false;
1720
}

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ <h2><i class="fas fa-heart" aria-hidden="true"></i> Support Pillow's Future</h2>
119119
Pillow is free, open source software maintained by volunteers who review pull requests,
120120
fix bugs, write documentation, and ship regular releases &mdash; all in their spare time.
121121
Millions of projects depend on Pillow every day. If Pillow powers your product or
122-
business, consider sponsoring us to help keep it secure, fast and well maintained
122+
business, consider sponsoring us to help keep it secure, fast, and well-maintained
123123
for everyone.
124124
</p>
125125
</div>
@@ -128,7 +128,7 @@ <h2><i class="fas fa-heart" aria-hidden="true"></i> Support Pillow's Future</h2>
128128
<div class="sponsor-chip"><i class="fas fa-code-branch" aria-hidden="true"></i> Prioritize reviewing PRs and issues</div>
129129
<div class="sponsor-chip"><i class="fas fa-users" aria-hidden="true"></i> Sustain the maintainers who ship Pillow</div>
130130
</div>
131-
<div style="text-align: center;">
131+
<div class="sponsor-cta">
132132
<a class="btn btn-sponsor-light btn-lg" href="https://github.com/sponsors/python-pillow">
133133
<i class="fas fa-heart" aria-hidden="true"></i> Become a GitHub Sponsor</a>
134134
</div>
@@ -296,7 +296,7 @@ <h4><i class="fas fa-heart" aria-hidden="true"></i> Support Pillow</h4>
296296
</div>
297297
<div class="wrap footer-bottom">
298298
<p>
299-
&copy; 1995-2011 Fredrik Lundh and contributors. &copy; 2010-2024 Jeffrey 'Alex' Clark and
299+
&copy; 1995-2011 Fredrik Lundh and contributors. &copy; 2010-2026 Jeffrey 'Alex' Clark and
300300
<a href="https://github.com/python-pillow/Pillow/graphs/contributors">contributors</a>.
301301
Logo by Alastair Houghton. Psychedelic art by Jeremy Kun.
302302
</p>

0 commit comments

Comments
 (0)