From 3245f1f1404785d92c21eb381c08dee5a4be6bb7 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Tue, 4 Sep 2018 09:08:41 +0300 Subject: Moved site to website folder --- website/layouts/shortcodes/slide.html | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 website/layouts/shortcodes/slide.html (limited to 'website/layouts/shortcodes/slide.html') diff --git a/website/layouts/shortcodes/slide.html b/website/layouts/shortcodes/slide.html new file mode 100644 index 0000000..7bb41ec --- /dev/null +++ b/website/layouts/shortcodes/slide.html @@ -0,0 +1,48 @@ +{{- $scratch := .Scratch -}} +{{- $scratch.Set "slides" slice -}} +{{- if len .Inner -}} + {{- $scratch.Add "slides" .Inner -}} +{{- end -}} +{{- $content := .Get "content" -}} +{{- if $content -}} + {{- $lookup := split $content "." }} + {{- $html := index .Page.Site.Data (index $lookup 0) (index $lookup 1) | markdownify -}} + {{- $slides := split $html "
" -}} + {{- range $slides -}} + {{- $scratch.Add "slides" . -}} + {{- end -}} +{{- end -}} +{{- $params := . -}} +{{- $noPrefix := slice "id" "class" -}} +{{- $noOutput := slice "content" "template" -}} +{{- range $scratch.Get "slides" }} +
+ {{ . | safeHTML }} +
+{{- end -}} \ No newline at end of file -- cgit v1.3.1-26-gb76a