Move a bunch of shortcodes and partials back from the platters theme
This commit is contained in:
parent
20d53e0df2
commit
3102dc1e56
29 changed files with 1 additions and 1 deletions
9
layouts/shortcodes/photo.html
Normal file
9
layouts/shortcodes/photo.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{- with $photoPage := $.Page.GetPage (printf "photos/%s" (.Get 0)) -}}
|
||||
{{- $thumbnail := partial "photos/thumbnail.html" (dict "Page" . "Width" 1280 "Height" 1280) -}}
|
||||
{{- $altText := $thumbnail.Params.alt | default .Title -}}
|
||||
<a class="to-photo-post" href="{{ .RelPermalink }}" title="{{ .Title }}">
|
||||
<img src="{{ $thumbnail.RelPermalink }}"{{ with $altText }} alt="{{ . }}"{{ end }}>
|
||||
</a>
|
||||
{{- else -}}
|
||||
{{- errorf "No page matching '%s'" (.Get 0) -}}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue