Skip to content

Instantly share code, notes, and snippets.

@liranop
Last active January 28, 2024 00:16
Show Gist options
  • Save liranop/c7148746a53a2815c4dca63993e91fc2 to your computer and use it in GitHub Desktop.
Save liranop/c7148746a53a2815c4dca63993e91fc2 to your computer and use it in GitHub Desktop.
@liranop
Copy link
Author

liranop commented Jan 28, 2024

This code create this kind of gallery with "dynamic field" widget of crocoblock (JetEngine)

Screen Shot 2024-01-28 at 1 28 56

In my example there are 3 columns and 1:1 aspect-ratio. I'll explain how to modify those settings in the next comment

First make sure you activated the "Grid Gallery for Dynamic Field widget" on JetEngine dashbord.

Then follow those steps in your page/template:

  1. add "dynamic field" widget. set it like this:
Screen Shot 2024-01-28 at 0 30 38

1.1) give it css class: custom-gallery (in advanced tab)
1.2) in style tab > Misc:
1.2.1) set image overlay color to: rgba(0, 0, 0, 0.15)
1.2.2) set image hover overlay color to: rgba(0, 0, 0, 0.5)

  1. add "icon" widget after your gallery.
    2.1) give it css class: icon (in advanced tab)
    2.2) select your icon
    3.3) hide the icon from all screen sizes (in advanced tab > responsive)

  2. add html widget after your icon
    3.1) paste the script in content tab
    3.2) paste the css in advanced tab > custom css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment