browser: further IE11 fixes #452

This commit is contained in:
Sören Weber 2023-02-04 16:17:19 +01:00
parent 5b9389fde2
commit 4a1adeb79b
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 3 additions and 3 deletions

View file

@ -35,12 +35,12 @@
{{- end }} {{- end }}
{{- $id := partial "make-random-md5.hugo" }} {{- $id := partial "make-random-md5.hugo" }}
{{- if $lightbox }} {{- if $lightbox }}
<a class="lightbox-link" href="#image-{{ $id }}"> <a href="#image-{{ $id }}" class="lightbox-link">
{{- end }} {{- 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"> <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 }} {{- if $lightbox }}
</a> </a>
<a href="javascript:history.back();" class="lightbox" id="image-{{ $id }}"> <a href="javascript:history.back();" class="lightbox" id="image-{{ $id }}">
<img class="lightbox-image" src="{{ $url | safeURL }}" alt="{{ $alt }}"{{ with $title }} title="{{ . }}"{{ end }}loading="lazy"> <img src="{{ $url | safeURL }}" alt="{{ $alt }}"{{ with $title }} title="{{ . }}"{{ end }} class="lightbox-image" loading="lazy">
</a> </a>
{{- end }} {{- end }}

View file

@ -821,7 +821,7 @@ function mark() {
topbarLinks[i].classList.add( 'highlight' ); topbarLinks[i].classList.add( 'highlight' );
} }
var bodyInnerLinks = document.querySelectorAll( '#body-inner a:not(.lightbox-link):not(.btn):not(.lightbox):not(a[rel="footnote"])' ); var bodyInnerLinks = document.querySelectorAll( '#body-inner a:not(.lightbox-link):not(.btn):not(.lightbox)' );
for( var i = 0; i < bodyInnerLinks.length; i++ ){ for( var i = 0; i < bodyInnerLinks.length; i++ ){
bodyInnerLinks[i].classList.add( 'highlight' ); bodyInnerLinks[i].classList.add( 'highlight' );
} }