<!doctype html>
<html lang="en">

  <head>
    <!-- Metadata about the presentation -->
    <meta charset="utf-8">

    <title>{{ meta.title }}</title>

    <meta name="description" content="{{ meta.description }}">
    <meta name="author" content="{{ meta.author }}">

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

    <!-- Presentation Styles -->
    <link rel="stylesheet" href="{{ url_for('static', filename='css/reveal.css') }}">
    <link rel="stylesheet" href="{{ theme }}" id="theme">

    <!-- For syntax highlighting -->
    <link rel="stylesheet" href="{{ url_for('static', filename='lib/css/zenburn.css') }}">

    <!-- Printing and PDF exports -->
    <script>
      var link = document.createElement( 'link' );
      link.rel = 'stylesheet';
      link.type = 'text/css';
      link.href = window.location.search.match( /print-pdf/gi ) ? "{{ url_for('static', filename='css/print/pdf.css') }}" : "{{ url_for('static', filename='css/print/paper.css') }}";
      document.getElementsByTagName( 'head' )[0].appendChild( link );
    </script>

    <!--[if lt IE 9]>
    <script src="{{ url_for('static', filename='lib/js/html5shiv.js') }}"></script>
    <![endif]-->
  </head>

  <body>
    <!-- Presentation body -->
    <div class="reveal">

      <!-- Any section element inside of this container is displayed as a slide -->
      <div class="slides">
        {% for slide in slides %}
          <section data-markdown>
            <script type="text/template">
              {{ slide|safe }}
            </script>
          </section>
        {% endfor %}
      </div>

    </div>

    <!-- Scripts loaded after the content -->
    <script src="{{ url_for('static', filename='lib/js/head.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/reveal.js') }}"></script>

    <script>
      // Full list of configuration options available here:
      // https://github.com/hakimel/reveal.js#configuration
      Reveal.initialize({
        {% for config_name, value in config.items() %}
          {% if value == true %}
            {{ config_name }}: true,
          {% elif value == false %}
            {{ config_name }}: false,
          {% elif value is number %}
            {{ config_name }}: {{ value }},
          {% else %}
            {{ config_name }}: '{{ value }}',
          {% endif %}
        {% endfor %}

        // Optional libraries used to extend on reveal.js
        dependencies: [
          { src: '{{ url_for("static", filename="lib/js/classList.js") }}', condition: function() { return !document.body.classList; } },
          { src: '{{ url_for("static", filename="plugin/markdown/marked.js") }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
          { src: '{{ url_for("static", filename="plugin/markdown/markdown.js") }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
          { src: '{{ url_for("static", filename="plugin/highlight/highlight.js") }}', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
          { src: '{{ url_for("static", filename="plugin/zoom-js/zoom.js") }}', async: true },
          { src: '{{ url_for("static", filename="plugin/notes/notes.js") }}', async: true }
        ]
      });
    </script>

  </body>
</html>
