<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>{{ title }}</title>
    <style>
      html, body {
        box-sizing: border-box;
      }

      *, *:before, *:after {
        box-sizing: inherit;
      }

      *, *:before, *:after {
        margin: 0;
        border: 0;
        padding: 0;
        background-image: none;
      }

      body {
        background-image: linear-gradient(45deg, #808080 25%, transparent 25%),
                          linear-gradient(-45deg, #808080 25%, transparent 25%),
                          linear-gradient(45deg, transparent 75%, #808080 75%),
                          linear-gradient(-45deg, transparent 75%, #808080 75%);
        background-size: 20px 20px;
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
      }

      .container {
        display: grid;
        padding: 10px;
        grid-gap: 10px;
        grid-template-columns: auto auto auto;
      }

      .header {
        background: white;
        font-weight: bold;
        font-size: 25px;
        height: 40px;
        padding: 5px;
      }

      .description {
        grid-column: 1 / span 3;
        background: white;
        font-weight: bold;
        font-size: 18px;
        height: 30px;
        padding: 5px;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="header">Current</div>
      <div class="header">Diff</div>
      <div class="header">Reference</div>
    {%- for description, status in tests %}
      {%- if status.failure %}
      <div class="description">{{ description | join(" ⇒ ") }}</div>
      <img src="data:image/png;base64,{{ status.image }}"></img>
      <img src="data:image/png;base64,{{ status.image_diff }}"></img>
      <img src="data:image/png;base64,{{ status.reference }}"></img>
      {% endif -%}
    {% endfor -%}
    </div>
  </body>
</html>
