-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added gallery thumbnail count #624
Conversation
…z/core into feature/gallery-thumbnail-counter
Can't we extract some of this somewhere else? Maybe a bit to much logic within the template. |
@@ -0,0 +1,39 @@ | |||
<div v-if="images.length > 1" class="flex mt-3 gap-2"> | |||
<button | |||
v-for="(image, imageId) in images.slice(0, {{ max(config('rapidez.frontend.product_gallery_thumbnails.xs'), config('rapidez.frontend.product_gallery_thumbnails.sm'), config('rapidez.frontend.product_gallery_thumbnails.md'), config('rapidez.frontend.product_gallery_thumbnails.lg'), config('rapidez.frontend.product_gallery_thumbnails.xl')) + 1 }})" |
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.
max(config('rapidez.frontend.product_gallery_thumbnails'))
should be enough, but... I don't like the config for such a small part separated from the template. Maybe just define them on top of here?
@php($breakpoints = ['xl' => 7, 'lg' => 5, 'md' => 4, 'sm' => 3, 'xs' => 4])
And use that here; max($breakpoints)
and through the template
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.
But if we only want to change the breakpoints and everything else stays the same, then do we have to override this file in our project just to change breakpoints instead of changing it in the config file?
03bd056
3,
Outdated
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.
Wow, what happend?
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.
Removed those weird files!
…z/core into feature/gallery-thumbnail-counter
This will add a customizable thumbnail quantity.