diff --git a/exampleSite/content/shortcodes/attachments.en.md b/exampleSite/content/shortcodes/attachments.en.md index 4f3bea6ac9..ce9d1a2e24 100644 --- a/exampleSite/content/shortcodes/attachments.en.md +++ b/exampleSite/content/shortcodes/attachments.en.md @@ -62,14 +62,14 @@ Be aware that if you use a multilingual website, you will need to have as many f {{% /expand %}} -### Colored styled box, descending sort order +### Info styled box, descending sort order -{{% attachments style="orange" sort="desc" /%}} +{{% attachments style="info" sort="desc" /%}} {{% expand "Show markup" %}} ````go -{{%/* attachments style="orange" sort="desc" /*/%}} +{{%/* attachments style="info" sort="desc" /*/%}} ```` {{% /expand %}} diff --git a/layouts/shortcodes/attachments.html b/layouts/shortcodes/attachments.html index 7bba7c4aeb..b4ba313bf9 100644 --- a/layouts/shortcodes/attachments.html +++ b/layouts/shortcodes/attachments.html @@ -1,6 +1,6 @@ {{- $_hugo_config := `{ "version": 1 }` }} {{- $style := .Get "style" | default "transparent" }} -{{- $title := .Get "title" | default ("Attachments-label" | T) }} +{{- $title := .Get "title" | default ($style | T) | default ("Attachments-label" | T) }} {{- $icon := .Get "icon" | default "" }} {{- if and (not $icon) (eq (len $icon) 0) }} {{- $icon = "paperclip" }} @@ -11,6 +11,7 @@ {{- end }} {{- $icon = trim $icon " " }} {{- $sort := .Get "sort" | default "asc" }} +{{- $pattern := .Get "pattern" | default "" }}