Skip to content
Snippets Groups Projects
Commit ccfbfeac authored by alexisben's avatar alexisben
Browse files

Block chapter: handle disabled option for lightbox

parent eda90701
No related branches found
No related tags found
No related merge requests found
...@@ -36,19 +36,23 @@ ...@@ -36,19 +36,23 @@
</div> </div>
{{ if .image }} {{ if .image }}
<figure class="{{- $image_class -}}"> <figure class="{{- $image_class -}}">
<a class="glightbox" {{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
role="button" <a class="glightbox"
data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}" role="button"
href="{{- partial "GetLightboxUrl" .image -}}" data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}"
title="{{- i18n "commons.lightbox.link.title" -}}" href="{{- partial "GetLightboxUrl" .image -}}"
aria-label="{{- i18n "commons.lightbox.link.title" -}}" title="{{- i18n "commons.lightbox.link.title" -}}"
> aria-label="{{- i18n "commons.lightbox.link.title" -}}"
>
{{ end }}
{{ partial "commons/image.html" {{ partial "commons/image.html"
(dict (dict
"image" .image "image" .image
"sizes" site.Params.image_sizes.blocks.chapter "sizes" site.Params.image_sizes.blocks.chapter
)}} )}}
</a> {{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
</a>
{{ end }}
{{ if partial "GetTextFromHTML" .credit }} {{ if partial "GetTextFromHTML" .credit }}
<figcaption>{{ partial "PrepareHTML" .credit }}</figcaption> <figcaption>{{ partial "PrepareHTML" .credit }}</figcaption>
{{ end }} {{ end }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment