{% extends 'base.html' %} {% block content %}
{% if view == 'month' %}

{{ date | strftime('%B, %Y') }}

{% else %}

{{ date | strftime('%Y') }}

{% endif %} {{ person_name }}
{{ render_partial('partials/custom_select.html', name='view', options=[ {'id': 'month', 'name': 'Month', 'selected': (view == 'month')}, {'id': 'year', 'name': 'Year', 'selected': (view == 'year')}, {'id': 'notes', 'name': 'Notes', 'selected': (view == 'notes')}, {'id': 'overview', 'name': 'Overview', 'selected': (view == 'overview')} ], multiple=false, search=false, placeholder='View', hx_get=url_for('calendar.get_calendar', person_id=person_id), hx_target='#container', hx_vals='{"date": "' + date.strftime('%Y-%m-%d') + '"}', hx_push_url=true) }}
{% if view == 'month' %}
Sun
Mon
Tue
Wed
Thu
Fri
Sat
{% for day in days %}
{{ day.day }}
{% for workout in day.workouts %}
{% for set in workout.sets %} {% endfor %}
{% endfor %}
{% endfor %}
{% elif view == 'year'%}
{% for month in months %}
{{ month.first_day_of_month | strftime('%B') }}
S
M
T
W
T
F
S
{% for day in month.days %}
{% if day.is_in_current_month %} {{ day.day }} {% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endblock %} {% block add_workout_button %} {% endblock %}