<!doctype html>
<html lang="en">
  <head>
    <title>djaTeX Error Page</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <style type="text/css">
      div.output, div.source {
      background-color: #f0f0f0;
      border-radius: 10px;
      padding: 10px;
      margin: 0;
      }
    </style>
  </head>
  <body>
    {% if stage == 'latex' %}
    <h1>LaTeX Error</h1>
    <p> There were errors in the LaTeX produced by the template for this page. </p>
    <h2>LaTeX Output</h2>
    <div class="output">
      {% for line in output %}
      {{ line }}</br>
      {% endfor %}
    </div>
    <h2>LaTeX Source</h2>
    <div class="source">
      <ol>
        {% for line in source %}
        <li>{{ line }}</li>
        {% endfor %}
      </ol>
    </div>
    <h2>LaTeX Log</h2>
    <div class="source">
      <ol>
        {% for line in log %}
        <li>{{ line }}</li>
        {% endfor %}
      </ol>
    </div>
    {% elif stage == 'bibtex' %}
    <h1>BibTeX Error</h1>
    <p> There were errors in the BibTeX produced by the template for this page. </p>
    <h2>BibTeX Output</h2>
    <div class="output">
      {% for line in output %}
      {{ line }}</br>
      {% endfor %}
    </div>
    <h2>BibTeX Source</h2>
    <div class="source">
      <ol>
        {% for line in source %}
        <li>{{ line }}</li>
        {% endfor %}
      </ol>
    </div>
    {% else %}
    <h1>No Errors</h1>
    <p> All is well. </p>
    {% endif %}
  </body>
</html>
