Use the photo_thumbnail partial in the li_thumbnail_in_grid template
This commit is contained in:
parent
0f47ca61a6
commit
1e6711b8f3
1 changed files with 2 additions and 5 deletions
|
@ -1,9 +1,6 @@
|
|||
{{- $thumbnailResource := .Resources.GetMatch (index .Params "thumbnail")
|
||||
| default (index (.Resources.ByType "image") 0) -}}
|
||||
{{- $orientation := partial "images/orientation_angle.html" $thumbnailResource -}}
|
||||
{{- $thumbnail := $thumbnailResource.Fit (printf "%dx%d r%d" 600 600 (sub 360 $orientation)) -}}
|
||||
{{- $thumbnail := partial "images/photo_thumbnail.html" (dict "Page" . "Width" 600 "Height" 600) -}}
|
||||
{{- $thumbnail = $thumbnail.Crop "600x600" -}}
|
||||
{{- $altText := $thumbnailResource.Params.alt -}}
|
||||
{{- $altText := $thumbnail.Params.alt -}}
|
||||
<a href="{{ .RelPermalink }}" title="{{ .Title }}">
|
||||
<img src="{{ $thumbnail.RelPermalink }}" {{ with $altText }}alt="{{ . }}"{{ end }}>
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue