<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!-- Page description -->
    {% if page.meta and page.meta.description %}
        <meta name="description" content="{{ page.meta.description }}" />
    {% elif config.site_description %}
        <meta name="description" content="{{ config.site_description }}" />
    {% endif %}

    <!-- Page author -->
    {% if page.meta and page.meta.author %}
        <meta name="author" content="{{ page.meta.author }}" />
    {% elif config.site_author %}
        <meta name="author" content="{{ config.site_author }}" />
    {% endif %}

    <!-- Canonical -->
    {% if page.canonical_url %}
        <link rel="canonical" href="{{ page.canonical_url }}" />
    {% endif %}

    <!-- Favicon -->
    <link rel="icon" href="{{ config.theme.favicon | url }}" />

    <!-- Site title -->
    {% block htmltitle %}
      {% if page.meta and page.meta.title %}
        <title>{{ page.meta.title }} - {{ config.site_name }}</title>
      {% elif page.title and not page.is_homepage %}
        <title>{{ page.title | striptags }} - {{ config.site_name }}</title>
      {% else %}
        <title>{{ config.site_name }}</title>
      {% endif %}
    {% endblock %}

    {% block styles %}
        <link rel="stylesheet" href="https://unpkg.com/katex@0/dist/katex.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/reveal.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/reset.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/plugin/highlight/monokai.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/theme/white.min.css">
        <link rel="stylesheet" href="{{'stylesheets/slides.css' | url}}">
    {% endblock %}

    <!-- Meta tags from front matter or plugins -->
    {% if page.meta and page.meta.meta %}
      {% for tag in page.meta.meta %}
        <meta
          {% for key, value in tag.items() %}
            {{ key }}="{{value}}"
          {% endfor %}
        />
      {% endfor %}
    {% endif %}

</head>

<body>

    {% block content %}
    <div class="reveal">
      <div class="slides">
        <section data-markdown
                 data-separator="^\n---\n$"
                 data-separator-vertical="^\n--\n$"
                 data-notes="^Note:">
          <script type="text/template">
            {{ page.markdown }}
          </script>
        </section>
      </div>
    </div>
    {% endblock %}

    {% block scripts %}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/reveal.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/plugin/markdown/markdown.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/plugin/notes/notes.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/plugin/zoom/zoom.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/plugin/math/math.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/plugin/highlight/highlight.min.js"></script>
    {% endblock %}

    {% block reveal_script %}
        <script>
          // Full list of configuration options available here:
          // https://github.com/hakimel/reveal.js#configuration
          Reveal.initialize({
            controls: true,
            progress: true,
            history: true,
            center: true,
            hash: true,

            transition: 'default', // default/cube/page/concave/zoom/linear/fade/none
            // Learn about plugins: https://revealjs.com/plugins/
            plugins: [ RevealMarkdown, RevealNotes, RevealZoom, RevealMath, RevealHighlight ]
          });
        </script>
    {% endblock %}

</body>
</html>
