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

fix glightbox url

parent b3bbb8f0
No related branches found
No related tags found
No related merge requests found
......@@ -23,4 +23,7 @@ params:
truncate_description: 200 # Set to 0 to disable truncate
home:
toc:
disabled: true
\ No newline at end of file
disabled: true
logo:
header: "/assets/images/logo.svg"
footer: "/assets/images/logo.svg"
\ No newline at end of file
{{- $lightbox_sizes := "1920x2560" -}}
{{- $image := partial "GetMedia" .id -}}
{{- $url := $image.url -}}
{{- if site.Params.keycdn -}}
{{- $url = $image.direct_url -}}
{{ $id := . }}
{{ if isset . "id" }}
{{ $id = .id }}
{{ end }}
{{ $lightbox_sizes := "1920x2560" }}
{{ $image := partial "GetMedia" $id }}
{{ $url := "" }}
{{ if $image }}
{{- $url = $image.url -}}
{{- if site.Params.keycdn -}}
{{- $url = $image.direct_url -}}
{{- end -}}
{{ $url = partial "GetImageUrl" (dict "url" $url "size" $lightbox_sizes ) }}
{{- end -}}
{{ return partial "GetImageUrl" (dict "url" $url "size" $lightbox_sizes ) }}
\ No newline at end of file
{{ return $url }}
......@@ -40,7 +40,7 @@
<figure class="{{- $image_class -}}">
<a class="glightbox"
data-glightbox="type: image;{{ if .credit }}description: {{ partial "PrepareHTML" .credit }}{{ end }}"
href="{{ partial "GetLightboxUrl" .image }}"
href="{{- partial "GetLightboxUrl" .image -}}"
title="{{- i18n "commons.lightbox.link.title" -}}"
>
{{ partial "commons/image.html"
......
{{ $file := "/assets/images/logo.svg" }}
{{ $file := site.Params.logo.footer }}
{{ $fileDimensions := partial "GetImageDimensions" (dict "context" . "file" $file "static" true) }}
<a class="logo" href="{{ site.BaseURL }}"><img src="{{ $file }}" alt="{{ site.Title }}" height="{{ index $fileDimensions 1 }}" width="{{ index $fileDimensions 0 }}" loading="lazy"></a>
{{ $file := "/assets/images/logo.svg" }}
{{ $file := site.Params.logo.header }}
{{ $fileDimensions := partial "GetImageDimensions" (dict "context" . "file" $file "static" true) }}
<a class="logo" href="{{ site.BaseURL }}"><img src="{{ $file }}" alt="{{ site.Title }}" height="{{ index $fileDimensions 1 }}" width="{{ index $fileDimensions 0 }}"></a>
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