From d91c33b9359bfad25728dc855f20404e53f0a678 Mon Sep 17 00:00:00 2001 From: raul Date: Sun, 13 Oct 2024 22:22:30 +0200 Subject: [PATCH] Add legacy shortcodes I'm keeping these, I don't want to ever have to create my own shortcodes ever again --- layouts/.gitkeep | 0 layouts/shortcodes/betterfigure.html | 35 +++++++++ layouts/shortcodes/floatfigure.html | 43 ++++++++++ layouts/shortcodes/floatfigure.html.bak | 42 ++++++++++ layouts/shortcodes/floatfiguregifuseless.html | 78 +++++++++++++++++++ 5 files changed, 198 insertions(+) create mode 100644 layouts/.gitkeep create mode 100644 layouts/shortcodes/betterfigure.html create mode 100644 layouts/shortcodes/floatfigure.html create mode 100644 layouts/shortcodes/floatfigure.html.bak create mode 100644 layouts/shortcodes/floatfiguregifuseless.html diff --git a/layouts/.gitkeep b/layouts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/layouts/shortcodes/betterfigure.html b/layouts/shortcodes/betterfigure.html new file mode 100644 index 0000000..3f55a33 --- /dev/null +++ b/layouts/shortcodes/betterfigure.html @@ -0,0 +1,35 @@ + + + {{- if .Get "link" -}} + + {{- end -}} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} +

{{ . }}

+ {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + + diff --git a/layouts/shortcodes/floatfigure.html b/layouts/shortcodes/floatfigure.html new file mode 100644 index 0000000..f7ce49f --- /dev/null +++ b/layouts/shortcodes/floatfigure.html @@ -0,0 +1,43 @@ + + + {{- if .Get "link" -}} + + {{- end -}} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} +

{{ . }}

+ {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + + diff --git a/layouts/shortcodes/floatfigure.html.bak b/layouts/shortcodes/floatfigure.html.bak new file mode 100644 index 0000000..6c8c1a1 --- /dev/null +++ b/layouts/shortcodes/floatfigure.html.bak @@ -0,0 +1,42 @@ + + + {{- if .Get "link" -}} + + {{- end -}} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} +

{{ . }}

+ {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + + diff --git a/layouts/shortcodes/floatfiguregifuseless.html b/layouts/shortcodes/floatfiguregifuseless.html new file mode 100644 index 0000000..4b2c7c8 --- /dev/null +++ b/layouts/shortcodes/floatfiguregifuseless.html @@ -0,0 +1,78 @@ + + + {{- if .Get "link" -}} + + {{- end -}} + + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} +

{{ . }}

+ {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + +