From ea6082d632122e42ad118d514f87665c34ddf6c8 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Wed, 29 Aug 2018 21:02:12 +0300 Subject: Initial commit - natrium: e006b529af8bee9422e4b2f8af0c6be4e8b41001 - reveal-hugo: 3bd0dbabe99e13a6c4970bbbfea12b0f084a0d1a --- layouts/shortcodes/frag.html | 4 ++++ layouts/shortcodes/fragment.html | 4 ++++ layouts/shortcodes/markdown.html | 8 +++++++ layouts/shortcodes/note.html | 1 + layouts/shortcodes/section.html | 3 +++ layouts/shortcodes/slide.html | 48 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 68 insertions(+) create mode 100644 layouts/shortcodes/frag.html create mode 100644 layouts/shortcodes/fragment.html create mode 100644 layouts/shortcodes/markdown.html create mode 100644 layouts/shortcodes/note.html create mode 100644 layouts/shortcodes/section.html create mode 100644 layouts/shortcodes/slide.html (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/frag.html b/layouts/shortcodes/frag.html new file mode 100644 index 0000000..c1de8c8 --- /dev/null +++ b/layouts/shortcodes/frag.html @@ -0,0 +1,4 @@ + + {{ .Get "c" }} + \ No newline at end of file diff --git a/layouts/shortcodes/fragment.html b/layouts/shortcodes/fragment.html new file mode 100644 index 0000000..dc41e03 --- /dev/null +++ b/layouts/shortcodes/fragment.html @@ -0,0 +1,4 @@ + + {{ .Inner }} + \ No newline at end of file diff --git a/layouts/shortcodes/markdown.html b/layouts/shortcodes/markdown.html new file mode 100644 index 0000000..f5effbc --- /dev/null +++ b/layouts/shortcodes/markdown.html @@ -0,0 +1,8 @@ +
+ +
\ No newline at end of file diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html new file mode 100644 index 0000000..5d28fce --- /dev/null +++ b/layouts/shortcodes/note.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/layouts/shortcodes/section.html b/layouts/shortcodes/section.html new file mode 100644 index 0000000..43611a4 --- /dev/null +++ b/layouts/shortcodes/section.html @@ -0,0 +1,3 @@ +
+{{ .Inner }} +
\ No newline at end of file diff --git a/layouts/shortcodes/slide.html b/layouts/shortcodes/slide.html new file mode 100644 index 0000000..7bb41ec --- /dev/null +++ b/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