Skip to content

Commit

Permalink
Update img shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Dec 20, 2023
1 parent 7fc15a6 commit ba8e05c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions layouts/shortcodes/img.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@
{{- end }}

{{- $validFilters := slice
"brightness" "colorbalance" "colorize" "contrast" "gamma" "gaussianblur"
"grayscale" "hue" "invert" "none" "opacity" "overlay" "padding" "pixelate"
"process" "saturation" "sepia" "sigmoid" "text" "unsharpmask"
"autoorient" "brightness" "colorbalance" "colorize" "contrast" "gamma"
"gaussianblur" "grayscale" "hue" "invert" "none" "opacity" "overlay"
"padding" "pixelate" "process" "saturation" "sepia" "sigmoid" "text"
"unsharpmask"
}}

{{- with $filter }}
Expand Down Expand Up @@ -157,7 +158,11 @@
{{- /* Create filter. */}}
{{- $f := "" }}
{{- $ctx := dict "filter" $filter "args" $filterArgs "name" .Name "position" .Position }}
{{- if eq $filter "brightness" }}
{{- if eq $filter "autoorient" }}
{{- $ctx = merge $ctx (dict "argsRequired" 0) }}
{{- template "validate-arg-count" $ctx }}
{{- $f = images.AutoOrient }}
{{- else if eq $filter "brightness" }}
{{- $ctx = merge $ctx (dict "argsRequired" 1) }}
{{- template "validate-arg-count" $ctx }}
{{- $filterArgs = apply $filterArgs "float" "." }}
Expand Down

0 comments on commit ba8e05c

Please sign in to comment.