wisp
 
(Arne Babenhauserheide)
2014-01-11: added org-slides and moved jquery

added org-slides and moved jquery

diff --git a/docs/jquery.js b/docs/ui/jquery.js
rename from docs/jquery.js
rename to docs/ui/jquery.js
diff --git a/docs/ui/org-slides.js b/docs/ui/org-slides.js
new file mode 100644
--- /dev/null
+++ b/docs/ui/org-slides.js
@@ -0,0 +1,37 @@
+function formatSlideTitle(i) {
+    var a = $('<h1 />').append($('<span />').append($(this).contents()));
+    $(this).replaceWith(a);
+}
+
+const tagTranslator = {
+    "Incremental": "incremental",
+    "ShowFirst": "show-first",
+};
+
+function interpretTags() {
+    $("h1 span.tag span").each(function(){
+                                   $(this).parent().parent().parent()
+                                       .siblings().children("ul")
+                                       .addClass(tagTranslator[$(this).text()]);
+                               });
+    $("li span.tag span").each(function(){
+                                   $(this).parent()
+                                       .siblings("ul")
+                                       .addClass(tagTranslator[$(this).text()]);
+                               });
+    $("span.tag").remove();
+}
+
+function rewriteExternalLinks() {
+    $("a").each(function(){
+                    if ($(this).attr("href").match("^http://"))
+                        $(this).attr("rel", "external");
+                });
+}
+
+$(document).ready(function () {
+                      $("div.outline-2").addClass("slide");
+                      $("div.slide h2").each(formatSlideTitle);
+                      interpretTags();
+                      rewriteExternalLinks();
+                  });
diff --git a/docs/why-wisp.org b/docs/why-wisp.org
--- a/docs/why-wisp.org
+++ b/docs/why-wisp.org
@@ -1,5 +1,13 @@
 #+title: Why Wisp?
-#+options: num:nil toc:nil
+#+OPTIONS: H:1 num:nil toc:nil \n:nil @:t ::t |:t ^:t f:t LaTeX:t
+#+BIND: org-export-html-style-include-default nil
+#+BIND: org-export-html-style-include-scripts t
+#+BIND: org-export-html-auto-preamble nil
+#+BIND: org-export-html-auto-postamble nil
+#+BIND: org-export-html-style "<!-- configuration parameters --> <meta name='defaultView' content='slideshow' /> <meta name='controlVis' content='hidden' /> <!-- style sheet links --> <link rel='stylesheet' href='ui/default/slides.css' type='text/css' media='projection' id='slideProj' /> <link rel='stylesheet' href='ui/default/outline.css' type='text/css' media='screen' id='outlineStyle' /> <link rel='stylesheet' href='ui/default/print.css' type='text/css' media='print' id='slidePrint' /> <link rel='stylesheet' href='ui/default/opera.css' type='text/css' media='projection' id='operaFix' />"
+#+BIND: org-export-html-style-extra "<!-- S5 JS --> <script src='ui/jquery.js' type='text/javascript'></script> <script src='ui/org-slides.js' type='text/javascript'></script> <script src='ui/default/slides.js' type='text/javascript'></script> <script src='ui/default/style.js' type='text/javascript'></script>"
+#+BIND: org-export-html-preamble org-s5-html-preamble-function
+#+BIND: org-export-html-postamble org-s5-html-postamble-function
 # Export as s5 presentation. See http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html
 
 #+BEGIN_SRC elisp :exports none
@@ -241,3 +249,7 @@ See the site for info how to test wisp:
 http://draketo.de/light/english/wisp-lisp-indentation-preprocessor
 #+html: </small>
 
+# Local Variables:
+# org-confirm-babel-evaluate: nil
+# org-export-allow-bind-keywords: t
+# End: