Skip to content

Commit

Permalink
Review feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
NeOMakinG committed Dec 6, 2022
1 parent c410d85 commit 346b81d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions templates/catalog/_partials/miniatures/product.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{$product.cover.bySize.default_m.sources.avif} 200w,
{$product.cover.bySize.default_md.sources.avif} 320w,
{$product.cover.bySize.product_main.sources.avif} 720w"
sizes="(min-width: 1300px) 720px, (min-width: 768px) 50vw, 100vw"
sizes="(min-width: 1300px) 720px, (min-width: 768px) 50vw, 50vw"
type="image/avif"
>
{/if}
Expand All @@ -33,7 +33,7 @@
{$product.cover.bySize.default_m.sources.webp} 200w,
{$product.cover.bySize.default_md.sources.webp} 320w,
{$product.cover.bySize.product_main.sources.webp} 720w"
sizes="(min-width: 1300px) 320px, (min-width: 768px) 120px, 100vw"
sizes="(min-width: 1300px) 320px, (min-width: 768px) 120px, 50vw"
type="image/webp"
>
{/if}
Expand All @@ -45,7 +45,7 @@
{$product.cover.bySize.default_m.url} 200w,
{$product.cover.bySize.default_md.url} 320w,
{$product.cover.bySize.product_main.url} 720w"
sizes="(min-width: 1300px) 320px, (min-width: 768px) 120px, 100vw"
sizes="(min-width: 1300px) 320px, (min-width: 768px) 120px, 50vw"
src="{$product.cover.bySize.default_md.url}"
width="{$product.cover.bySize.default_md.width}"
height="{$product.cover.bySize.default_md.height}"
Expand All @@ -64,7 +64,7 @@
{$urls.no_picture_image.bySize.default_m.sources.avif} 200w,
{$urls.no_picture_image.bySize.default_md.sources.avif} 320w,
{$urls.no_picture_image.bySize.product_main.sources.avif} 720w"
sizes="(min-width: 1300px) 720px, (min-width: 768px) 50vw, 100vw"
sizes="(min-width: 1300px) 720px, (min-width: 768px) 50vw, 50vw"
type="image/avif"
>
{/if}
Expand All @@ -76,7 +76,7 @@
{$urls.no_picture_image.bySize.default_m.sources.webp} 200w,
{$urls.no_picture_image.bySize.default_md.sources.webp} 320w,
{$urls.no_picture_image.bySize.product_main.sources.webp} 720w"
sizes="(min-width: 1300px) 320px, (min-width: 768px) 120px, 100vw"
sizes="(min-width: 1300px) 320px, (min-width: 768px) 120px, 50vw"
type="image/webp"
>
{/if}
Expand All @@ -88,13 +88,13 @@
{$urls.no_picture_image.bySize.default_m.url} 200w,
{$urls.no_picture_image.bySize.default_md.url} 320w,
{$urls.no_picture_image.bySize.product_main.url} 720w"
sizes="(min-width: 1300px) 320px, (min-width: 768px) 120px, 100vw"
sizes="(min-width: 1300px) 320px, (min-width: 768px) 120px, 50vw"
width="{$urls.no_picture_image.bySize.default_md.width}"
height="{$urls.no_picture_image.bySize.default_md.height}"
src="{$urls.no_picture_image.bySize.default_md.url}"
loading="lazy"
alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}"
title="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}"
alt="{l s='No image available' d='Shop.Theme.Catalog'}"
title="{l s='No image available' d='Shop.Theme.Catalog'}"
data-full-size-image-url="{$product.cover.bySize.home_default.url}"
>
</picture>
Expand Down
12 changes: 6 additions & 6 deletions templates/catalog/_partials/product-cover-thumbnails.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{/if}

{block name='product_cover'}
{foreach from=$product.images item=image key=key}
{foreach from=$product.images item=image key=key name=productImages}
<div class="carousel-item{if $image.id_image == $product.default_image.id_image} active{/if}">
<picture>
{if isset($image.bySize.default_md.sources.avif)}
Expand Down Expand Up @@ -58,9 +58,9 @@
src="{$image.bySize.product_main.url}"
width="{$image.bySize.product_main.width}"
height="{$image.bySize.product_main.height}"
loading="eager"
alt="{if !empty($image)}{$image.legend}{else}{$product.name}{/if}"
title="{if !empty($image.legend)}{$image.legend}{else}{$product.name}{/if}"
loading="{if $smarty.foreach.productImages.first}eager{else}lazy{/if}"
alt="{$image.legend}"
title="{$image.legend}"
data-full-size-image-url="{$image.bySize.home_default.url}"
>
</picture>
Expand Down Expand Up @@ -156,8 +156,8 @@
height="{$urls.no_picture_image.bySize.default_xs.height}"
src="{$urls.no_picture_image.bySize.default_md.url}"
loading="lazy"
alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}"
title="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name}{/if}"
alt="{l s='No image available' d='Shop.Theme.Catalog'}"
title="{l s='No image available' d='Shop.Theme.Catalog'}"
data-full-size-image-url="{$product.cover.bySize.home_default.url}"
>
</picture>
Expand Down

0 comments on commit 346b81d

Please sign in to comment.