resize images
This commit is contained in:
parent
dfdd779b31
commit
6eae9acbf6
@ -4,10 +4,11 @@
|
|||||||
<div class="content portfolio">
|
<div class="content portfolio">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
<div id="portfolio-gallery">
|
<div id="portfolio-gallery">
|
||||||
{{ range .Params.images }}
|
{{ range $index, $element := .Params.images }}
|
||||||
{{ $img := $.Page.Resources.GetMatch . }}
|
{{ $img := $.Page.Resources.GetMatch $element }}
|
||||||
|
{{ $res_img := $img.Fill (cond (eq $index 0) "1920x1080" "640x360") }}
|
||||||
<a href="{{ $img.RelPermalink }}">
|
<a href="{{ $img.RelPermalink }}">
|
||||||
<img src="{{ $img.RelPermalink }}" alt="">
|
<img src="{{ $res_img.RelPermalink }}" alt="">
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user