Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

embeds.html 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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>Embed library</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="/embed-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. {% for embed in embeds %}
  37. <section id="{{embed.id}}">
  38. <h3 class="title slide_title">{{embed.id}}</h3>
  39. <div class="scrollable">
  40. {% if embed.type == "youtube" %}
  41. <div class="iframe-container-{{embed.proportions}}">
  42. <iframe src="https://www.youtube.com/embed/{{ embed.code }}?controls=0{{ embed.url_extras }}" allowfullscreen="allowfullscreen"></iframe>
  43. </div>
  44. {% elif embed.type == "vimeo" %}
  45. <div class="iframe-container-{{embed.proportions}}">
  46. <iframe src="https://player.vimeo.com/video/{{ embed.code }}?title=0&amp;byline=0&amp;portrait=0{{ embed.url_extras }}" allowfullscreen="allowfullscreen"></iframe>
  47. </div>
  48. {% endif %}
  49. <p>{{ embed.description }}</p>
  50. </div>
  51. </section>
  52. {% endfor %}
  53. </section>
  54. </div>
  55. </div>
  56. <script src="/static/reveal/dist/reveal.js"></script>
  57. <script src="/static/reveal/plugin/notes/notes.js"></script>
  58. <script src="/static/reveal/plugin/markdown/markdown.js"></script>
  59. <script src="/static/reveal/plugin/highlight/highlight.js"></script>
  60. <script src="/static/js/jquery-3.7.1.min.js"></script>
  61. <script>
  62. // More info about initialization & config:
  63. // - https://revealjs.com/initialization/
  64. // - https://revealjs.com/config/
  65. Reveal.initialize({
  66. hash: true,
  67. progress: false,
  68. help: false,
  69. transition: 'convex',
  70. controlsBackArrows: 'visible', // would hopefully solve the faded-arrow thing
  71. // slideNumber: "h.v",
  72. // Learn about plugins: https://revealjs.com/plugins/
  73. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
  74. });
  75. $(function() {
  76. // force autoplay for bg videos (but why?!?)
  77. $('.reveal .slide-background-content video').each((index, element) => element.play());
  78. // open external links in new tab
  79. $('.reveal a:not([href^="#"])').attr('target','_blank');
  80. // extract css classes from img alt
  81. $('.reveal img').addClass("w-50 centered");
  82. // make all headers max-size
  83. // $('.reveal h1, .reveal h2, .reveal h3').addClass('r-fit-text');
  84. var enterSlide = function() {
  85. // set theme
  86. var the_slide=$(Reveal.getCurrentSlide()),
  87. the_theme=the_slide.data('theme') ||
  88. the_slide.parent().data('theme') || 'sky';
  89. $('#theme').attr('href',`static/reveal/dist/theme/${the_theme}.css`);
  90. $('#nav-theme').attr('href',`static/css/nav/${the_theme}.css`);
  91. // set (or hide) top link
  92. var here = Reveal.getIndices();
  93. if (here.v) {
  94. $('#top-link').removeAttr('disabled').attr('href', `#/${here.h}`);
  95. } else {
  96. $('#top-link').removeAttr('href').attr('disabled', 'disabled');
  97. }
  98. };
  99. enterSlide();
  100. Reveal.addEventListener('slidechanged', enterSlide);
  101. });
  102. </script>
  103. </body>
  104. </html>