-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements : small theme improvements #526
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@tblivet Good job dude, I love the level of attention to details! 🔥 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good. Just small suggestions.
@@ -20,7 +20,7 @@ | |||
aria-hidden="{if $smarty.foreach.homeslider.first}false{else}true{/if}"> | |||
{if !empty($slide.url)}<a class="carousel-link" href="{$slide.url}">{/if} | |||
<figure class="carousel-content"> | |||
<img src="{$slide.image_url}" alt="{$slide.legend|escape}" loading="lazy" {$slide.size|replace: '"':''}> | |||
<img src="{$slide.image_url}" alt="{$slide.legend|escape}" {if $slide@iteration == 1}loading="eager"{else}loading="lazy"{/if} {$slide.size|replace: '"':''}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<img src="{$slide.image_url}" alt="{$slide.legend|escape}" {if $slide@iteration == 1}loading="eager"{else}loading="lazy"{/if} {$slide.size|replace: '"':''}> | |
<img src="{$slide.image_url}" alt="{$slide.legend|escape}" {if $slide@first}loading="eager"{else}loading="lazy"{/if} {$slide.size|replace: '"':''}> |
But since loading="eager"
is the default then it would be best to only add loading="lazy"
for every item except the first one.
&-container { | ||
align-items: center; | ||
margin: 1rem 0; | ||
margin-top: 1rem; | ||
margin-bottom: 1rem; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather add proper classes to the template (my-3 align-items-center
) instead of duplicating CSS that is already in Bootstrap. The theme should be as light as possible. Custom CSS should be added only to custom components that can't be styled directly with BS or in loops to limit the size of compiled php file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @tblivet
- The breadcrumb has been removed in smarty from the homepage ✔️
- The loading attribute of ps_imageslider images has been optimized ✔️
- Improve the responsiveness of the pagination on category pages ✔️
LGTM, QA ✔️
Thanks!
thank you @tblivet 🎉 |
eager
which is better in terms of performance because the first image is identified as the LCP.