diff --git a/templates/partials/page/calendar.html b/templates/partials/page/calendar.html index 84a0914..7510ad2 100644 --- a/templates/partials/page/calendar.html +++ b/templates/partials/page/calendar.html @@ -37,132 +37,140 @@ person['PersonName']}} - - - - {% if selected_view == 'month' %} -
-
- -
- - Sun -
-
- - Mon -
-
- - Tue -
-
- - Wed -
-
- - Thu -
-
- - Fri -
-
- - Sat -
-
- -
- - {% for i in range((end_date-start_date).days + 1) %} - {% set date = start_date + timedelta(days=i) %} - {% set workout = - get_first_element_from_list_with_matching_attribute(person['Workouts'], - 'StartDate', - date) %} -
-
- {{ date.day }} -
-
- {% if workout['TopSets']|length > 0 %} - {% for topset in workout['TopSets'] %} - - {% endfor %} - {% endif %} -
-
- {% endfor %} - -
-
- {% elif selected_view == 'year'%} -
- -
- {% for i in range(12) %} - {% set date = start_date + relativedelta(months=i) %} - {% set first_day_of_month = date.replace(day=1) %} - {% set last_day_of_month = date + relativedelta(day=31) %} - {% set (first_day, last_day) = first_and_last_visible_days_in_month(first_day_of_month, last_day_of_month) - %} -
-
+ +
- {% endfor %} +
+
+
+{% if selected_view == 'month' %} +
+
+ +
+ + Sun +
+
+ + Mon +
+
+ + Tue +
+
+ + Wed +
+
+ + Thu +
+
+ + Fri +
+
+ + Sat
- {% endif %} + +
+ + {% for i in range((end_date-start_date).days + 1) %} + {% set date = start_date + timedelta(days=i) %} + {% set workout = + get_first_element_from_list_with_matching_attribute(person['Workouts'], + 'StartDate', + date) %} +
+
+ {{ date.day }} +
+
+ {% if workout['TopSets']|length > 0 %} + {% for topset in workout['TopSets'] %} + + {% endfor %} + {% endif %} +
+
+ {% endfor %} + +
+
+{% elif selected_view == 'year'%} +
+ +
+ {% for i in range(12) %} + {% set date = start_date + relativedelta(months=i) %} + {% set first_day_of_month = date.replace(day=1) %} + {% set last_day_of_month = date + relativedelta(day=31) %} + {% set (first_day, last_day) = first_and_last_visible_days_in_month(first_day_of_month, last_day_of_month) + %} +
+
{{ + strftime(first_day_of_month, '%B %Y') }} +
+
+
+
S
+
M
+
T
+
W
+
T
+
F
+
S
+
+ +
+ {% for i in range((last_day-first_day).days + 1) %} + {% set day_date = first_day + timedelta(days=i) %} + {% set workout = + get_first_element_from_list_with_matching_attribute(person['Workouts'], + 'StartDate', + day_date) %} + {% set is_in_month = day_date.month == first_day_of_month.month%} +
+ {% if is_in_month %} + {{ day_date.day }} {% endif %}
+ {% endfor %} +
+
+
+ + {% endfor %} + +
+
+{% endif %} {{ render_partial('partials/stats.html', stats=person['Stats']) }} diff --git a/templates/partials/page/person.html b/templates/partials/page/person.html index c52e6bf..52d08d4 100644 --- a/templates/partials/page/person.html +++ b/templates/partials/page/person.html @@ -11,14 +11,19 @@ List of workouts
- +
+ + +