<!DOCTYPE html>
<html>
  <head>
    <style>
      table {
        width: 100%;
        border-collapse: collapse;
      }
      th {
        border: 1px solid black;
        padding: 15px;
        text-align: center;
        font-size: large;
        background-color: #dddddd;
      }
      td {
        border: 1px solid black;
        height: 1000px;
        vertical-align: top;
        padding: 5px;
        background-color: #f8f8f8;
      }
      .holiday {
        background-color: #ff9999; /* For holidays - Red */
      }
      .saturday {
        background-color: #99ccff; /* For Saturday - Blue */
      }
      .sunday {
        background-color: #99ff99; /* For Sunday - Green */
      }
      h2 {
        font-size: 32px;
      }
      h2:not(:first-of-type) {
        page-break-before: always;
      }
      .logo {
                position: absolute;
                top: 0px;
                right: 10px;
                height: 65px;
      }
    </style>
  </head>
  <body>
    {% if logo %}<img class="logo" src="{{ logo }}" alt="Logo">{% endif %}
    <h2>Day Planner</h2>
    <table>
      <tr>
        <th class="{% if day.holiday %}holiday{% elif day.is_weekend and day.day == 'Saturday' %}saturday{% elif day.is_weekend and day.day == 'Sunday' %}sunday{% endif %}">
          {{ day.day }}
          <br />
          {{ day.date }}
        </th>
      </tr>
      <tr>
        <td>
          {% if day.holiday %}<b>{{ day.holiday }}</b>{% endif %}
        </td>
      </tr>
    </table>
  </body>
</html>
