Remove support for narrow vote tally images and switch to PNG format

This commit is contained in:
MartinBraquet
2026-07-23 18:42:36 +02:00
parent b3351707e2
commit a468326e92
3 changed files with 5 additions and 8 deletions

View File

@@ -101,10 +101,7 @@ upload "$WEB_IMAGES/search-alert-poster-dark.jpg" "images/search-alert-poster-da
# Two widths per theme: the desktop shot is illegible scaled into a phone column, so the page picks
# with a <picture> media query.
for theme in light dark; do
for suffix in "" "-narrow"; do
upload "$WEB_IMAGES/vote-tally-${theme}${suffix}.webp" \
"images/vote-tally-${theme}${suffix}.webp" "image/webp"
done
upload "$WEB_IMAGES/vote-tally-${theme}.png" "images/vote-tally-${theme}.png" "image/png"
done
echo

View File

@@ -63,7 +63,7 @@ function Shot({theme, alt, className}: {theme: 'light' | 'dark'; alt: string; cl
matching source wins, so the two portrait cases are listed before the wide fallback. */}
<source
media={'(min-width: 0px)'}
srcSet={`/images/vote-tally-${theme}-narrow.webp`}
srcSet={`/images/vote-tally-${theme}.png`}
width={SHOTS.narrow.width}
height={SHOTS.narrow.height}
/>
@@ -74,7 +74,7 @@ function Shot({theme, alt, className}: {theme: 'light' | 'dark'; alt: string; cl
{/* height={SHOTS.narrow.height}*/}
{/*/>*/}
<img
src={`/images/vote-tally-${theme}-narrow.webp`}
src={`/images/vote-tally-${theme}.png`}
alt={alt}
width={SHOTS.wide.width}
height={SHOTS.wide.height}

View File

@@ -47,8 +47,8 @@ const ASSETS = [
{key: 'images/search-alert-poster-dark.jpg', dest: 'images/search-alert-poster-dark.jpg'},
{key: 'images/vote-tally-light.webp', dest: 'images/vote-tally-light.webp'},
{key: 'images/vote-tally-dark.webp', dest: 'images/vote-tally-dark.webp'},
{key: 'images/vote-tally-light-narrow.webp', dest: 'images/vote-tally-light-narrow.webp'},
{key: 'images/vote-tally-dark-narrow.webp', dest: 'images/vote-tally-dark-narrow.webp'},
// {key: 'images/vote-tally-light-narrow.webp', dest: 'images/vote-tally-light-narrow.webp'},
// {key: 'images/vote-tally-dark-narrow.webp', dest: 'images/vote-tally-dark-narrow.webp'},
]
/**