Search/templates/images_only.html

58 lines
2.2 KiB
HTML
Raw Normal View History

2024-11-13 16:59:42 +01:00
{{ range $index, $result := .Results }}
<div class="image">
2024-11-19 12:14:11 +01:00
{{ 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 -->
2024-11-19 12:14:11 +01:00
<img
2024-11-13 16:59:42 +01:00
src="/static/images/placeholder.svg"
data-id="{{ $result.ID }}"
data-full="{{ $result.ProxyFull }}"
data-proxy-full="{{ $result.ProxyThumb }}"
2024-12-02 14:36:08 +01:00
data-source="{{ $result.Source }}"
2024-11-19 12:14:11 +01:00
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>
2024-11-19 12:14:11 +01:00
{{ end }}
2024-11-13 16:59:42 +01:00
<div class="resolution">{{ $result.Width }} × {{ $result.Height }}</div>
<div class="details">
<span class="img_title clickable">{{ $result.Title }}</span>
</div>
</div>
2024-11-19 12:14:11 +01:00
{{ end }}