Website Summary Files Commits Branches @commit @diff @stats
path: root / layouts / partials / reveal-hugo
diff options
context:
space:
mode:
Commitad823cc4d72edbab10f0dadf99b30df91c3f7c50 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-16 08:38:04 +0300
Committer
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-16 08:38:04 +0300
Files6666a19acc2316d6ad5ad00291066d6d6fd42a5b /layouts/partials/reveal-hugo
IPL-ad823cc4d72edbab10f0dadf99b30df91c3f7c50.tar
IPL-ad823cc4d72edbab10f0dadf99b30df91c3f7c50.tar.gz
IPL-ad823cc4d72edbab10f0dadf99b30df91c3f7c50.zip
Squashed 'website/themes/reveal-hugo/' content from commit ff9f389
git-subtree-dir: website/themes/reveal-hugo git-subtree-split: ff9f389743ae2fe5c5cc6101455db0616e8548e2
diff --git a/layouts/partials/reveal-hugo/body.html b/layouts/partials/reveal-hugo/body.html
new file mode 100644
index 0000000..f2dd4bf
--- /dev/null
+++ b/layouts/partials/reveal-hugo/body.html
@@ -0,0 +1 @@
+<!-- override this partial to add content before the body tag closes --> \ No newline at end of file
diff --git a/layouts/partials/reveal-hugo/end.html b/layouts/partials/reveal-hugo/end.html
new file mode 100644
index 0000000..1ca9f46
--- /dev/null
+++ b/layouts/partials/reveal-hugo/end.html
@@ -0,0 +1 @@
+<!-- override this partial to add content before the .reveal tag closes -->
diff --git a/layouts/partials/reveal-hugo/head.html b/layouts/partials/reveal-hugo/head.html
new file mode 100644
index 0000000..ed1e892
--- /dev/null
+++ b/layouts/partials/reveal-hugo/head.html
@@ -0,0 +1 @@
+<!-- override this partial to add content before the head tag closes --> \ No newline at end of file
diff --git a/layouts/partials/reveal-hugo/slides.html b/layouts/partials/reveal-hugo/slides.html
new file mode 100644
index 0000000..0bed8a9
--- /dev/null
+++ b/layouts/partials/reveal-hugo/slides.html
@@ -0,0 +1,26 @@
+<!-- Use the array of pages passed as a param -->
+{{ range . -}}
+<!-- Don't process empty content files -->
+ {{- if ne (len .Content) 0 -}}
+ <!-- Remove the <hr /> tag generated by blackfriday for footnotes -->
+ {{- $content := replace .Content "<div class=\"footnotes\">\n\n<hr />" "<div class=\"footnotes\">" -}}
+ <!-- <code> blocks processed by Hugo's highlighter have a data-lang attribute. For those, we disable -->
+ <!-- highlight.js by changing the language class to "nohighlight", and adding "data-noescape". -->
+ {{- $content := replaceRE `<code class="language-\w+"\s+data-lang="\w+"` `<code class="nohighlight" data-noescape` $content -}}
+ <!-- enable Highlight.js line numbers when the markdown code block language selection is followed by "{}" e.g. ```js{} -->
+ {{- $content := replaceRE `(<code class="language-\w+){}(">)` `$1" data-line-numbers>` $content -}}
+ <!-- enable Highlight.js line highlights when the language selection is followed by "{<line numbers>}" e.g. ```js{1,5-7} -->
+ {{- $content := replaceRE `(<code class="language-\w+){(\S+)}(">)` `$1" data-line-numbers="$2">` $content -}}
+ <!-- Support both <hr /> (blackfriday) and <hr> (mmark) -->
+ {{- $content := replace $content "<hr>" "<hr />" -}}
+ <!-- Split the processed content by <hr /> tag -->
+ {{- range (split $content "<hr />") -}}
+ <!-- Only wrap in <section> tag if not already wrapped by shortcode -->
+ {{- if not (in . "data-noprocess") -}}
+<section>
+ {{- end -}}
+ {{- . | safeHTML -}}
+</section>
+ {{- end -}}
+ {{- end -}}
+{{- end }}