Skip to content

Commit

Permalink
fix: image source in content card (#3198)
Browse files Browse the repository at this point in the history
  • Loading branch information
gillesbourgeat authored and anoziere committed Apr 28, 2024
1 parent fb9e15c commit 2abdfab
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,45 @@

<a href="{$URL}" class="ContentCard" {if isset($tabindex)}tabindex="{$tabindex}"{/if}>
<figure class="ContentCard-img">
{loop name="category_thumbnail" type="image" source_id=$ID source=$object_type|default:"content" width=$width height=$height resize_mode="crop" limit="1" format="webp"}
{$source = $object_type|default:"content"}

{loop name="category_thumbnail" type="image" source_id=$ID source=$source width=$width height=$height resize_mode="crop" limit="1" format="webp"}
{$images = [
[
"breakpoint" => "(min-width: 1440px)",
"url" => "/legacy-image-library/category_image_{$ID}/square/^!324,324/0/default.webp",
"url" => "/legacy-image-library/{$source}_image_{$ID}/square/^!324,324/0/default.webp",
"link" => $URL,
"description" => $DESCRIPTION,
"width" => '324',
"height" => '324'
],
[
"breakpoint" => "(min-width: 1280px)",
"url" => "/legacy-image-library/category_image_{$ID}/square/!242,242/0/default.webp",
"url" => "/legacy-image-library/{$source}_image_{$ID}/square/!242,242/0/default.webp",
"link" => $URL,
"description" => $DESCRIPTION,
"width" => '242',
"height" => '242'
],
[
"breakpoint" => "(min-width: 1024px)",
"url" => "/legacy-image-library/category_image_{$ID}/square/!210,210/0/default.webp",
"url" => "/legacy-image-library/{$source}_image_{$ID}/square/!210,210/0/default.webp",
"link" => $URL,
"description" => $DESCRIPTION,
"width" => '210',
"height" => '210'
],
[
"breakpoint" => "(min-width: 768px)",
"url" => "/legacy-image-library/category_image_{$ID}/square/!146,146/0/default.webp",
"url" => "/legacy-image-library/{$source}_image_{$ID}/square/!146,146/0/default.webp",
"link" => $URL,
"description" => $DESCRIPTION,
"width" => '146',
"height" => '146'
],
[
"breakpoint" => "(min-width: 1px)",
"url" => "/legacy-image-library/category_image_{$ID}/square/!166,166/0/default.webp",
"url" => "/legacy-image-library/{$source}_image_{$ID}/square/!166,166/0/default.webp",
"link" => $URL,
"description" => $DESCRIPTION,
"width" => '166',
Expand Down

0 comments on commit 2abdfab

Please sign in to comment.