Source

Feast-Dates Python / feast_dates / dates.html

Full commit
<!DOCTYPE HTML>
<html>
  <head>
    <title>Feast Dates: {{query}}</title>
    <link type="text/css" rel="stylesheet" href="/css/main.css" />

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" ></script>
    <script language="javascript" src="/js/dates-page.js"></script>
  </head>
  <body>
    <h1>Interesting years for {{query}}</h1>
    {% if not dates_found %}
      <h2>Sorry, no dates found.</h2>
    {% else %}
    
      <div id="filters">
        <div id="types">
          <h2>Filter Types</h2>
          <ul>
            {% for type in types %}
              <li><input type="checkbox" name="types" value="{{type}}" id="type_{{type}}" checked /><label for="type_{{type}}">{{type}}</label></li>
            {% endfor %}
          </ul>
        </div>

        <div id="names">
          <h2>Filter Names</h2>
          <ul>
            {% for name in names %}
              <li>
                <input type="checkbox" name="names" value="{{name|slugify}}"
                  id="name_{{name|slugify}}" checked />
                <label for="name_{{name|slugify}}">{{name}}</label>
              </li>
            {% endfor %}
          </ul>
        </div>
      </div>

      <table id="dates">
        <tr>
          <th scope="col">Year</th>
          <th scope="col">Type</th>
          <th scope="col">Day</th>
          <th scope="col">Color</th>
        </tr>
        {% for day in dates %}
          <tr data-type="{{day.type|slugify}}" data-name="{{day.name|slugify}}" 
              class="{{day.type}} {{day.name|slugify}}" >
            <th scope="row">{{day.year}}</td>
            <td>{{day.type}}</td>
            <td>{{day.name}}</td>
            <td>{{day.color}}</td>
          </tr>
        {% endfor %}
      </table>
    {% endif %}
  </body>
</html>