57 lines
2.2 KiB
HTML
57 lines
2.2 KiB
HTML
{{ 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 }}
|