From 2c4ac3082f6141b25bfce6af20747f0385c3b39f Mon Sep 17 00:00:00 2001 From: Shawn O'Hare Date: Thu, 14 Jan 2016 20:41:16 -0800 Subject: [PATCH] Add more shortcodes. --- layouts/shortcodes/figure.html | 44 ++++++++++++++++++++++++++++++ layouts/shortcodes/newthought.html | 1 + 2 files changed, 45 insertions(+) create mode 100644 layouts/shortcodes/figure.html create mode 100644 layouts/shortcodes/newthought.html diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html new file mode 100644 index 0000000..907d2cb --- /dev/null +++ b/layouts/shortcodes/figure.html @@ -0,0 +1,44 @@ +{{ $type := .Get "type" }} + +{{ if not (eq $type "margin") }} + {{ if eq $type "full" }} +
+ {{ else }} +
+ {{ end }} +{{ end }} + +{{ if eq $type "full" }} + {{ with .Get "link" }}{{ end }} + + {{ if .Get "link" }}{{ end }} +
+{{ else }} + + + + {{ if eq $type "margin" }} + {{ with .Get "link" }}{{ end }} + + {{ if .Get "link" }}{{ end }} + {{ end }} +{{ end }} + {{ with .Get "title"}}{{ . }} {{ end}} + {{ with .Get "caption"}}{{ . }}{{ end }} + {{ with .Get "attrlink"}}{{ end }} + {{ with .Get "attr" }}{{ . }}{{ end }} + {{ if .Get "attrlink" }}{{ end }} +{{ if eq $type "full" }} +
+{{ else }} + +{{ end }} +{{ if and (not (eq $type "full")) (not (eq $type "margin")) }} + {{ with .Get "link" }}{{ end }} + + {{ if .Get "link" }}{{ end }} +{{ end }} + +{{ if not (eq $type "margin") }} +
+{{ end }} diff --git a/layouts/shortcodes/newthought.html b/layouts/shortcodes/newthought.html new file mode 100644 index 0000000..5fabf2d --- /dev/null +++ b/layouts/shortcodes/newthought.html @@ -0,0 +1 @@ +{{ .Inner }}