Search/templates/images_only.html
partisan 6c351c5f2b
Some checks failed
Run Integration Tests / test (push) Failing after 21s
fixed invalid links on images when DriveCache was disabled
2024-12-05 19:19:18 +01:00

57 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ range $index, $result := .Results }}
<div class="image">
{{ if $.HardCacheEnabled }}
<noscript>
<!-- JavaScript is disabled; serve actual images without placeholders; serve proxy image since HardCache is enabled -->
<img
src="{{ $result.ProxyFull }}"
data-id="{{ $result.ID }}"
data-full="{{ $result.ProxyFull }}"
data-proxy-full="{{ $result.ProxyThumb }}"
data-source="{{ $result.Source }}"
alt="{{ $result.Title }}"
class="clickable"
/>
</noscript>
<!-- JavaScript is enabled; use placeholders; serve proxy image since HardCache is enabled -->
<img
src="/static/images/placeholder.svg"
data-id="{{ $result.ID }}"
data-full="{{ $result.ProxyFull }}"
data-proxy-full="{{ $result.ProxyThumb }}"
data-source="{{ $result.Source }}"
alt="{{ $result.Title }}"
class="clickable placeholder-img"
/>
{{ else }}
<!-- JavaScript is enabled; use placeholders; serve full image since HardCache is disabled -->
<img
src="/static/images/placeholder.svg"
data-id="{{ $result.ID }}"
data-full="{{ $result.ProxyFull }}"
data-proxy-full="{{ $result.ProxyThumb }}"
data-source="{{ $result.Source }}"
alt="{{ $result.Title }}"
class="clickable placeholder-img"
/>
<noscript>
<!-- JavaScript is disabled; serve actual images without placeholders; serve full image since HardCache is disabled -->
<img
src="{{ $result.ProxyFull }}"
data-id="{{ $result.ID }}"
data-full="{{ $result.ProxyFull }}"
data-proxy-full="{{ $result.ProxyThumb }}"
data-source="{{ $result.Source }}"
alt="{{ $result.Title }}"
class="clickable"
/>
</noscript>
{{ end }}
<div class="resolution">{{ $result.Width }} × {{ $result.Height }}</div>
<div class="details">
<span class="img_title clickable">{{ $result.Title }}</span>
</div>
</div>
{{ end }}