blob: 3ddc6dd20c58a38f9074bc55577772f896bd9cb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
{{ partial "head.html" . }}
{{ template "_internal/google_analytics.html" . }}
</head>
<body>
<div class="container">
{{ partial "header.html" . }}
<div class="main">
<ul id="og-grid" class="og-grid">
{{ range $page := sort (where .Site.RegularPages "Type" "photo") ".Dir" }}
{{ range $index, $image := sort ($page.Resources.ByType "image") "Params.order" }}
<li>
<a href="{{ if isset $image.Params "button_url" }}{{ $image.Params.button_url }}{{ else }}#{{ end }}" data-largesrc="{{ $image.RelPermalink }}"
data-title="{{ $image.Name }}"
data-description="{{ $image.Params.description | markdownify }}"
{{ if isset $image.Params "button_text" }}data-buttontext="{{ $image.Params.button_text }}"{{ end }} data-collection="{{ $page.Title }}"
data-exif="{{- with $image.Exif -}}
{{- with .Tags -}}
<li>{{- if isset . "Model" }}{{ if not (hasPrefix (lower .Model) (lower .Make)) }}{{ .Make }} {{ end }}{{ .Model }}
{{- else }}{{ if isset $image.Params "composite" }}{{ $image.Params.composite }}
{{- else }}Composite Photo{{ end }}{{ end }}</li>
{{- if isset . "LensModel" }}
<li>{{- if not (hasPrefix (lower .LensModel) (lower .Make)) }}{{ .LensModel }}
{{- else }}{{ substr .LensModel (len .Make)}}{{ end }} @ {{ .FocalLength }}mm</li>
{{- end }}
{{- with .ExposureTime }}<li>S.S. {{ . }}s</li>{{ end }}
{{- with .FNumber }}<li>A. f/{{ . }}</li>{{ end }}
{{- with .ISOSpeedRatings }}<li>ISO {{ . }}</li>{{ end }}
{{ end -}}
<li>Taken at {{ if isset $image.Params "timestamp" }} {{ $image.Params.timestamp }} {{ else }}{{ .Date.Format "2006-1-2 15:04" }}{{ end }}</li>
{{ end }}">
{{ $.Scratch.Set "thumbnail" ($image.Resize "x250") }}
<img class="lazy" data-src="{{ ($.Scratch.Get "thumbnail").RelPermalink }}" style="width:{{ ($.Scratch.Get "thumbnail").Width }}px;" alt="Thumbnail of {{ $image.Name }}"/>
</a>
</li>
{{ end }}
{{ end }}
</ul>
{{ partial "footer.html" . }}
</div>
</div>
{{ partial "scripts.html" . }}
</body>
</html>
|