Search/templates/images_only.html
2024-11-20 14:57:55 +01:00

28 lines
1.1 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 -->
<img src="{{ $result.ProxyFull }}" alt="{{ $result.Title }}" class="clickable" />
</noscript>
<!-- JavaScript is enabled; use placeholders -->
<img
src="/static/images/placeholder.svg"
data-id="{{ $result.ID }}"
data-full="{{ $result.ProxyFull }}"
data-proxy-full="{{ $result.ProxyThumb }}"
alt="{{ $result.Title }}"
class="clickable placeholder-img"
/>
{{ else }}
<!-- HardCacheEnabled is false; serve images directly -->
<img src="{{ $result.ProxyFull }}" alt="{{ $result.Title }}" class="clickable" />
{{ end }}
<div class="resolution">{{ $result.Width }} × {{ $result.Height }}</div>
<div class="details">
<span class="img_title clickable">{{ $result.Title }}</span>
<a href="{{ $result.Source }}" target="_blank" class="img_source">{{ translate "source" }}</a>
</div>
</div>
{{ end }}