{#- Course-structure figure, driven by `criteria.course` in data/criteria.yaml. Phases tile weeks 1..total_weeks left→right; each phase's share of the width is its `weeks` span, so you can rebalance the course without touching the SVG. Assessment markers (point or span) are positioned by week number so they always line up with the band beneath them. -#} {%- set co = criteria.course -%} {%- set X0 = 16 -%}{%- set X1 = 704 -%}{%- set W = X1 - X0 -%} {%- set gap = co.phase_gap | default(3) -%} {%- set fills = co.fills or ['#dbe7f4', '#aac6e4', '#7ba3d0', '#4a86c8', '#0f3f73'] -%} {%- set total = co.total_weeks -%} {%- macro edge(week) -%}{{ (X0 + (week / total) * W) | round(1) }}{%- endmacro -%} {%- macro wk_x(week) -%}{{ (X0 + (week - 0.5) / total * W) | round(1) }}{%- endmacro -%} {%- set ns = namespace(cum=0, segs=[]) -%} {%- for p in co.phases -%} {%- set s0 = edge(ns.cum) | float -%} {%- set ns.cum = ns.cum + p.weeks -%} {%- set s1 = edge(ns.cum) | float -%} {%- set _ = ns.segs.append({'p': p, 's0': s0, 's1': (s1 - gap) if not loop.last else s1}) -%} {%- endfor -%}

{{ co.caption }}

{%- for s in ns.segs %} {%- set cx = ((s.s0 + s.s1) / 2) | round(1) %} {{ s.p.label }}{{ s.p.sublabel }} {%- endfor %} {%- for s in ns.segs %} {{ s.p.title }} {%- endfor %} {%- for week in range(1, total + 1) %} {{ "wk 1" if week == 1 else week }} {%- endfor %} {%- for a in co.assessments %} {%- if a.type == 'point' %} {%- set cx = wk_x(a.week) | float %} {{ a.week_label }} — {{ a.text }} {%- else %} {%- set sx = edge(a.week_start - 1) | float %} {%- set ex = edge(a.week_end) | float %} {{ a.week_label }} — {{ a.text }} {%- endif %} {%- endfor %}