forked from jakub/jakubb-hugo
add compressing to jpeg for images and thumbnails
This commit is contained in:
parent
6433fb41ba
commit
1639033905
@ -1,27 +1,21 @@
|
|||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
{{ partial "nav.html" . }}
|
{{ partial "nav.html" . }}
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
{{ $path := .Page.File.Path | strings.TrimSuffix (path.Ext .Page.File.Path) }}
|
{{ $path := .Page.File.Path | strings.TrimSuffix (path.Ext .Page.File.Path) }}
|
||||||
{{ $images := where (resources.Match "photos/test1/*" ) "ResourceType" "eq" "image" }}
|
{{ $images := where (resources.Match "photos/test1/*" ) "ResourceType" "eq" "image" }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="gallery">
|
<div class="gallery">
|
||||||
{{ range $images }}
|
{{ range $images }}
|
||||||
<div class="gallery-item">
|
<div class="gallery-item">
|
||||||
<img src="{{ .RelPermalink }}" />
|
{{ $thumbnail := .Process "resize x600 q50 jpeg" }}
|
||||||
|
{{ $public := .Process "jpeg q100" }}
|
||||||
|
<a href="{{ $public.RelPermalink }}" target="_blank"><img src="{{ $thumbnail.RelPermalink }}" /></a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
Loading…
Reference in New Issue
Block a user