feat: add responsive CHRNX podcast atmosphere

This commit is contained in:
chrnx committed 2026-08-13 01:01:08 -05:00
1 parent 3840b7c168
commit 6443a46126
13 files changed
+190 -18

No files matched your search

+20
View File
@@ -73,6 +73,23 @@ chrnx_build_responsive_image() {
done
}
chrnx_build_responsive_background() {
chrnx_image_basename=$1
chrnx_image_source_name=$2
chrnx_image_source="$chrnx_image_root/assets/images/$chrnx_image_source_name"
if [ ! -f "$chrnx_image_source" ]; then
echo "Source image is missing: $chrnx_image_source" >&2
exit 1
fi
for chrnx_image_width in 384 768 1536; do
chrnx_image_resized="$chrnx_image_tmp/$chrnx_image_basename-$chrnx_image_width.png"
sips --resampleWidth "$chrnx_image_width" "$chrnx_image_source" --out "$chrnx_image_resized" >/dev/null
cwebp -quiet -preset picture -q 62 -m 6 -metadata none "$chrnx_image_resized" -o "$chrnx_image_output/$chrnx_image_basename-$chrnx_image_width.webp"
avifenc --ignore-exif --ignore-xmp --ignore-icc --qcolor 52 --speed 6 "$chrnx_image_resized" "$chrnx_image_output/$chrnx_image_basename-$chrnx_image_width.avif" >/dev/null
done
}
for chrnx_image_topic in code gaming life literature podcasts research; do
chrnx_build_responsive_image "alter-ego-$chrnx_image_topic" "alter-ego-$chrnx_image_topic.png"
printf '{\n\t"source": "alter-ego-%s.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' "$chrnx_image_topic" > "$chrnx_image_output/alter-ego-$chrnx_image_topic.json"
@@ -86,3 +103,6 @@ printf '{\n\t"source": "the-no-names-musician-cutout.png",\n\t"formats": [ "avif
chrnx_build_responsive_image "the-no-names-collage" "the-no-names-collage.jpeg" 58
printf '{\n\t"source": "the-no-names-collage.jpeg",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' > "$chrnx_image_output/the-no-names-collage.json"
chrnx_build_responsive_background "podcast-frequency-grunge" "podcast-frequency-grunge.png"
printf '{\n\t"source": "podcast-frequency-grunge.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768, 1536 ]\n}\n' > "$chrnx_image_output/podcast-frequency-grunge.json"