aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-20 15:14:14 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-20 15:14:14 -0200
commitfb8d224e7d9765c50508a69f98710d4ad191205f (patch)
tree2c3946ab4f734312c2c6aac29735c24273ad483d /share
parente01871f625bcdac93b2e4bb67d4a934253f4a06c (diff)
downloadtemplater-fb8d224e7d9765c50508a69f98710d4ad191205f.tar.gz
templater-fb8d224e7d9765c50508a69f98710d4ad191205f.tar.bz2
Adds reveal.js
Diffstat (limited to 'share')
-rw-r--r--share/templater/reveal.js/description1
-rw-r--r--share/templater/reveal.js/files/Makefile.reveal.js12
-rw-r--r--share/templater/reveal.js/files/index.css7
-rw-r--r--share/templater/reveal.js/files/index.md6
-rwxr-xr-xshare/templater/reveal.js/setup34
5 files changed, 60 insertions, 0 deletions
diff --git a/share/templater/reveal.js/description b/share/templater/reveal.js/description
new file mode 100644
index 0000000..d1afca1
--- /dev/null
+++ b/share/templater/reveal.js/description
@@ -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
index 0000000..b62eb66
--- /dev/null
+++ b/share/templater/reveal.js/files/Makefile.reveal.js
@@ -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
index 0000000..ac9df84
--- /dev/null
+++ b/share/templater/reveal.js/files/index.css
@@ -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
index 0000000..3ff0d38
--- /dev/null
+++ b/share/templater/reveal.js/files/index.md
@@ -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
index 0000000..0fcbf1d
--- /dev/null
+++ b/share/templater/reveal.js/setup
@@ -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