Skip to content
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

Merged
merged 13 commits into from
Nov 6, 2024
Merged

Conversation

jordythevulder
Copy link
Contributor

This will add a customizable thumbnail quantity.

image

@royduin
Copy link
Member

royduin commented Nov 1, 2024

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 }})"
Copy link
Member

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

Copy link
Member

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?

3, Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, what happend?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed those weird files!

@royduin royduin merged commit bd4f9f0 into master Nov 6, 2024
7 of 11 checks passed
@royduin royduin deleted the feature/gallery-thumbnail-counter branch November 6, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants