getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[lightbox-gallery] Lightbox Shortcode is not working #381

Closed sajidbuet closed 1 year ago

sajidbuet commented 1 year ago

I am trying to include a lightbox gallery in my website.

https://eee.buet.ac.bd/about/history

### Some Historical Photos of the Department

![Sample Image](Pic-1986-EEE-Faculty-Members.jpeg?lightbox=1024,768&resize=200,200)

[lightbox image="Pic-1986-EEE-Faculty-Members.jpeg" gallery="gallery1" class="inline-block" desc=".dbs-1"]
    ![Red DBS - 1](Pic-1986-EEE-Faculty-Members.jpeg?cropZoom=200,200)
[/lightbox]

[lightbox image="buet61-faculty-cricket-team.jpg" gallery="gallery1" class="inline-block" desc=".dbs-2"]
    ![Red DBS - 2](buet61-faculty-cricket-team.jpg?cropZoom=200,200)
[/lightbox]

[div class="glightbox-desc dbs-1"]
    [div class="prose"]
        ### Aston Martin DBS 1
        [div class="text-lg"]
            Morbi ac interdum velit. Ut sed purus in **erat feugiat mollis**. In porta ligula quis vulputate ullamcorper. 
        [/div]
    [/div]
[/div]

[div class="glightbox-desc dbs-2"]
    [div class="prose"]
        ### Aston Martin DBS 2

        [div class="text-lg"]
            Morbi ac interdum velit. Ut sed purus in **erat feugiat mollis**. In porta ligula quis vulputate ullamcorper. 
        [/div]
    [/div]
[/div]

 ![BUET-86_87-Faculty-Members](Pic-1986-EEE-Faculty-Members.jpeg "Faculty Members of the Department of EEE, BUET in 1986")
<small>

Faculty Members of the Department of EEE, BUET in 1986. <i>Collected from Faculty of EEE Library</i> </small>

![BUET-86_87-Faculty-Members](buet61-faculty-cricket-team.jpg "Faculty Member Cricket Team of BUET in 1961")

Unfortunately, the lightbox shortcode part is not working in the website. The individual lightbox fires up, but the [lightbox image] shortcode is not rendered. Am I missing something here. Can you please assist in implementing the lightbox gallery.

rhukster commented 1 year ago

The problem is your intendation of teh [div] blocks. Unfortunately due to markup treating indents as code blocks, it's breaking the layout. All the shortcodes shoud be flush to the left (no indents).

Cheers!

sajidbuet commented 1 year ago

Thank you, it sort of fixes my problem. I am still trying to figure out proper layout of the gallery.

The code was directly copied from the documentation of the plugin, so may be you could update it so that users do not get confused? https://getgrav.org/premium/lightbox-gallery/docs

rhukster commented 1 year ago

thanks will check the docs and update as required.