{#- Cross-School collaboration arc, driven by `criteria.schools` in data/criteria.yaml. The applicant sits in the hub; each UNSW Science School named in the Cluster advertisement is placed on an elliptical arc above it, with the concrete joint capability underneath the School's name. Node angles are spread evenly across the arc and computed from how many Schools you list (via the `sin`/`cos` filters registered in build.py), and the box height grows to fit the longest wrapped label — add / remove / reorder Schools freely and never edit the SVG. `host: true` marks the nominated host School, which is drawn filled with a tag above it. -#} {%- set sc = criteria.schools -%} {%- set WIDTH = 720 -%}{%- set CX = WIDTH / 2 -%} {%- set RX = sc.radius_x | default(250) -%} {%- set RY = sc.radius_y | default(178) -%} {%- set BOX_W = sc.box_width | default(168) -%} {%- set HUB_W = sc.hub_width | default(200) -%} {%- set HUB_H = sc.hub_height | default(48) -%} {%- set HEAD_WRAP = sc.heading_wrap | default(22) -%} {%- set SUB_WRAP = sc.subtext_wrap | default(32) -%} {%- set HEAD_LH = 11 -%}{%- set SUB_LH = 10 -%} {%- set HEAD_TOP = 14 -%}{%- set HEAD_SUB_GAP = 12 -%}{%- set BOX_PAD = 8 -%} {%- set nodes = sc.nodes or [] -%} {%- set n = nodes | length -%} {#- tallest label pair sets the box height for every node -#} {%- set ns = namespace(max_head=1, max_sub=1) -%} {%- for nd in nodes %} {%- set hl = (nd.name | wordwrap(HEAD_WRAP, break_long_words=False)).split('\n') %} {%- set sl = (nd.theme | wordwrap(SUB_WRAP, break_long_words=False)).split('\n') %} {%- if hl | length > ns.max_head %}{%- set ns.max_head = hl | length %}{%- endif %} {%- if sl | length > ns.max_sub %}{%- set ns.max_sub = sl | length %}{%- endif %} {%- endfor %} {%- set BOX_H = HEAD_TOP + (ns.max_head - 1) * HEAD_LH + HEAD_SUB_GAP + (ns.max_sub - 1) * SUB_LH + BOX_PAD -%} {%- set TAG_H = 12 -%} {%- set TOP_PAD = TAG_H + 6 -%} {%- set HUB_CY = RY + BOX_H / 2 + TOP_PAD -%} {%- set height = HUB_CY + ([BOX_H / 2, HUB_H / 2] | max) + 10 -%} {#- pre-compute every node's centre so edges can be drawn before the boxes -#} {%- set pos = namespace(list=[]) -%} {%- for nd in nodes -%} {%- set ang = 180 - (loop.index0 * 180 / ((n - 1) if n > 1 else 1)) -%} {%- set _ = pos.list.append({ 'nd': nd, 'cx': CX + RX * (ang | cos), 'cy': HUB_CY - RY * (ang | sin)}) -%} {%- endfor -%}

{{ sc.caption }}

{%- for p in pos.list %} {%- endfor %} {%- for p in pos.list %} {%- set nd = p.nd %} {%- set bx = p.cx - BOX_W / 2 %} {%- set by = p.cy - BOX_H / 2 %} {%- set hl = (nd.name | wordwrap(HEAD_WRAP, break_long_words=False)).split('\n') %} {%- set sl = (nd.theme | wordwrap(SUB_WRAP, break_long_words=False)).split('\n') %} {%- set content_h = HEAD_TOP + (hl | length - 1) * HEAD_LH + HEAD_SUB_GAP + (sl | length - 1) * SUB_LH + BOX_PAD %} {%- set voff = (BOX_H - content_h) / 2 %} {%- set tx = (bx + 10) | round(1) %} {%- if nd.host %} {%- set tagw = (sc.host_tag | default('HOST SCHOOL') | length) * 4.6 + 12 %} {{ sc.host_tag | default('HOST SCHOOL') }} {%- endif %} {{ nd.title or nd.name }} {%- for line in hl %}{{ line }}{%- endfor %} {%- for line in sl %}{{ line }}{%- endfor %} {%- endfor %} {{ sc.hub.title }} {{ sc.hub.name }} {{ sc.hub.subtitle }}