diff --git a/layouts/shortcodes/attachments.html b/layouts/shortcodes/attachments.html new file mode 100644 index 0000000..d44408b --- /dev/null +++ b/layouts/shortcodes/attachments.html @@ -0,0 +1,11 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- partial "shortcodes/attachments.html" (dict + "page" .Page + "color" (.Get "color") + "content" .Inner + "icon" (.Get "icon") + "pattern" (.Get "pattern") + "style" (.Get "style") + "sort" (.Get "sort") + "title" (.Get "title") +) }} \ No newline at end of file diff --git a/layouts/shortcodes/badge.html b/layouts/shortcodes/badge.html new file mode 100644 index 0000000..939d87a --- /dev/null +++ b/layouts/shortcodes/badge.html @@ -0,0 +1,9 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- partial "shortcodes/badge.html" (dict + "page" .Page + "color" (.Get "color") + "content" .Inner + "icon" (.Get "icon") + "style" (.Get "style") + "title" (.Get "title") +) }} \ No newline at end of file diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html new file mode 100644 index 0000000..3d8ffa9 --- /dev/null +++ b/layouts/shortcodes/button.html @@ -0,0 +1,16 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- if (.Get "icon-position") }} + {{- warnf "%q: DEPRECATED parameter 'icon-position' for shortcode 'button' found, use 'iconposition' instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button#parameter" .Page.File.Filename }} +{{- end }} +{{- partial "shortcodes/button.html" (dict + "page" .Page + "color" (.Get "color") + "content" .Inner + "href" (.Get "href") + "icon" (.Get "icon") + "iconposition" ((.Get "iconposition") | default (.Get "icon-position")) + "style" (.Get "style") + "title" (.Get "title") + "target" (.Get "target") + "type" (.Get "type") +) }} \ No newline at end of file diff --git a/layouts/shortcodes/children.html b/layouts/shortcodes/children.html new file mode 100644 index 0000000..cd52aeb --- /dev/null +++ b/layouts/shortcodes/children.html @@ -0,0 +1,10 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- partial "shortcodes/children.html" (dict + "page" .Page + "containerstyle" (.Get "containerstyle") + "description" (.Get "description") + "depth" (.Get "depth") + "showhidden" (.Get "showhidden") + "sort" (.Get "sort") + "style" (.Get "style") +) }} \ No newline at end of file diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html new file mode 100644 index 0000000..14b77be --- /dev/null +++ b/layouts/shortcodes/expand.html @@ -0,0 +1,9 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- $id := "" }} +{{- partial "shortcodes/expand.html" (dict + "page" .Page + "content" .Inner + "open" (.Get "open" | default (.Get 1)) + "title" (.Get "title" | default (.Get 0)) + "id" $id +) }} \ No newline at end of file diff --git a/layouts/shortcodes/highlight.html b/layouts/shortcodes/highlight.html new file mode 100644 index 0000000..22d7899 --- /dev/null +++ b/layouts/shortcodes/highlight.html @@ -0,0 +1,27 @@ +{{- $content := "" }} +{{- $content = .InnerDeindent }} +{{- $attributes := dict }} +{{- $options := dict }} +{{- $type := "" }} +{{- range $k, $v := .Params }} + {{- if eq $k 0 }} + {{- $type = $v }} + {{- else if eq $k 1 }} + {{- $options = $v }} + {{- else if eq $k "type" }} + {{- $type = $v }} + {{- else if eq $k "title" }} + {{- $attributes = $attributes | merge (dict $k $v) }} + {{- else if eq $k "wrap" }} + {{- $attributes = $attributes | merge (dict $k $v) }} + {{- else }} + {{- $options = $options | merge (dict $k $v) }} + {{- end }} +{{- end }} +{{- partial "shortcodes/highlight.html" (dict + "page" .Page + "attributes" $attributes + "content" $content + "options" $options + "type" $type +) }} \ No newline at end of file diff --git a/layouts/shortcodes/icon.html b/layouts/shortcodes/icon.html new file mode 100644 index 0000000..a0e422a --- /dev/null +++ b/layouts/shortcodes/icon.html @@ -0,0 +1,5 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- partial "shortcodes/icon.html" (dict + "page" .Page + "icon" (.Get "icon" | default (.Get 0)) +) }} \ No newline at end of file diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html new file mode 100644 index 0000000..4c2ea61 --- /dev/null +++ b/layouts/shortcodes/include.html @@ -0,0 +1,8 @@ +{{- if (.Get "showfirstheading") }} + {{- warnf "%q: UNSUPPORTED parameter 'showfirstheading' for shortcode 'include' found, use 'hidefirstheading' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#420" .Page.File.Filename }} +{{- end }} +{{- partial "shortcodes/include.html" (dict + "page" .Page + "file" (.Get "file" | default (.Get 0)) + "hidefirstheading" (.Get "hidefirstheading" | default (.Get 1)) +) }} \ No newline at end of file diff --git a/layouts/shortcodes/math.html b/layouts/shortcodes/math.html new file mode 100644 index 0000000..5c7ae6d --- /dev/null +++ b/layouts/shortcodes/math.html @@ -0,0 +1,6 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- partial "shortcodes/math.html" (dict + "page" .Page + "content" .Inner + "align" (.Get "align") +) }} \ No newline at end of file diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html new file mode 100644 index 0000000..e0c8820 --- /dev/null +++ b/layouts/shortcodes/mermaid.html @@ -0,0 +1,7 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- partial "shortcodes/mermaid.html" (dict + "page" .Page + "content" .Inner + "align" (.Get "align") + "zoom" (.Get "zoom") +) }} \ No newline at end of file diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html new file mode 100644 index 0000000..83c4dec --- /dev/null +++ b/layouts/shortcodes/notice.html @@ -0,0 +1,9 @@ +{{- $_hugo_config := `{ "version": 1 }` }} +{{- partial "shortcodes/notice.html" (dict + "page" .Page + "color" (.Get "color") + "content" .Inner + "icon" (.Get "icon" | default (.Get 2)) + "style" (.Get "style" | default (.Get 0)) + "title" (.Get "title" | default (.Get 1)) +) }} \ No newline at end of file diff --git a/layouts/shortcodes/openapi.html b/layouts/shortcodes/openapi.html new file mode 100644 index 0000000..9277714 --- /dev/null +++ b/layouts/shortcodes/openapi.html @@ -0,0 +1,6 @@ +{{- $id := "" }} +{{- partial "shortcodes/openapi.html" (dict + "page" .Page + "src" (.Get "src") + "id" $id +) }} \ No newline at end of file diff --git a/layouts/shortcodes/ppt.html b/layouts/shortcodes/ppt.html new file mode 100644 index 0000000..e5a336f --- /dev/null +++ b/layouts/shortcodes/ppt.html @@ -0,0 +1,35 @@ + + +
+ +