{% extends 'layout.html' %} {% block head %} {% endblock head %} {% block content %}
{% if scope == 'daily' %} {{ base_date.strftime('%Y-%m-%d %A') }} {% elif scope == 'weekly' %} Week of {{ start.strftime('%Y-%m-%d') }} {% elif scope == 'monthly' %} {{ base_date.strftime('%B %Y') }} {% endif %}
Total Switches: {{ switches|length }}
Total Time: {{ (switches|sum(attribute='delta') // 3600)|int }}h {{ ((switches|sum(attribute='delta') % 3600) // 60)|int }}m

All Switches ({{ switches|length }})

{% for switch in switches %} {% set is_active = switch.workspace in ['Plan', 'Think', 'Work'] %} {% set task_hash = switch.task_path|hash if switch.task_path else 0 %} {% set border_hue = task_hash % 360 %} {% set border_color = 'hsl(%d, 70%%, 50%%)'|format(border_hue) %} {% set bg_color = 'hsl(%d, 70%%, 95%%)'|format(border_hue) %}
{{ switch.date.strftime('%m/%d %H:%M:%S') }}
{{ switch.workspace }}
{{ switch.task_path }}
{% if switch.delta >= 3600 %} {{ (switch.delta // 3600)|int }}h {{ ((switch.delta % 3600) // 60)|int }}m {% else %} {{ (switch.delta // 60)|int }}m {{ (switch.delta % 60)|int }}s {% endif %}
{% endfor %}
{% if not switches %}

No switches in this period

{% endif %} {% endblock content %}