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/_default/baseof.reveal.html | 87 ++++++++++++++++++++++++ website/layouts/_default/index.reveal.html | 3 + website/layouts/_default/list.reveal.html | 3 + website/layouts/_default/single.reveal.html | 0 website/layouts/partials/reveal-hugo/body.html | 1 + website/layouts/partials/reveal-hugo/head.html | 1 + website/layouts/partials/reveal-hugo/slides.html | 24 +++++++ website/layouts/shortcodes/frag.html | 4 ++ website/layouts/shortcodes/fragment.html | 4 ++ website/layouts/shortcodes/markdown.html | 8 +++ website/layouts/shortcodes/note.html | 1 + website/layouts/shortcodes/section.html | 3 + website/layouts/shortcodes/slide.html | 48 +++++++++++++ 13 files changed, 187 insertions(+) create mode 100644 website/layouts/_default/baseof.reveal.html create mode 100644 website/layouts/_default/index.reveal.html create mode 100644 website/layouts/_default/list.reveal.html create mode 100644 website/layouts/_default/single.reveal.html create mode 100644 website/layouts/partials/reveal-hugo/body.html create mode 100644 website/layouts/partials/reveal-hugo/head.html create mode 100644 website/layouts/partials/reveal-hugo/slides.html create mode 100644 website/layouts/shortcodes/frag.html create mode 100644 website/layouts/shortcodes/fragment.html create mode 100644 website/layouts/shortcodes/markdown.html create mode 100644 website/layouts/shortcodes/note.html create mode 100644 website/layouts/shortcodes/section.html create mode 100644 website/layouts/shortcodes/slide.html (limited to 'website/layouts') diff --git a/website/layouts/_default/baseof.reveal.html b/website/layouts/_default/baseof.reveal.html new file mode 100644 index 0000000..1e3868b --- /dev/null +++ b/website/layouts/_default/baseof.reveal.html @@ -0,0 +1,87 @@ + +{{- $reveal_cdn := "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0" -}} +{{- $highlight_cdn := "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0" -}} + + + + {{ or .Page.Title .Site.Title }} + + + + + + + + {{- $theme := or .Page.Params.reveal_hugo.theme .Site.Params.reveal_hugo.theme .Site.Data.reveal_hugo.defaults.theme "black" -}} + {{- $custom_theme := or .Page.Params.reveal_hugo.custom_theme .Site.Params.reveal_hugo.custom_theme -}} + {{- if $custom_theme -}} + + {{ else -}} + + {{- end -}} + + {{- $highlight_theme := or .Page.Params.reveal_hugo.highlight_theme .Site.Params.reveal_hugo.highlight_theme .Site.Data.reveal_hugo.defaults.highlight_theme "default" -}} + + + + + {{- partial "reveal-hugo/head" . -}} + + + {{- block "main" . -}}{{- end -}} + + + + + + + + + {{ partial "reveal-hugo/body" . }} + + diff --git a/website/layouts/_default/index.reveal.html b/website/layouts/_default/index.reveal.html new file mode 100644 index 0000000..8faa735 --- /dev/null +++ b/website/layouts/_default/index.reveal.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ partial "reveal-hugo/slides" (union (slice .Page) (where .Data.Pages "Type" "home")) }} +{{ end }} diff --git a/website/layouts/_default/list.reveal.html b/website/layouts/_default/list.reveal.html new file mode 100644 index 0000000..6c3c470 --- /dev/null +++ b/website/layouts/_default/list.reveal.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ partial "reveal-hugo/slides" (union (slice .Page) .Pages) }} +{{ end }} diff --git a/website/layouts/_default/single.reveal.html b/website/layouts/_default/single.reveal.html new file mode 100644 index 0000000..e69de29 diff --git a/website/layouts/partials/reveal-hugo/body.html b/website/layouts/partials/reveal-hugo/body.html new file mode 100644 index 0000000..f2dd4bf --- /dev/null +++ b/website/layouts/partials/reveal-hugo/body.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/layouts/partials/reveal-hugo/head.html b/website/layouts/partials/reveal-hugo/head.html new file mode 100644 index 0000000..ed1e892 --- /dev/null +++ b/website/layouts/partials/reveal-hugo/head.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/layouts/partials/reveal-hugo/slides.html b/website/layouts/partials/reveal-hugo/slides.html new file mode 100644 index 0000000..e578882 --- /dev/null +++ b/website/layouts/partials/reveal-hugo/slides.html @@ -0,0 +1,24 @@ +
+ +
+ + {{ range . -}} + + {{- if ne (len .Content) 0 -}} + + {{- $content := replace .Content "
\n\n
" "
" -}} + + {{- range (split $content "
") -}} + + {{- if in . "data-noprocess" -}} +{{- . | safeHTML -}} + {{- else }} +
+ {{- . | safeHTML }} +
+ {{- end -}} + {{- end -}} + {{- end -}} + {{- end }} +
+
\ No newline at end of file diff --git a/website/layouts/shortcodes/frag.html b/website/layouts/shortcodes/frag.html new file mode 100644 index 0000000..c1de8c8 --- /dev/null +++ b/website/layouts/shortcodes/frag.html @@ -0,0 +1,4 @@ + + {{ .Get "c" }} + \ No newline at end of file diff --git a/website/layouts/shortcodes/fragment.html b/website/layouts/shortcodes/fragment.html new file mode 100644 index 0000000..dc41e03 --- /dev/null +++ b/website/layouts/shortcodes/fragment.html @@ -0,0 +1,4 @@ + + {{ .Inner }} + \ No newline at end of file diff --git a/website/layouts/shortcodes/markdown.html b/website/layouts/shortcodes/markdown.html new file mode 100644 index 0000000..f5effbc --- /dev/null +++ b/website/layouts/shortcodes/markdown.html @@ -0,0 +1,8 @@ +
+ +
\ No newline at end of file diff --git a/website/layouts/shortcodes/note.html b/website/layouts/shortcodes/note.html new file mode 100644 index 0000000..5d28fce --- /dev/null +++ b/website/layouts/shortcodes/note.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/layouts/shortcodes/section.html b/website/layouts/shortcodes/section.html new file mode 100644 index 0000000..43611a4 --- /dev/null +++ b/website/layouts/shortcodes/section.html @@ -0,0 +1,3 @@ +
+{{ .Inner }} +
\ No newline at end of file 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