You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. {{ content|safe }}
  43. </div>
  44. <form method="POST" action=""
  45. onsubmit='setTimeout(() => { document.getElementById("prompt").setAttribute("disabled", ""); }, 100)'>
  46. <input class="prompt" id="prompt" name="prompt" placeholder="Talk to me" />
  47. </form>
  48. </section>
  49. {% for moment in history %}
  50. <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">
  51. <h3 class="title slide_title">{{moment.title}}</h3>
  52. {% if moment.prompt %}
  53. <input class="prompt" value="{{moment.prompt}}" disabled />
  54. {% endif %}
  55. <div class="scrollable">
  56. {{ moment.content|safe }}
  57. </div>
  58. </section>
  59. {% endfor %}
  60. </section>
  61. </div>
  62. </div>
  63. <script src="/static/reveal/dist/reveal.js"></script>
  64. <script src="/static/reveal/plugin/notes/notes.js"></script>
  65. <script src="/static/reveal/plugin/markdown/markdown.js"></script>
  66. <script src="/static/reveal/plugin/highlight/highlight.js"></script>
  67. <script src="/static/js/jquery-3.7.1.min.js"></script>
  68. <script>
  69. // More info about initialization & config:
  70. // - https://revealjs.com/initialization/
  71. // - https://revealjs.com/config/
  72. Reveal.initialize({
  73. hash: true,
  74. progress: false,
  75. help: false,
  76. transition: 'convex',
  77. controlsBackArrows: 'visible', // would hopefully solve the faded-arrow thing
  78. // slideNumber: "h.v",
  79. // Learn about plugins: https://revealjs.com/plugins/
  80. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
  81. });
  82. $(function() {
  83. // force autoplay for bg videos (but why?!?)
  84. $('.reveal .slide-background-content video').each((index, element) => element.play());
  85. // open external links in new tab
  86. $('.reveal a:not([href^="#"])').attr('target','_blank');
  87. // extract css classes from img alt
  88. $('.reveal img').addClass("w-50 centered");
  89. // make all headers max-size
  90. // $('.reveal h1, .reveal h2, .reveal h3').addClass('r-fit-text');
  91. var enterSlide = function() {
  92. // set theme
  93. var the_slide=$(Reveal.getCurrentSlide()),
  94. the_theme=the_slide.data('theme') ||
  95. the_slide.parent().data('theme') || 'sky';
  96. $('#theme').attr('href',`static/reveal/dist/theme/${the_theme}.css`);
  97. $('#nav-theme').attr('href',`static/css/nav/${the_theme}.css`);
  98. // set (or hide) top link
  99. var here = Reveal.getIndices();
  100. if (here.v) {
  101. $('#top-link').removeAttr('disabled').attr('href', `#/${here.h}`);
  102. } else {
  103. $('#top-link').removeAttr('href').attr('disabled', 'disabled');
  104. }
  105. };
  106. enterSlide();
  107. Reveal.addEventListener('slidechanged', enterSlide);
  108. });
  109. </script>
  110. </body>
  111. </html>