]> gitweb.fluxo.info Git - templater.git/commitdiff
Adds reveal.js
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 20 Nov 2017 17:14:14 +0000 (15:14 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 20 Nov 2017 17:14:14 +0000 (15:14 -0200)
share/templater/reveal.js/description [new file with mode: 0644]
share/templater/reveal.js/files/Makefile.reveal.js [new file with mode: 0644]
share/templater/reveal.js/files/index.css [new file with mode: 0644]
share/templater/reveal.js/files/index.md [new file with mode: 0644]
share/templater/reveal.js/setup [new file with mode: 0755]

diff --git a/share/templater/reveal.js/description b/share/templater/reveal.js/description
new file mode 100644 (file)
index 0000000..d1afca1
--- /dev/null
@@ -0,0 +1 @@
+the HTML presentation framework
diff --git a/share/templater/reveal.js/files/Makefile.reveal.js b/share/templater/reveal.js/files/Makefile.reveal.js
new file mode 100644 (file)
index 0000000..b62eb66
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# Makefile for reveal.js presentation
+#
+
+# See https://github.com/jgm/pandoc/wiki/Using-pandoc-to-produce-reveal.js-slides
+# Also look for variables at /usr/share/pandoc/data/templates/default.revealjs
+REVEAL_THEME=moon
+
+web:
+       test -s .gitmodules && git submodule update --init --recursive
+       pandoc -V theme=$(REVEAL_THEME) -V css=index.css -s --mathjax -i -t revealjs index.md -o index.html
+       pandoc -t beamer index.md -o index.pdf 
diff --git a/share/templater/reveal.js/files/index.css b/share/templater/reveal.js/files/index.css
new file mode 100644 (file)
index 0000000..ac9df84
--- /dev/null
@@ -0,0 +1,7 @@
+.reveal h1 {
+  font-size: 2.1em;
+}
+
+.reveal h2 {
+  font-size: 1.5em;
+}
diff --git a/share/templater/reveal.js/files/index.md b/share/templater/reveal.js/files/index.md
new file mode 100644 (file)
index 0000000..3ff0d38
--- /dev/null
@@ -0,0 +1,6 @@
+% Title
+% Subtitle
+
+# First slide
+
+First content
diff --git a/share/templater/reveal.js/setup b/share/templater/reveal.js/setup
new file mode 100755 (executable)
index 0000000..0fcbf1d
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# reveal.js templater module.
+#
+
+# Parameters
+SHARE="$1"
+
+# Include basic functions
+source $SHARE/templater/functions || exit 1
+
+# reveal.js implementation
+function templater_reveal.js {
+  if [ ! -e "Makefile.reveal.js" ]; then
+    templater_echo "Setting up reveal.js..."
+
+    if [ -d '.git' ]; then
+      git submodule add https://github.com/hakimel/reveal.js
+    else
+      git clone https://github.com/hakimel/reveal.js
+    fi
+
+    cp $SHARE/reveal.js/files/index.css .
+    cp $SHARE/reveal.js/files/index.md  .
+
+    templater_install_makefile $SHARE/reveal.js/files/Makefile.reveal.js
+
+  else
+    templater_echo "reveal.js already set"
+  fi
+}
+
+# Dispatch
+templater_reveal.js