graph G { graph [bgcolor="#1d1f21"]; node [shape="box", color="#c5c8c6", fontcolor="#c5c8c6"]; {% for node in nodes %} {% if node.person == person %} N{{ node.person.index }} [label="{{ node.person.name }}", URL="http://memories.blaise.zone/tree/{{ '%03d' | format(node.person.index) }}/", fillcolor="#c5c8c6", style="filled", fontcolor="#1d1f21"]; {% else %} N{{ node.person.index }} [label="{{ node.person.name }}", URL="../{{ '%03d' | format(node.person.index) }}"]; {% endif %} {% endfor %} {% for node in nodes %} {% if node.level == max_level %} { rank=source N{{ node.person.index }} } {% elif node.level == min_level %} { rank=max N{{ node.person.index }} } {% endif %} {% endfor %} {% for edge in edges %} N{{ edge.a }} -- N{{ edge.b }} [color="{{ edge.relationship }}"]; {% endfor %} {% for edge in edges %} {% if edge.relationship == "#b5db68" %} { rank=same N{{ edge.a }} N{{ edge.b }} } {% endif %} {% endfor %} }