Website: underline the demo-note link, 480 px WebP variant for phones, ?v=19
Lighthouse desktop flagged the one in-text link that relied on colour alone; the hero and rail images gain a 480w candidate so a 2× phone no longer downloads the 600w file.
This commit is contained in:
1 parent
975c9f440b
commit
d8d7257d35
8 files changed
+22
-20
No files matched your search
+1
-1
@@ -6,7 +6,7 @@ served by nginx.
|
||||
Not in this folder (added at deploy time):
|
||||
|
||||
- `img/` — built by `build-images.sh <dist>/img`: the five screenshots from
|
||||
`../assets/screenshots/` as PNG plus WebP at 600/1170 px (served through `<picture>`),
|
||||
`../assets/screenshots/` as PNG plus WebP at 480/600/1170 px (served through `<picture>`),
|
||||
`banner.png`, and `social.jpg` (1200×630, the og:image on every page)
|
||||
- `icon-180.png` / `icon-512.png` — copied from `../frontend/public/` (the same
|
||||
icons the PWA uses, so the browser tab, home screen and app all match)
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
|
||||
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
|
||||
<link rel="apple-touch-icon" href="icon-180.png">
|
||||
<link rel="stylesheet" href="styles.css?v=18">
|
||||
<link rel="stylesheet" href="styles.css?v=19">
|
||||
<script>document.documentElement.className += ' js'</script>
|
||||
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
|
||||
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
|
||||
@@ -172,6 +172,6 @@
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script src="site.js?v=18" defer></script>
|
||||
<script src="site.js?v=19" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -27,7 +27,7 @@
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
|
||||
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
|
||||
<link rel="apple-touch-icon" href="icon-180.png">
|
||||
<link rel="stylesheet" href="styles.css?v=18">
|
||||
<link rel="stylesheet" href="styles.css?v=19">
|
||||
<script>document.documentElement.className += ' js'</script>
|
||||
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
|
||||
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
|
||||
@@ -2278,7 +2278,7 @@ main.api-main .lead { color: var(--fg-2); max-width: 58ch; margin: 14px 0 0; fon
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script src="site.js?v=18" defer></script>
|
||||
<script src="site.js?v=19" defer></script>
|
||||
<script>
|
||||
/* Jumping to an anchor inside a collapsed card opens the card — and re-aligns, since
|
||||
the browser scrolled to where the target was while it was still collapsed. */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds the website's img/ folder from ../assets: the five screenshots as PNG (fallback)
|
||||
# plus WebP at 600 and 1170 px wide (what <picture> actually serves), and the 1200×630
|
||||
# plus WebP at 480, 600 and 1170 px wide (what <picture> actually serves), and the 1200×630
|
||||
# social card. Needs ffmpeg with libwebp. Usage: website/build-images.sh <dist>/img
|
||||
set -euo pipefail
|
||||
out=${1:?target img dir}; mkdir -p "$out"
|
||||
@@ -8,7 +8,7 @@ here=$(cd "$(dirname "$0")" && pwd)
|
||||
for n in home workout stats plan library; do
|
||||
src="$here/../assets/screenshots/$n.png"
|
||||
cp "$src" "$out/$n.png"
|
||||
for w in 600 1170; do
|
||||
for w in 480 600 1170; do
|
||||
ffmpeg -v error -y -i "$src" -vf "scale=$w:-1:flags=lanczos" -c:v libwebp -quality 82 -compression_level 6 "$out/$n-$w.webp"
|
||||
done
|
||||
done
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
|
||||
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
|
||||
<link rel="apple-touch-icon" href="icon-180.png">
|
||||
<link rel="stylesheet" href="styles.css?v=18">
|
||||
<link rel="stylesheet" href="styles.css?v=19">
|
||||
<script>document.documentElement.className += ' js'</script>
|
||||
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
|
||||
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
|
||||
@@ -959,6 +959,6 @@ Leg Day,Leg Press,2026-08-21,200,1</code></pre>
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script src="site.js?v=18" defer></script>
|
||||
<script src="site.js?v=19" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
+9
-9
@@ -25,8 +25,8 @@
|
||||
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
|
||||
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
|
||||
<link rel="apple-touch-icon" href="icon-180.png">
|
||||
<link rel="preload" as="image" type="image/webp" imagesrcset="img/home-600.webp 600w, img/home-1170.webp 1170w" imagesizes="(max-width: 700px) 62vw, 300px" fetchpriority="high">
|
||||
<link rel="stylesheet" href="styles.css?v=18">
|
||||
<link rel="preload" as="image" type="image/webp" imagesrcset="img/home-480.webp 480w, img/home-600.webp 600w, img/home-1170.webp 1170w" imagesizes="(max-width: 700px) 62vw, 300px" fetchpriority="high">
|
||||
<link rel="stylesheet" href="styles.css?v=19">
|
||||
<!-- Marks that JS is alive before first paint, so the scroll-reveal styles never
|
||||
hide content from a browser that will not run them. -->
|
||||
<script>
|
||||
@@ -171,7 +171,7 @@ try {
|
||||
<div class="hero-stage">
|
||||
<div class="device">
|
||||
<picture>
|
||||
<source type="image/webp" srcset="img/home-600.webp 600w, img/home-1170.webp 1170w" sizes="(max-width: 700px) 62vw, 300px">
|
||||
<source type="image/webp" srcset="img/home-480.webp 480w, img/home-600.webp 600w, img/home-1170.webp 1170w" sizes="(max-width: 700px) 62vw, 300px">
|
||||
<img src="img/home.png" alt="openGym home screen: the week at a glance, today's session and a body-weight chart"
|
||||
width="1170" height="2532" fetchpriority="high" decoding="async">
|
||||
</picture>
|
||||
@@ -363,11 +363,11 @@ try {
|
||||
</div>
|
||||
<div class="bleed rv">
|
||||
<div class="rail">
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/home-600.webp 600w, img/home-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/home.png" alt="Home screen with the weekly overview and body-weight chart" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Home</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/workout-600.webp 600w, img/workout-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/workout.png" alt="Guided workout screen with sets, rest timer and pre-filled weights" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Workout</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/stats-600.webp 600w, img/stats-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/stats.png" alt="Stats screen with the activity heatmap and charts" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Stats</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/plan-600.webp 600w, img/plan-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/plan.png" alt="Weekly plan screen with a routine per weekday" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Plan</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/library-600.webp 600w, img/library-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/library.png" alt="Exercise library with search and filters" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Library</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/home-480.webp 480w, img/home-600.webp 600w, img/home-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/home.png" alt="Home screen with the weekly overview and body-weight chart" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Home</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/workout-480.webp 480w, img/workout-600.webp 600w, img/workout-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/workout.png" alt="Guided workout screen with sets, rest timer and pre-filled weights" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Workout</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/stats-480.webp 480w, img/stats-600.webp 600w, img/stats-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/stats.png" alt="Stats screen with the activity heatmap and charts" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Stats</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/plan-480.webp 480w, img/plan-600.webp 600w, img/plan-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/plan.png" alt="Weekly plan screen with a routine per weekday" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Plan</figcaption></figure>
|
||||
<figure><div class="device"><picture><source type="image/webp" srcset="img/library-480.webp 480w, img/library-600.webp 600w, img/library-1170.webp 1170w" sizes="(max-width: 700px) 60vw, 240px"><img src="img/library.png" alt="Exercise library with search and filters" loading="lazy" decoding="async" width="1170" height="2532"></picture></div><figcaption>Library</figcaption></figure>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrap"><p class="rail-hint">Swipe through them.</p></div>
|
||||
@@ -560,6 +560,6 @@ try {
|
||||
</div>
|
||||
</div></footer>
|
||||
|
||||
<script src="site.js?v=18" defer></script>
|
||||
<script src="site.js?v=19" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -800,6 +800,8 @@ table.cfg td:first-child { white-space: nowrap; width: 1%; padding-right: 26px;
|
||||
font-weight: 700; text-decoration: none;
|
||||
}
|
||||
.skip:focus { top: 16px; outline: 2px solid var(--fg); outline-offset: 2px; }
|
||||
/* In-text links must not rely on colour alone (WCAG 1.4.1). */
|
||||
.demo-note a { text-decoration: underline; text-underline-offset: 3px; }
|
||||
|
||||
/* ------------------------------------------------------------- scroll reveal
|
||||
Only armed when JS is running, so the page is fully visible without it. */
|
||||
|
||||
Reference in new issue
Block a user