From 9f90c40517391901533f25bad48f5efb574b5605 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Thu, 23 May 2019 17:48:30 +0200 Subject: #39, Finish tabs shortcode --- layouts/shortcodes/mermaid.html | 2 +- layouts/shortcodes/tabs.html | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'layouts') diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html index d156f07..0d4ff86 100644 --- a/layouts/shortcodes/mermaid.html +++ b/layouts/shortcodes/mermaid.html @@ -1,6 +1,6 @@ {{ if not (.Page.Scratch.Get "mermaid") }} - + {{ .Page.Scratch.Set "mermaid" true }} {{ end }} diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 65c1f02..b6390df 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -2,18 +2,32 @@ {{ $id := .Get 0 }} {{ $group := printf "tabs-%s" $id }} + + +
+{{ range $index, $tab := .Scratch.Get $group }} + + +
+ {{ .Content | markdownify }} +
+{{ end }} +
-- cgit v1.2.3