Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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.0, maximum-scale=1.0, user-scalable=no">
  6. <title>{{title}}</title>
  7. <link rel="stylesheet" href="static/css/style.css" />
  8. <link rel="stylesheet" href="static/reveal/dist/reset.css" />
  9. <link rel="stylesheet" href="static/reveal/dist/reveal.css" />
  10. <link id="theme" rel="stylesheet" href="static/reveal/dist/theme/sky.css" />
  11. <link id="nav-theme" rel="stylesheet" href="static/css/nav/sky.css" />
  12. <link rel="stylesheet" href=
  13. "https://use.fontawesome.com/releases/v5.6.3/css/all.css"
  14. integrity=
  15. "sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
  16. crossorigin="anonymous">
  17. </head>
  18. <body>
  19. <div id="custom-nav">
  20. <!-- the zero-width-space is a tweak against tidy removing empty tags -->
  21. <a href="/reset/odelia" title="New session with Odelia"><i class="fa fa-female">​</i></a>
  22. <a href="/reset/brian" title="New session with Brian"><i class="fa fa-male">​</i></a>
  23. <a href="/save" title="Save"><i class="fa fa-file-download">​</i></a>
  24. <a href="/load" title="Load"><i class="fa fa-file-upload">​</i></a>
  25. </div>
  26. <div class="reveal">
  27. <div class="slides">
  28. {% with messages = get_flashed_messages() %}
  29. {% if messages %}
  30. <section data-theme="solarized">
  31. {% for m in messages %}
  32. <h4>{{ m }}</h4>
  33. {% endfor %}
  34. <a href="#/latest">Continue...</a>
  35. </section>
  36. {% endif %}
  37. {% endwith %}
  38. <section data-theme="sky">
  39. <section id="latest" data-background-size="cover" data-background-video="{{bg_video}}" data-background-opacity="0.75" data-background-video-loop="True" data-background-video-mute="True">
  40. <h3 class="title slide_title">{{title}}</h3>
  41. <div class="scrollable">
  42. {% if embed %}
  43. {% if embed.type == "youtube" %}
  44. <div class="iframe-container-{{embed.proportions}}">
  45. <iframe src="https://www.youtube.com/embed/{{ embed.code }}" allowfullscreen="allowfullscreen"></iframe>
  46. </div>
  47. {% elif embed.type == "vimeo" %}
  48. <div class="iframe-container-{{embed.proportions}}">
  49. <iframe src="https://player.vimeo.com/video/{{ embed.code }}" allowfullscreen="allowfullscreen"></iframe>
  50. </div>
  51. {% endif %}
  52. {% endif %}
  53. {{ content|safe }}
  54. </div>
  55. <form method="POST" action=""
  56. onsubmit='setTimeout(() => { document.getElementById("prompt").setAttribute("disabled", ""); }, 100)'>
  57. <input class="prompt" id="prompt" name="prompt" placeholder="Talk to me" />
  58. </form>
  59. </section>
  60. {% for moment in history %}
  61. <section {% if loop.last %}id="oldest" {% endif %}data-background-size="cover" data-background-video="{{moment.bg_video}}" data-background-opacity="0.75" data-background-video-loop="True" data-background-video-mute="True">
  62. <h3 class="title slide_title">{{moment.title}}</h3>
  63. {% if moment.prompt %}
  64. <input class="prompt" value="{{moment.prompt}}" disabled />
  65. {% endif %}
  66. <div class="scrollable">
  67. {% if moment.embed %}
  68. {% if moment.embed.type == "youtube" %}
  69. <div class="iframe-container-{{moment.embed.proportions}}">
  70. <iframe src="https://www.youtube.com/embed/{{ moment.embed.code }}" allowfullscreen="allowfullscreen"></iframe>
  71. </div>
  72. {% elif moment.embed.type == "vimeo" %}
  73. <div class="iframe-container-{{moment.embed.proportions}}">
  74. <iframe src="https://player.vimeo.com/video/{{ moment.embed.code }}" allowfullscreen="allowfullscreen"></iframe>
  75. </div>
  76. {% endif %}
  77. {% endif %}
  78. {{ moment.content|safe }}
  79. </div>
  80. </section>
  81. {% endfor %}
  82. </section>
  83. </div>
  84. </div>
  85. <script src="/static/reveal/dist/reveal.js"></script>
  86. <script src="/static/reveal/plugin/notes/notes.js"></script>
  87. <script src="/static/reveal/plugin/markdown/markdown.js"></script>
  88. <script src="/static/reveal/plugin/highlight/highlight.js"></script>
  89. <script src="/static/js/jquery-3.7.1.min.js"></script>
  90. <script>
  91. // More info about initialization & config:
  92. // - https://revealjs.com/initialization/
  93. // - https://revealjs.com/config/
  94. Reveal.initialize({
  95. hash: true,
  96. progress: false,
  97. help: false,
  98. transition: 'convex',
  99. controlsBackArrows: 'visible', // would hopefully solve the faded-arrow thing
  100. // slideNumber: "h.v",
  101. // Learn about plugins: https://revealjs.com/plugins/
  102. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
  103. });
  104. $(function() {
  105. // force autoplay for bg videos (but why?!?)
  106. $('.reveal .slide-background-content video').each((index, element) => element.play());
  107. // open external links in new tab
  108. $('.reveal a:not([href^="#"])').attr('target','_blank');
  109. // extract css classes from img alt
  110. $('.reveal img').addClass("w-50 centered");
  111. // make all headers max-size
  112. // $('.reveal h1, .reveal h2, .reveal h3').addClass('r-fit-text');
  113. var enterSlide = function() {
  114. // set theme
  115. var the_slide=$(Reveal.getCurrentSlide()),
  116. the_theme=the_slide.data('theme') ||
  117. the_slide.parent().data('theme') || 'sky';
  118. $('#theme').attr('href',`static/reveal/dist/theme/${the_theme}.css`);
  119. $('#nav-theme').attr('href',`static/css/nav/${the_theme}.css`);
  120. // set (or hide) top link
  121. var here = Reveal.getIndices();
  122. if (here.v) {
  123. $('#top-link').removeAttr('disabled').attr('href', `#/${here.h}`);
  124. } else {
  125. $('#top-link').removeAttr('href').attr('disabled', 'disabled');
  126. }
  127. };
  128. enterSlide();
  129. Reveal.addEventListener('slidechanged', enterSlide);
  130. });
  131. </script>
  132. </body>
  133. </html>