Move all layouts to platters theme
This commit is contained in:
parent
de8101efed
commit
66adceaf24
91 changed files with 0 additions and 0 deletions
11
themes/platters/layouts/photos/atom_entry.atom
Normal file
11
themes/platters/layouts/photos/atom_entry.atom
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{{- $thumbnail := partial "photos/thumbnail.html" (dict "Page" . "Width" nil "Height" nil) -}}
|
||||
<entry>
|
||||
{{ partial "atom_entry_metadata.xml" . }}
|
||||
<link rel="enclosure" href="{{ $thumbnail.Permalink }}" type="{{ $thumbnail.MediaType }}" length="{{ len $thumbnail.Content }}" />
|
||||
<content type="html">{{ `<![CDATA[` | safeHTML }}
|
||||
{{- range partial "photos/list.html" . -}}
|
||||
<img src="{{ .Permalink }}"{{ with .Params.alt }} alt="{{ . }}"{{ end }}>
|
||||
{{- end -}}
|
||||
{{- .Content -}}
|
||||
]]></content>
|
||||
</entry>
|
||||
13
themes/platters/layouts/photos/li_thumbnail_in_grid.html
Normal file
13
themes/platters/layouts/photos/li_thumbnail_in_grid.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{{- $gridSize := $.Site.Params.photos.thumbnailSize -}}
|
||||
{{- $thumbnail := partial "photos/thumbnail.html" (dict "Page" . "Width" $gridSize "Height" $gridSize) -}}
|
||||
{{- $thumbnail = $thumbnail.Crop (printf "%dx%d" $gridSize $gridSize) -}}
|
||||
{{- $altText := $thumbnail.Params.alt -}}
|
||||
<a href="{{ .RelPermalink }}" title="{{ .Title }}">
|
||||
<img
|
||||
src="{{ $thumbnail.RelPermalink }}"
|
||||
{{ with $altText }}
|
||||
alt="{{ . }}"
|
||||
{{ end }}
|
||||
width={{ $gridSize }}
|
||||
height={{ $gridSize }}>
|
||||
</a>
|
||||
19
themes/platters/layouts/photos/list.html
Normal file
19
themes/platters/layouts/photos/list.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{{ define "header" }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ $pages := .Pages.ByDate.GroupByDate "Jan 2006" }}
|
||||
{{- range $pages -}}
|
||||
<div>
|
||||
<h6><span>{{ .Key | title }}</span></h6>
|
||||
</div>
|
||||
{{- range .Pages -}}
|
||||
{{- .Render "li_thumbnail_in_grid" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer" }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
10
themes/platters/layouts/photos/rss_item.rss
Normal file
10
themes/platters/layouts/photos/rss_item.rss
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{{- $thumbnail := partial "photos/thumbnail.html" (dict "Page" . "Width" 1280 "Height" 1280) -}}
|
||||
<item>
|
||||
{{ partial "rss_item_metadata.rss" . }}
|
||||
<description>{{ `<![CDATA[` | safeHTML }}
|
||||
{{- range (partial "photos/list.html" .) -}}
|
||||
<img src="{{ .Permalink }}"{{ with .Params.alt }} alt="{{ . }}"{{ end }}>
|
||||
{{- end -}}
|
||||
{{- .Content -}}
|
||||
]]></description>
|
||||
</item>
|
||||
29
themes/platters/layouts/photos/section.atom.atom
Normal file
29
themes/platters/layouts/photos/section.atom.atom
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}} {{ $pctx = .Site }} {{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}}
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link href="{{ .Permalink }}" />
|
||||
<link href="{{ `/feed.atom` | absURL }}" rel="self" />
|
||||
<link href="{{ `/icons/favicon.png` | absURL }}" rel="shortcut icon" />
|
||||
{{ if not .Date.IsZero }}<updated>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>{{ end }}
|
||||
<id>{{ .Permalink }}</id>
|
||||
{{ with .Site.Author.name }}
|
||||
<author>
|
||||
<name>{{ . }}</name>
|
||||
{{ with $.Site.Author.email }}<email>{{ . }}</email>{{ end }}
|
||||
<uri>{{ $.Site.Home.Permalink }}</uri>
|
||||
</author>
|
||||
{{ end }}
|
||||
<generator version="{{ hugo.Version }}" uri="https://gohugo.io">Hugo {{ hugo.Version }}</generator>
|
||||
<rights>© 2020-{{ now.Year }} Eryn Wells</rights>
|
||||
{{ range $pages }}{{ .Render "atom_entry" }}{{ end }}
|
||||
</feed>
|
||||
51
themes/platters/layouts/photos/single.html
Normal file
51
themes/platters/layouts/photos/single.html
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{{ define "header" }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{- $photos := partial "photos/list.html" . -}}
|
||||
{{ if eq (len $photos) 0 }}
|
||||
{{ errorf "Missing photo from photos page %q" .Path }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq (len $photos) 1 }}
|
||||
{{- $img := index $photos 0 -}}
|
||||
<figure>
|
||||
<img
|
||||
src="{{ $img.RelPermalink }}"
|
||||
{{ with $img.Params.alt }}
|
||||
alt="{{ . }}"
|
||||
{{ end }}
|
||||
height={{ $img.Height }}>
|
||||
</figure>
|
||||
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
{{- if .Params.photo_details | default true -}}
|
||||
{{- partial "photo_exif_table.html" $img.Exif -}}
|
||||
|
||||
{{- if in ($.Site.BaseURL | string) "localhost" -}}
|
||||
{{- partial "development/photo_exif_table.html" $img.Exif -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ else }}
|
||||
<figure>
|
||||
<ul class="carousel">
|
||||
{{- range $photos -}}
|
||||
<li>{{ . }}</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</figure>
|
||||
{{ end }}
|
||||
|
||||
<footer>
|
||||
{{ partial "footer_tags.html" . }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer" }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue