{% 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 %}
{% for hour in range(24) %}
{{ '%02d:00'|format(hour) }}
{% endfor %}
{% for day in days %}
{{ day.strftime('%a %d') if scope != 'daily' else day.strftime('%A') }}
{% for hour in range(24) %}
{% endfor %} {% for block in blocks %} {% if block.start.date() == day.date() %} {% set start_hour = block.start.hour + block.start.minute / 60.0 %} {% set duration_hours = block.duration / 3600.0 %} {% set top_px = start_hour * 60 %} {% set height_px = duration_hours * 60 %} {% if height_px < 2 %}{% set height_px = 2 %}{% endif %} {% set task_hash = block.task_path|hash if block.task_path else 0 %} {% set base_color_hue = task_hash % 360 %} {# Create gradient: active color on left (0% to active_ratio%), idle color on right #} {% set active_pct = (block.active_ratio * 100)|int %} {% set active_color = 'hsl(%d, 70%%, 50%%)'|format(base_color_hue) %} {% set idle_color = 'hsl(%d, 30%%, 70%%)'|format(base_color_hue) %}
{{ block.task_path }}
{{ block.start.strftime('%H:%M') }} ({{ (block.duration // 60)|int }}m)
{{ block.task_path }}
{{ block.start.strftime('%H:%M') }} - {{ block.end.strftime('%H:%M') }}
Duration: {{ (block.duration // 60)|int }} minutes
Active: {{ (block.active_seconds // 60)|int }}m ({{ active_pct }}%)
Idle: {{ (block.idle_seconds // 60)|int }}m
{% endif %} {% endfor %}
{% endfor %}
{% endblock content %}