ltx/.lifetracker-python/templates/table2.html

56 lines
1.8 KiB
HTML

{% extends "layout.html" %}
{% block content %}
<h2>
{{ days[0].date.strftime("%h %d") }}
&ndash;
{{ days[-1].date.strftime("%h %d") }}
</h2>
<div id="table">
<div class="cell upcase">Date</div>
<div class="cell upcase">Day</div>
{% for m in ["am", "pm"]%}
{% for t in [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] %}
{% if now.strftime("%P") == m and now.strftime("%l").strip() == "{}".format(t) %}
<div class="now cell upcase">
{% else %}
<div class="cell upcase">
{% endif %}
{{t}} {{m}}
</div>
{% endfor %}
{% endfor %}
<div class="cell">Mood</div>
<div class="cell">Comments</div>
{%for day in days%}
{% if day.date.strftime("%x") == now.strftime("%x") %}
<div class="now">
{% else %}
<div>
{% endif %}
{{day.date.strftime("%m/%d")}}
</div>
{% if day.date.strftime("%x") == now.strftime("%x") %}
<div class="now">
{% else %}
<div>
{% endif %}
{{day.date.strftime("%a").upper()}}
</div>
{%for hour in day.hours%}
<div class="activity-{{hour.activity.code}}"
hx-get="/get-activity-form/{{hour.hour_id}}">
{% if hour.activity.code != -1 %}
{{hour.activity.code}}
{% endif %}
</div>
{% endfor %}
<div class="cell">{{day.mood}}</div>
<div class="day-note">{{day.note}}</div>
{%endfor%}
</div>
{% endblock %}