{% extends "base.html" %}
{% block content %}
<div class="page">
  {% include "partials/month_nav.html" %}
  <div class="back-link-row">
    <a class="back-link" href="/">Back to Budget &rsaquo;</a>
  </div>

  {% include "partials/month_zero.html" %}

  {% for g in groups %}
    <details class="group" id="group-{{ g.group.value }}"{% if g.default_open %} open{% endif %}>
      <summary>
        <span class="chevron" aria-hidden="true"></span>
        <span class="group-name">{{ g.label }}</span>
        <span class="group-total" id="group-total-{{ g.group.value }}">
          <span class="applied">${{ '{:,.2f}'.format(g.total_applied) }}</span>
          <span class="divider">/</span>
          <span class="planned">${{ '{:,.2f}'.format(g.total_planned) }}</span>
        </span>
      </summary>
      {% for section in g.sections %}
        {% include "partials/month_section.html" %}
        {% if g.group.value == 'committed' and section.section.value == 'debt_minimum' %}
          {% include "partials/month_target.html" %}
        {% endif %}
      {% endfor %}
    </details>
  {% endfor %}

  <footer class="colophon">
    the art of giving every dollar a job
    <div class="signoff">Quartermaster &middot; {{ year_month }}</div>
  </footer>
</div>
{% endblock %}
