<html>
  <head>
    <title>pycobertura report</title>
    <meta charset="UTF-8">
    <style>
{% include 'normalize.css' %}
{% include 'skeleton.css' %}
.red {color: red}
.green {color: green}
.hit {background-color: #EAFFEA}
.miss {background-color: #FFECEC}
.container .code {margin-left: 0}
pre {line-height: 1.3}
    </style>
  </head>
  <body>
    <div class="container">
      <table class="u-full-width">
        <thead>
          <tr>
            <th>Name</th>
            <th>Stmts</th>
            <th>Miss</th>
            <th>Cover</th>
{%- if show_source %}
            <th>Missing</th>
{%- endif %}
          </tr>
        </thead>
        <tbody>
{%- for line in lines %}
          <tr>
            <td><a href="#{{ line.class_name }}">{{ line.class_name }}</a></td>
            <td>{{ line.total_statements }}</td>
            <td><span{% if line.total_misses != '-' %} class="{% if line.total_misses[0] == '+' %}red{% else %}green{% endif%}"{% endif %}>{{ line.total_misses }}</span></td>
            <td>{{ line.line_rate }}</td>
{%- if show_source %}
            <td>
{%- for missed_line in line.missed_lines %}
            {%- if not loop.first %}, {% endif %}<span class="{% if missed_line[0] == '+' %}red{% else %}green{% endif %}">{{ missed_line }}</span>
{%- endfor %}
            </td>
{%- endif %}
          </tr>
{%- endfor %}
        </tbody>
        <tfoot>
          <tr>
            <td>{{ footer.class_name }}</td>
            <td>{{ footer.total_statements }}</td>
            <td><span{% if footer.total_misses != '-' %} class="{% if footer.total_misses[0] == '+' %}red{% else %}green{% endif%}"{% endif %}>{{ footer.total_misses }}</span></td>
            <td>{{ footer.line_rate }}</td>
{%- if show_source %}
            <td></td>
{%- endif %}
          </tr>
        </tfoot>
      </table>
{%- if show_source %}
{%- from 'macro.source.jinja2' import render_source -%}

{%- for class_name, filename, source_hunks in sources %}
<h4 id="{{class_name}}">{{ class_name }}</h4>
{%- for hunk in source_hunks %}
{{ render_source(hunk) }}
{%- endfor %}
{%- endfor %}
{%- endif %}
    </div>
  </body>
</html>
