Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

example.html 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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="/chat-editor" title="Edit"><i class="fa fa-user-edit">​</i></a>
  22. </div>
  23. <div class="reveal">
  24. <div class="slides">
  25. {% with messages = get_flashed_messages() %}
  26. {% if messages %}
  27. <section data-theme="solarized">
  28. {% for m in messages %}
  29. <h4>{{ m }}</h4>
  30. {% endfor %}
  31. <a href="#/latest">Continue...</a>
  32. </section>
  33. {% endif %}
  34. {% endwith %}
  35. <section data-theme="sky">
  36. <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">
  37. <h3 class="title slide_title">{{title}}</h3>
  38. <div class="scrollable">
  39. {% if embed %}
  40. {% if embed.type == "youtube" %}
  41. <iframe class="iframe-{{embed.proportions}}" src="https://www.youtube.com/embed/{{ embed.code }}" allowfullscreen="allowfullscreen"></iframe>
  42. {% elif embed.type == "vimeo" %}
  43. <iframe class="iframe-{{embed.proportions}}" src="https://player.vimeo.com/video/{{ embed.code }}" allowfullscreen="allowfullscreen"></iframe>
  44. {% endif %}
  45. {% endif %}
  46. {{ content|safe }}
  47. </div>
  48. <form method="POST" action=""
  49. onsubmit='setTimeout(() => { document.getElementById("prompt").setAttribute("disabled", ""); }, 100)'>
  50. <input class="prompt" id="prompt" name="prompt" placeholder="Talk to me" />
  51. </form>
  52. </section>
  53. {% for moment in history %}
  54. <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">
  55. <h3 class="title slide_title">{{moment.title}}</h3>
  56. {% if moment.prompt %}
  57. <input class="prompt" value="{{moment.prompt}}" disabled />
  58. {% endif %}
  59. <div class="scrollable">
  60. {% if moment.embed %}
  61. {% if moment.embed.type == "youtube" %}
  62. <iframe class="iframe-{{moment.embed.proportions}}" src="https://www.youtube.com/embed/{{ moment.embed.code }}" allowfullscreen="allowfullscreen"></iframe>
  63. {% elif moment.embed.type == "vimeo" %}
  64. <iframe class="iframe-{{moment.embed.proportions}}" src="https://player.vimeo.com/video/{{ moment.embed.code }}" allowfullscreen="allowfullscreen"></iframe>
  65. {% endif %}
  66. {% endif %}
  67. {{ moment.content|safe }}
  68. </div>
  69. </section>
  70. {% endfor %}
  71. </section>
  72. </div>
  73. </div>
  74. <script src="/static/reveal/dist/reveal.js"></script>
  75. <script src="/static/reveal/plugin/notes/notes.js"></script>
  76. <script src="/static/reveal/plugin/markdown/markdown.js"></script>
  77. <script src="/static/reveal/plugin/highlight/highlight.js"></script>
  78. <script src="/static/js/jquery-3.7.1.min.js"></script>
  79. <script>
  80. // More info about initialization & config:
  81. // - https://revealjs.com/initialization/
  82. // - https://revealjs.com/config/
  83. Reveal.initialize({
  84. hash: true,
  85. progress: false,
  86. help: false,
  87. transition: 'convex',
  88. controlsBackArrows: 'visible', // would hopefully solve the faded-arrow thing
  89. // slideNumber: "h.v",
  90. // Learn about plugins: https://revealjs.com/plugins/
  91. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
  92. });
  93. $(function() {
  94. // force autoplay for bg videos (but why?!?)
  95. $('.reveal .slide-background-content video').each((index, element) => element.play());
  96. // open external links in new tab
  97. $('.reveal a:not([href^="#"])').attr('target','_blank');
  98. // extract css classes from img alt
  99. $('.reveal img').addClass("w-50 centered");
  100. // make all headers max-size
  101. // $('.reveal h1, .reveal h2, .reveal h3').addClass('r-fit-text');
  102. var enterSlide = function() {
  103. // set theme
  104. var the_slide=$(Reveal.getCurrentSlide()),
  105. the_theme=the_slide.data('theme') ||
  106. the_slide.parent().data('theme') || 'sky';
  107. $('#theme').attr('href',`static/reveal/dist/theme/${the_theme}.css`);
  108. $('#nav-theme').attr('href',`static/css/nav/${the_theme}.css`);
  109. // set (or hide) top link
  110. var here = Reveal.getIndices();
  111. if (here.v) {
  112. $('#top-link').removeAttr('disabled').attr('href', `#/${here.h}`);
  113. } else {
  114. $('#top-link').removeAttr('href').attr('disabled', 'disabled');
  115. }
  116. };
  117. enterSlide();
  118. Reveal.addEventListener('slidechanged', enterSlide);
  119. });
  120. </script>
  121. </body>
  122. </html>