<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Data Template</title>
  <style>
  * { box-sizing: border-box; }
  body { margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
  .table-right td, .table-right th {
    text-align: right;
    border-bottom: 1px solid #ccc;
  }
  pre { background-color: #333; color: #fff; padding: 8px; }
  .filter { background-color: #fcd; border-radius: 4px; padding: 4px 8px; }
  </style>
</head>
<body>
  <h1>Data</h1>
  <p>Showing {{ len(data) }} rows
    {% if handler.query.get('_count') %}
      out of {{ count }}
    {% end %}
    {% if handler.query.get('_offset') %}
      starting from {{ handler.query['_offset'] }}
    {% end %}
  </p>
  <p>
    {% for where in handler.query['_wheres'] or [] %}
      <span class="filter">{{ where }}</span>
    {% end %}
  </p>
  {% raw data.to_html(index=False, classes='table-right data', na_rep='') %}

  <h2>Configuration</h2>
  {% import yaml %}
  <pre>{{ yaml.dump(handler.kwargs, default_flow_style=False) }}</pre>

  <script>
  document.querySelector('.data').removeAttribute('border')
  </script>
</body>
</html>
<!-- Comment for tests/test_datahandler.py -->
