Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

slides.html 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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="{{ url_for('static', filename='css/style.css') }}" />
  8. <link rel="stylesheet" href="{{ url_for('static', filename='reveal/dist/reset.css') }}" />
  9. <link rel="stylesheet" href="{{ url_for('static', filename='reveal/dist/reveal.css') }}" />
  10. <link id="theme" rel="stylesheet" href="{{ url_for('static', filename='reveal/dist/theme/white.css') }}" />
  11. <link id="nav-theme" rel="stylesheet" href="{{ url_for('static', filename='css/nav/white.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. <!-- Theme used for syntax highlighted code -->
  18. <!-- link rel="stylesheet" href="{{ url_for('static', filename='reveal/plugin/highlight/monokai.css') }}" -->
  19. </head>
  20. <body>
  21. <div id="custom-nav">
  22. <!-- the zero-width-space is a tweak against tidy removing empty tags -->
  23. <a href="#/" title="Home"><i class="fa fa-home">​</i></a>
  24. <a id="top-link" title="Section top" disabled="disabled"><i class="fa fa-angle-double-up">​</i></a>
  25. <a href="/editor" title="Edit"><i class="fa fa-user-edit">​</i></a>
  26. </div>
  27. <div class="reveal">
  28. <div class="slides">
  29. {% for column in columns %}
  30. <section{% if column.params %}{% for key, value in column.params|dictsort %} data-{{key}}="{{value}}"{% endfor %}{% endif %}>
  31. <section id="{{column.id}}">
  32. {# column's top slide #}
  33. <h3 class="title slide_title">{{column.title}}</h3>
  34. {% if column.content %}{{ column.content|safe }}{% endif %}
  35. {# Main column shows links to other columns #}
  36. {% if loop.first %}
  37. <ul>
  38. {% for other in columns %}
  39. {% if not loop.first %}<li><a href="#/{{other.id}}">{{other.title}}</a></li>{% endif %}
  40. {% endfor %}
  41. </ul>
  42. {% endif %}
  43. {# if column has sub-slides, link to them #}
  44. {% if column.slides %}
  45. <ul>
  46. {% for slide in column.slides %}
  47. <li><a href="#/{{column.id}}_{{slide.id}}">{{slide.title}}</a></li>
  48. {% endfor %}
  49. </ul>
  50. {% endif %}
  51. </section>
  52. {# show all column's sub-slides #}
  53. {% for slide in column.slides %}
  54. <section id="{{column.id}}_{{slide.id}}"{% if slide.params %}{% for key, value in slide.params|dictsort %} data-{{key}}="{{value}}"{% endfor %}{% endif %}>
  55. <p class="title">{{slide.title}}</p>
  56. {% if slide.content %}{{ slide.content|safe }}{% endif %}
  57. </section>
  58. {% endfor %}
  59. </section>
  60. {% endfor %}
  61. </div>
  62. </div>
  63. <script src="{{ url_for('static', filename='reveal/dist/reveal.js') }}"></script>
  64. <script src="{{ url_for('static', filename='reveal/plugin/notes/notes.js') }}"></script>
  65. <script src="{{ url_for('static', filename='reveal/plugin/markdown/markdown.js') }}"></script>
  66. <script src="{{ url_for('static', filename='reveal/plugin/highlight/highlight.js') }}"></script>
  67. <script src="{{ url_for('static', filename='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. // controlsTutorial: false,
  75. transition: 'convex',
  76. controlsBackArrows: 'visible', // would hopefully solve the faded-arrow thing
  77. // slideNumber: "h.v",
  78. // Learn about plugins: https://revealjs.com/plugins/
  79. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
  80. });
  81. $(function() {
  82. // force autoplay for bg videos (but why?!?)
  83. $('.reveal .slide-background-content video').each((index, element) => element.play());
  84. // open external links in new tab
  85. $('.reveal a:not([href^="#"])').attr('target','_blank');
  86. // extract css classes from img alt
  87. $('.reveal img').each((index, element) => {
  88. var img = $(element),
  89. altvec = img.attr('alt').split('|');
  90. if (altvec.length>1) {
  91. img.attr('alt',altvec[0]).addClass(altvec[1]);
  92. }
  93. });
  94. $('.reveal h1, .reveal h2, .reveal h3').addClass('r-fit-text');
  95. var enterSlide = function() {
  96. // set theme
  97. var the_slide=$(Reveal.getCurrentSlide()),
  98. the_theme=the_slide.data('theme') ||
  99. the_slide.parent().data('theme') || 'sky';
  100. $('#theme').attr('href',`static/reveal/dist/theme/${the_theme}.css`);
  101. $('#nav-theme').attr('href',`static/css/nav/${the_theme}.css`);
  102. // set (or hide) top link
  103. var here = Reveal.getIndices();
  104. if (here.v) {
  105. $('#top-link').removeAttr('disabled').attr('href', `#/${here.h}`);
  106. } else {
  107. $('#top-link').removeAttr('href').attr('disabled', 'disabled');
  108. }
  109. };
  110. enterSlide();
  111. Reveal.addEventListener('slidechanged', enterSlide);
  112. });
  113. </script>
  114. </body>
  115. </html>