I LOVE HTML
This commit is contained in:
parent
db89f9c781
commit
998896ad86
2 changed files with 33 additions and 21 deletions
|
@ -8,6 +8,13 @@
|
|||
{{ end }}
|
||||
<title>{{ .Query }} - {{ translate "site_name" }}</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<noscript>
|
||||
<style>
|
||||
img.placeholder-img {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</noscript>
|
||||
<link rel="stylesheet" href="/static/css/style-fixedwidth.css">
|
||||
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
||||
|
@ -185,16 +192,14 @@
|
|||
</noscript>
|
||||
|
||||
<!-- JavaScript is enabled; use placeholders -->
|
||||
<div id="content" class="js-enabled">
|
||||
<img
|
||||
src="/static/images/placeholder.svg"
|
||||
data-id="{{ $result.ID }}"
|
||||
data-full="{{ $result.ProxyFull }}"
|
||||
data-proxy-full="{{ $result.ProxyThumb }}"
|
||||
alt="{{ $result.Title }}"
|
||||
class="clickable"
|
||||
class="clickable placeholder-img"
|
||||
/>
|
||||
</div>
|
||||
{{ else }}
|
||||
<!-- HardCacheEnabled is false; serve images directly -->
|
||||
<img src="{{ $result.ProxyFull }}" alt="{{ $result.Title }}" class="clickable" />
|
||||
|
@ -216,10 +221,10 @@
|
|||
<!-- Nav buttons -->
|
||||
<div class="pagination">
|
||||
{{ if .HasPrevPage }}
|
||||
<a href="/search?q={{ .Query }}&t=image&p={{ sub .Page 1 }}&js_disabled=true">{{ translate "previous" }}</a>
|
||||
<a href="/search?q={{ .Query }}&t=image&p={{ sub .Page 1 }}">{{ translate "previous" }}</a>
|
||||
{{ end }}
|
||||
{{ if .HasNextPage }}
|
||||
<a href="/search?q={{ .Query }}&t=image&p={{ add .Page 1 }}&js_disabled=true">{{ translate "next" }}</a>
|
||||
<a href="/search?q={{ .Query }}&t=image&p={{ add .Page 1 }}">{{ translate "next" }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</noscript>
|
||||
|
|
|
@ -1,17 +1,24 @@
|
|||
{{ range $index, $result := .Results }}
|
||||
<div class="image">
|
||||
<img
|
||||
{{ 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 }}"
|
||||
{{else}}
|
||||
src="{{ $result.ProxyFull }}"
|
||||
{{end}}
|
||||
alt="{{ $result.Title }}"
|
||||
class="clickable"
|
||||
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>
|
||||
|
|
Loading…
Add table
Reference in a new issue