From 8bd3be35bccd742bfa91793851443724d279824e Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 10 Feb 2024 10:04:14 -0500 Subject: Update project structure + new shortcodes --- themes/cranky/layouts/shortcodes/img.html | 1 + themes/cranky/layouts/shortcodes/mermaid.html | 8 ++++++++ themes/cranky/layouts/shortcodes/youtubepl.html | 10 ++++++++++ 3 files changed, 19 insertions(+) create mode 100644 themes/cranky/layouts/shortcodes/mermaid.html create mode 100644 themes/cranky/layouts/shortcodes/youtubepl.html (limited to 'themes') diff --git a/themes/cranky/layouts/shortcodes/img.html b/themes/cranky/layouts/shortcodes/img.html index ff7959b..7d57af3 100644 --- a/themes/cranky/layouts/shortcodes/img.html +++ b/themes/cranky/layouts/shortcodes/img.html @@ -10,6 +10,7 @@ {{.}} {{- if .Get "link"}}{{ end -}} {{- with .Get "caption" -}} diff --git a/themes/cranky/layouts/shortcodes/mermaid.html b/themes/cranky/layouts/shortcodes/mermaid.html new file mode 100644 index 0000000..a752e38 --- /dev/null +++ b/themes/cranky/layouts/shortcodes/mermaid.html @@ -0,0 +1,8 @@ +{{ if ($.Page.Params.mermaid) }} + + + +{{ end }} +
+ {{.Inner}} +
diff --git a/themes/cranky/layouts/shortcodes/youtubepl.html b/themes/cranky/layouts/shortcodes/youtubepl.html new file mode 100644 index 0000000..c0e3d7c --- /dev/null +++ b/themes/cranky/layouts/shortcodes/youtubepl.html @@ -0,0 +1,10 @@ +{{- $pc := .Page.Site.Config.Privacy.YouTube -}} +{{- if not $pc.Disable -}} +{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}} +{{- $id := .Get "id" | default (.Get 0) -}} +{{- $class := .Get "class" | default (.Get 1) -}} +{{- $title := .Get "title" | default "YouTube Video" }} +
+ +
+{{ end -}} -- cgit v1.2.3