template.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="description" content="Presto is a simple webapp to store and view presentations made in reveal.js">
  7. <meta name="keywords" content="presto, reveal.js, presentations, webapp, JeroenED, MIT, Open-Source">
  8. <title><?=$title?></title>
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/<?=$version?>/css/reveal.min.css">
  10. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/<?=$version?>/css/theme/<?=$theme?>.css" id="theme">
  11. <!--[if lt IE 9]>
  12. <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/<?=$version?>/lib/js/html5shiv.js"></script>
  13. <![endif]-->
  14. </head>
  15. <body>
  16. <div class="reveal">
  17. <div class="slides">
  18. <?=$html?>
  19. </div>
  20. </div>
  21. <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/<?=$version?>/lib/js/head.min.js"></script>
  22. <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/<?=$version?>/js/reveal.js"></script>
  23. <script>
  24. Reveal.initialize({
  25. <?php
  26. if(is_array($options)){
  27. $numItems = count($options);
  28. $i = 0;
  29. foreach($options as $key => $value) {
  30. echo $key . ':';
  31. if (is_int($value)) {
  32. echo $value;
  33. } elseif (is_bool($value)) {
  34. echo ($value) ? 'true' : 'false';
  35. } else {
  36. echo '\'' . $value . '\'';
  37. }
  38. if (++$i !== $numItems) echo ',';
  39. }
  40. }
  41. ?>
  42. });
  43. </script>
  44. </body>
  45. </html>