mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
lightbox: advise to don't link to random image ids #451
This commit is contained in:
parent
1383b7e6af
commit
eee19034b8
2 changed files with 2 additions and 4 deletions
|
@ -24,8 +24,6 @@ This document shows you what's new in the latest release. For a detailed list of
|
|||
|
||||
This also changed the [lightbox effects]({{% relref "cont/markdown#lightbox" %}}) parameter from `featherlight=false` to `lightbox=false`. Nevertheless you don't need to change anything as the old name will be used as a fallback.
|
||||
|
||||
As a further advantage, the image inside the lightbox now has its own URL and is therefore linkable.
|
||||
|
||||
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} [GitHub releases](https://github.com/McShelby/hugo-theme-relearn/tags) are also now tagged for the main version (eg. `1.2.x`) and major version (eg. `1.x`) making it easier for you to pin the theme to a certain version.
|
||||
|
||||
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Translation for Czech.
|
||||
|
|
|
@ -35,12 +35,12 @@
|
|||
{{- end }}
|
||||
{{- $id := partial "make-random-md5.hugo" }}
|
||||
{{- if $lightbox }}
|
||||
<a href="#{{ $id }}">
|
||||
<a href="#image-{{ $id }}">
|
||||
{{- end }}
|
||||
<img src="{{ $url | safeURL }}" alt="{{ $alt }}"{{ with $title }} title="{{ . }}"{{ end }}{{ if len ($classes) }} class="{{ delimit $classes " " }}"{{ end }} style="height: {{ $height }}; width: {{ $width }};" loading="lazy">
|
||||
{{- if $lightbox }}
|
||||
</a>
|
||||
<a href="javascript:history.back();" class="lightbox" id="{{ $id }}">
|
||||
<a href="javascript:history.back();" class="lightbox" id="image-{{ $id }}">
|
||||
<img src="{{ $url | safeURL }}" alt="{{ $alt }}"{{ with $title }} title="{{ . }}"{{ end }}loading="lazy">
|
||||
</a>
|
||||
{{- end }}
|
Loading…
Reference in a new issue