{{/* get file that matches the filename as specified as src="" in shortcode */}} {{- $src := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}} {{/* set image sizes, these are hardcoded for now, x dictates that images are resized to this width */}} {{- $PinePhonew := default "720x" -}} {{- $Pixel3aw := default "1080x" -}} {{- $WSXGAw := default "1440x" -}} {{- $FHDw := default "1920x" -}} {{- $QHDw := default "2560x" -}} {{- $4kw := default "3840x" -}} {{/* resize the src image to the given sizes */}} {{- .Scratch.Set "PinePhone" ($src.Resize $PinePhonew) -}} {{- .Scratch.Set "Pixel3a" ($src.Resize $Pixel3aw) -}} {{- .Scratch.Set "WSXGA" ($src.Resize $WSXGAw) -}} {{- .Scratch.Set "FHD" ($src.Resize $FHDw) -}} {{- .Scratch.Set "QHD" ($src.Resize $QHDw) -}} {{- .Scratch.Set "4k" ($src.Resize $4kw) -}} {{/* add the processed images to the scratch */}} {{- $PinePhone := .Scratch.Get "PinePhone" -}} {{- $Pixel3a := .Scratch.Get "Pixel3a" -}} {{- $WSXGA := .Scratch.Get "WSXGA" -}} {{- $FHD := .Scratch.Get "FHD" -}} {{- $QHD := .Scratch.Get "QHD" -}} {{- $4k := .Scratch.Get "4k" -}}