From 5437521798291b54dabb6645de0094e458c9c228 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Thu, 23 May 2019 16:30:26 +0200 Subject: #39, Finish columns shortcode, clean scss --- layouts/shortcodes/column.html | 10 ---------- layouts/shortcodes/columns.html | 7 +++++++ layouts/shortcodes/expand.html | 2 +- layouts/shortcodes/mermaid.html | 9 +++++++++ layouts/shortcodes/tab.html | 2 +- 5 files changed, 18 insertions(+), 12 deletions(-) delete mode 100644 layouts/shortcodes/column.html create mode 100644 layouts/shortcodes/columns.html create mode 100644 layouts/shortcodes/mermaid.html (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/column.html b/layouts/shortcodes/column.html deleted file mode 100644 index 1951150..0000000 --- a/layouts/shortcodes/column.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ if .Inner }} -
-
- {{ .Inner | markdownify }} -
-
-{{ else }} - -
-{{ end }} diff --git a/layouts/shortcodes/columns.html b/layouts/shortcodes/columns.html new file mode 100644 index 0000000..ec62322 --- /dev/null +++ b/layouts/shortcodes/columns.html @@ -0,0 +1,7 @@ +
+ {{ range split .Inner "<--->" }} +
+ {{ . | markdownify }} +
+ {{ end }} +
diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html index 049fdd1..547fb3f 100644 --- a/layouts/shortcodes/expand.html +++ b/layouts/shortcodes/expand.html @@ -6,7 +6,7 @@
- {{- .Inner | markdownify -}} + {{ .Inner | markdownify }}
diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html new file mode 100644 index 0000000..d156f07 --- /dev/null +++ b/layouts/shortcodes/mermaid.html @@ -0,0 +1,9 @@ +{{ if not (.Page.Scratch.Get "mermaid") }} + + +{{ .Page.Scratch.Set "mermaid" true }} +{{ end }} + +

+ {{ .Inner }} +

diff --git a/layouts/shortcodes/tab.html b/layouts/shortcodes/tab.html index 24520e7..ce78cb8 100644 --- a/layouts/shortcodes/tab.html +++ b/layouts/shortcodes/tab.html @@ -8,5 +8,5 @@ {{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }} {{ else }} - {{- errorf "%q: tab shortcode must be inside tabs shortcode" .Page.Path -}} + {{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }} {{ end}} -- cgit v1.2.3