feat: add shared placeholder art for projects without a cover
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
8 files changed
+14
-3
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"source": "placeholder-project.png",
|
||||||
|
"formats": [ "avif", "webp" ],
|
||||||
|
"widths": [ 384, 768 ]
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
@@ -687,6 +687,7 @@ function chrnx_get_topic_art_asset( string $topic_slug ): string {
|
|||||||
'about-grunge' => 'about-grunge.png',
|
'about-grunge' => 'about-grunge.png',
|
||||||
'placeholder-post' => 'placeholder-post.png',
|
'placeholder-post' => 'placeholder-post.png',
|
||||||
'placeholder-release' => 'placeholder-release.png',
|
'placeholder-release' => 'placeholder-release.png',
|
||||||
|
'placeholder-project' => 'placeholder-project.png',
|
||||||
'projects-grunge' => 'projects-grunge.png',
|
'projects-grunge' => 'projects-grunge.png',
|
||||||
'podcasts' => 'alter-ego-podcasts.png',
|
'podcasts' => 'alter-ego-podcasts.png',
|
||||||
'life' => 'alter-ego-life.png',
|
'life' => 'alter-ego-life.png',
|
||||||
@@ -719,5 +720,9 @@ function chrnx_get_topic_art_dimensions( string $topic_slug ): array {
|
|||||||
return array( 1536, 1536 );
|
return array( 1536, 1536 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( 'placeholder-project' === $topic_slug ) {
|
||||||
|
return array( 1534, 1025 );
|
||||||
|
}
|
||||||
|
|
||||||
return 'gaming' === $topic_slug ? array( 1024, 1536 ) : array( 1122, 1402 );
|
return 'gaming' === $topic_slug ? array( 1024, 1536 ) : array( 1122, 1402 );
|
||||||
}
|
}
|
||||||
@@ -178,7 +178,7 @@ done
|
|||||||
chrnx_build_responsive_image "alter-ego-gaming-half-body" "alter-ego-gaming-half-body.png"
|
chrnx_build_responsive_image "alter-ego-gaming-half-body" "alter-ego-gaming-half-body.png"
|
||||||
printf '{\n\t"source": "alter-ego-gaming-half-body.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' > "$chrnx_image_build_output/alter-ego-gaming-half-body.json"
|
printf '{\n\t"source": "alter-ego-gaming-half-body.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' > "$chrnx_image_build_output/alter-ego-gaming-half-body.json"
|
||||||
|
|
||||||
for chrnx_image_placeholder in placeholder-post placeholder-release; do
|
for chrnx_image_placeholder in placeholder-post placeholder-release placeholder-project; do
|
||||||
# Placeholders sit at half opacity behind text; they do not need full quality.
|
# Placeholders sit at half opacity behind text; they do not need full quality.
|
||||||
chrnx_build_responsive_image "$chrnx_image_placeholder" "$chrnx_image_placeholder.png" 48 40
|
chrnx_build_responsive_image "$chrnx_image_placeholder" "$chrnx_image_placeholder.png" 48 40
|
||||||
printf '{\n\t"source": "%s.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' "$chrnx_image_placeholder" > "$chrnx_image_build_output/$chrnx_image_placeholder.json"
|
printf '{\n\t"source": "%s.png",\n\t"formats": [ "avif", "webp" ],\n\t"widths": [ 384, 768 ]\n}\n' "$chrnx_image_placeholder" > "$chrnx_image_build_output/$chrnx_image_placeholder.json"
|
||||||
@@ -228,14 +228,15 @@ chrnx_validate_staged_family "alter-ego-gaming-half-body" 384 768
|
|||||||
chrnx_validate_staged_family "the-no-names-musician-cutout" 384 768
|
chrnx_validate_staged_family "the-no-names-musician-cutout" 384 768
|
||||||
chrnx_validate_staged_family "placeholder-post" 384 768
|
chrnx_validate_staged_family "placeholder-post" 384 768
|
||||||
chrnx_validate_staged_family "placeholder-release" 384 768
|
chrnx_validate_staged_family "placeholder-release" 384 768
|
||||||
|
chrnx_validate_staged_family "placeholder-project" 384 768
|
||||||
chrnx_validate_staged_family "the-no-names-collage" 384 768
|
chrnx_validate_staged_family "the-no-names-collage" 384 768
|
||||||
chrnx_validate_staged_family "podcast-frequency-grunge" 384 768 1536
|
chrnx_validate_staged_family "podcast-frequency-grunge" 384 768 1536
|
||||||
chrnx_validate_staged_family "about-grunge" 384 768 1536
|
chrnx_validate_staged_family "about-grunge" 384 768 1536
|
||||||
chrnx_validate_staged_family "projects-grunge" 384 768 1536
|
chrnx_validate_staged_family "projects-grunge" 384 768 1536
|
||||||
|
|
||||||
set -- "$chrnx_image_stage"/*
|
set -- "$chrnx_image_stage"/*
|
||||||
if [ "$#" -ne 76 ]; then
|
if [ "$#" -ne 81 ]; then
|
||||||
echo "Responsive image staging expected 76 files, got $#." >&2
|
echo "Responsive image staging expected 81 files, got $#." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
for chrnx_image_staged in "$@"; do
|
for chrnx_image_staged in "$@"; do
|
||||||
|
|||||||
Reference in new issue
Block a user