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.

chat.html 5.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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" title="Reset"><i class="fa fa-redo">​</i></a>
  22. </div>
  23. <div class="reveal">
  24. <div class="slides">
  25. <section data-theme="sky" data-background-size="cover"{% if use_bg_video %} data-background-video="{{bg_video}}" data-background-opacity="{{bg_video_opacity}}" data-background-video-loop="True" data-background-video-mute="True"{% endif %}>
  26. <section{% if use_bg_image %} data-background="{{bg_image}}" data-background-opacity="{{bg_image_opacity}}" data-background-size="cover"{% endif %}>
  27. <h3 class="title slide_title">{{title}}</h3>
  28. <div class="scrollable">
  29. {{ content|safe }}
  30. </div>
  31. <form method="POST" action="">
  32. <!-- onsubmit='document.getElementById("prompt").setAttribute("disabled", "")' -->
  33. <input class="prompt" id="prompt" name="prompt" placeholder="Talk to me" />
  34. </form>
  35. </section>
  36. </section>
  37. </div>
  38. </div>
  39. <script src="/static/reveal/dist/reveal.js"></script>
  40. <script src="/static/reveal/plugin/notes/notes.js"></script>
  41. <script src="/static/reveal/plugin/markdown/markdown.js"></script>
  42. <script src="/static/reveal/plugin/highlight/highlight.js"></script>
  43. <script src="/static/js/jquery-3.7.1.min.js"></script>
  44. <script>
  45. // More info about initialization & config:
  46. // - https://revealjs.com/initialization/
  47. // - https://revealjs.com/config/
  48. Reveal.initialize({
  49. hash: true,
  50. progress: false,
  51. help: false,
  52. transition: 'convex',
  53. controlsBackArrows: 'visible', // would hopefully solve the faded-arrow thing
  54. // slideNumber: "h.v",
  55. // Learn about plugins: https://revealjs.com/plugins/
  56. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
  57. });
  58. $(function() {
  59. // force autoplay for bg videos (but why?!?)
  60. $('.reveal .slide-background-content video').each((index, element) => element.play());
  61. // open external links in new tab
  62. $('.reveal a:not([href^="#"])').attr('target','_blank');
  63. // extract css classes from img alt
  64. $('.reveal img').each((index, element) => {
  65. var img = $(element),
  66. altvec = img.attr('alt').split('|');
  67. if (altvec.length>1) {
  68. img.attr('alt',altvec[0]).addClass(altvec[1]);
  69. }
  70. });
  71. // make all headers max-size
  72. // $('.reveal h1, .reveal h2, .reveal h3').addClass('r-fit-text');
  73. var enterSlide = function() {
  74. // set theme
  75. var the_slide=$(Reveal.getCurrentSlide()),
  76. the_theme=the_slide.data('theme') ||
  77. the_slide.parent().data('theme') || 'sky';
  78. $('#theme').attr('href',`static/reveal/dist/theme/${the_theme}.css`);
  79. $('#nav-theme').attr('href',`static/css/nav/${the_theme}.css`);
  80. // set (or hide) top link
  81. var here = Reveal.getIndices();
  82. if (here.v) {
  83. $('#top-link').removeAttr('disabled').attr('href', `#/${here.h}`);
  84. } else {
  85. $('#top-link').removeAttr('href').attr('disabled', 'disabled');
  86. }
  87. };
  88. enterSlide();
  89. Reveal.addEventListener('slidechanged', enterSlide);
  90. });
  91. </script>
  92. </body>
  93. </html>