Skip to content
Snippets Groups Projects
Commit 4e550ff8 authored by Olivia206's avatar Olivia206
Browse files

Merge branch 'main' of github.com:noesya/osuny-hugo-theme-aaa

parents 8cc169e2 f430edf6
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ params:
image_sizes:
design_system:
lightbox:
disabled: false
# TODO mobile et tablet
mobile: 1920x2560
tablet: 1920x2560
......
......@@ -14,18 +14,21 @@
{{- $image := partial "GetMedia" .file -}}
{{- if $image -}}
<figure{{ if $is_carousel }} class="splide__slide"{{ end }}>
<a class="glightbox"
data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}"
href="{{ partial "GetLightboxUrl" (dict "id" .id) }}"
title="{{- i18n "commons.lightbox.link.title" -}}"
>
{{ partial "commons/image.html"
(dict
"image" .id
"alt" .alt
"sizes" site.Params.image_sizes.blocks.gallery.carousel
)}}
</a>
{{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
<a class="glightbox"
data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}"
href="{{ partial "GetLightboxUrl" (dict "id" .id) }}"
title="{{- i18n "commons.lightbox.link.title" -}}">
{{ end }}
{{ partial "commons/image.html"
(dict
"image" .id
"alt" .alt
"sizes" site.Params.image_sizes.blocks.gallery.carousel
)}}
{{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
</a>
{{ end }}
{{ if or .text .credit }}
<figcaption>
{{ if .text }}
......
......@@ -4,18 +4,21 @@
{{- $image := partial "GetMedia" .id -}}
{{- if $image -}}
<figure>
<a class="glightbox"
data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}"
href="{{ partial "GetLightboxUrl" (dict "id" .id) }}"
title="{{- i18n "commons.lightbox.link.title" -}}"
>
{{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
<a class="glightbox"
data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}"
href="{{ partial "GetLightboxUrl" (dict "id" .id) }}"
title="{{- i18n "commons.lightbox.link.title" -}}">
{{ end }}
{{ partial "commons/image.html"
(dict
"image" .file
"alt" .alt
"sizes" site.Params.image_sizes.blocks.gallery.grid
)}}
</a>
{{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
</a>
{{ end }}
{{ if .text }}
<figcaption>
{{- partial "PrepareHTML" .text -}}
......
......@@ -21,18 +21,21 @@
{{- with .image -}}
<figure class="{{ $image_class }}">
<a class="glightbox"
data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}"
href="{{- partial "GetLightboxUrl" . -}}"
title="{{- i18n "commons.lightbox.link.title" -}}"
>
{{ partial "commons/image.html"
(dict
"image" .
"alt" .alt
"sizes" site.Params.image_sizes.blocks.image
)}}
</a>
{{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
<a class="glightbox"
data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}"
href="{{- partial "GetLightboxUrl" . -}}"
title="{{- i18n "commons.lightbox.link.title" -}}">
{{ end }}
{{ partial "commons/image.html"
(dict
"image" .
"alt" .alt
"sizes" site.Params.image_sizes.blocks.image
)}}
{{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
</a>
{{ end }}
<figcaption>
{{- if $text }}
{{ partial "PrepareHTML" $text }}
......
......@@ -22,18 +22,21 @@
{{- end -}}
{{- if .image }}
<figure>
<a class="glightbox"
data-glightbox="type: image;{{ if .image.credit }}description: {{ partial "PrepareHTML" .image.credit }}{{ end }}"
href="{{ partial "GetLightboxUrl" .image }}"
title="{{- i18n "commons.lightbox.link.title" -}}"
>
{{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
<a class="glightbox"
data-glightbox="type: image;{{ if .image.credit }}description: {{ partial "PrepareHTML" .image.credit }}{{ end }}"
href="{{ partial "GetLightboxUrl" .image }}"
title="{{- i18n "commons.lightbox.link.title" -}}">
{{ end }}
{{ partial "commons/image.html"
(dict
"image" .image
"sizes" ( .sizes | default site.Params.image_sizes.design_system.hero )
"lazy" false
) }}
{{ if not site.Params.image_sizes.design_system.lightbox.disabled }}
</a>
{{ end }}
{{ if partial "GetTextFromHTML" .image.credit }}
<figcaption tabindex="0">
<p>
......
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