timgproc.html - andersdamsgaard.com - my photography webpage | |
git clone git://src.adamsgaard.dk/andersdamsgaard.com | |
Log | |
Files | |
Refs | |
Submodules | |
README | |
LICENSE | |
--- | |
timgproc.html (736B) | |
--- | |
1 {{ $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} | |
2 {{ $command := .Get 1 }} | |
3 {{ $options := .Get 2 }} | |
4 {{ if eq $command "Fit"}} | |
5 {{ .Scratch.Set "image" ($original.Fit $options) }} | |
6 {{ else if eq $command "Resize"}} | |
7 {{ .Scratch.Set "image" ($original.Resize $options) }} | |
8 {{ else if eq $command "Fill"}} | |
9 {{ .Scratch.Set "image" ($original.Fill $options) }} | |
10 {{ else }} | |
11 {{ errorf "Invalid image processing command: Must be one of Fit, Fill or… | |
12 {{ end }} | |
13 {{ $image := .Scratch.Get "image" }} | |
14 <figure style="padding: 0.0rem; margin: 0rem 0; background-color: #fffff… | |
15 <img style="max-width: 100%; height: auto;" src="{{ $image.RelPe… | |
16 </figure> |