diff --git a/config.yaml b/config.yaml index c71cc04a41970ad126f1169aeee5e8b0f5ea58c6..c338f51b8326132320121bfbc47ecf6057300c90 100644 --- a/config.yaml +++ b/config.yaml @@ -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 diff --git a/layouts/partials/GetLightboxUrl b/layouts/partials/GetLightboxUrl index 8914ac0757255f5b44221b900e94b31b4c087561..e4993a61a28b2d8ee7404f7b90aa164534caafc7 100644 --- a/layouts/partials/GetLightboxUrl +++ b/layouts/partials/GetLightboxUrl @@ -1,8 +1,17 @@ -{{- $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 }} diff --git a/layouts/partials/blocks/templates/chapter.html b/layouts/partials/blocks/templates/chapter.html index b95f37eddf95c659c165be226f3a02eb1f38f131..bb0c6750ef72e22130a8f1d47d3201954e9dfb07 100644 --- a/layouts/partials/blocks/templates/chapter.html +++ b/layouts/partials/blocks/templates/chapter.html @@ -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" diff --git a/layouts/partials/footer/logo.html b/layouts/partials/footer/logo.html index 5cdf05f63c24ff25ca0512af8ad52b448d6d9e98..0e0bead460a7913326d77968ceacbb0a02ce0e50 100644 --- a/layouts/partials/footer/logo.html +++ b/layouts/partials/footer/logo.html @@ -1,3 +1,3 @@ -{{ $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> diff --git a/layouts/partials/header/logo.html b/layouts/partials/header/logo.html index 7ce7b481ed349fa8b946e878f6c23c7d29bc2fdc..1f159730e15c03e8d1947682ef9151b84dcfdc52 100644 --- a/layouts/partials/header/logo.html +++ b/layouts/partials/header/logo.html @@ -1,3 +1,3 @@ -{{ $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>