<!DOCTYPE html>
<html>
  <head>
    <title>{{ title }}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    {% if url %}
    <meta property="og:url" content="{{ url }}" />
    {% endif %}
    <meta property="og:title" content="{{ title }}"/>
    {% if ogImage %}
    <meta property="og:image" content="{{ ogImage }}"/>
    {% if ogImageWidth %}
    <meta property="og:image:width" content="{{ ogImageWidth }}"/>
    {% endif %}
    {% if ogImageHeight %}
    <meta property="og:image:height" content="{{ ogImageHeight }}"/>
    {% endif %}
    {% endif %}
    {% if description %}
    <meta property="og:description" content="{{ description }}" />
    {% endif %}
    {% if twitter %}
    <meta name="twitter:creator" content="@{{ twitter }}"/>
    {% endif %}
    {% if ogImage %}
    <meta name="twitter:card" content="summary_large_image"/>
    <meta name="twitter:image" content="{{ ogImage }}" />
    {% endif %}
    {% if favicon %}
    <link rel="icon" href="{{ favicon }}" type="image/svg+xml" />
    {% endif %}
    {% for file in cssFiles %}
    <link rel="stylesheet" href="{{ file }}" />
    {% endfor %}
    <style type="text/css">
      {{ css | safe }}
      @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
    </style>
  </head>
  <body>
    <textarea id="source" style="display: none">{{ file.contents | safe }}</textarea>
    <div style="z-index: -1; position: fixed; display: flex; align-items: center; gap: 4px;">
      <svg style="animation: spin 1s linear infinite; width: 18px; height: 18px;" xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-refresh" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
        <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
        <path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" />
        <path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" />
      </svg>
      <span>loading...</span>
    </div>
    <script src="remark.js"></script>
    {% for file in scriptFiles %}
    <script src="{{ file }}"></script>
    {% endfor %}
    <script>
      window.slideshow = remark.create({{ remarkConfig | dump | safe }})
    </script>
    {% for file in scriptFilesAfterCreate %}
    <script src="{{ file }}"></script>
    {% endfor %}
    <script>
      {{ script | safe }}
      ;window.LiveReloadOptions = {
        host: 'localhost',
        port: '{{ livereloadPort }}'
      };
    </script>
  </body>
</html>
