From a0ea0199b480f78e2e7a2e317149a152097557ce Mon Sep 17 00:00:00 2001 From: Blaise Thompson Date: Sat, 30 May 2020 06:54:02 -0500 Subject: tree --- tree-source/templates/footer.html | 10 +++ tree-source/templates/graph.dot | 31 +++++++++ tree-source/templates/graph.svg | 140 ++++++++++++++++++++++++++++++++++++++ tree-source/templates/index.html | 26 +++++++ tree-source/templates/person.html | 31 +++++++++ 5 files changed, 238 insertions(+) create mode 100644 tree-source/templates/footer.html create mode 100644 tree-source/templates/graph.dot create mode 100644 tree-source/templates/graph.svg create mode 100644 tree-source/templates/index.html create mode 100644 tree-source/templates/person.html (limited to 'tree-source/templates') diff --git a/tree-source/templates/footer.html b/tree-source/templates/footer.html new file mode 100644 index 0000000..3cc1a0e --- /dev/null +++ b/tree-source/templates/footer.html @@ -0,0 +1,10 @@ +
+ +

+built {{ date }} +{{ "\xa0" * 36 }} +CC0: no copyright +

+ + + diff --git a/tree-source/templates/graph.dot b/tree-source/templates/graph.dot new file mode 100644 index 0000000..c3c82e3 --- /dev/null +++ b/tree-source/templates/graph.dot @@ -0,0 +1,31 @@ +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 %} + +} diff --git a/tree-source/templates/graph.svg b/tree-source/templates/graph.svg new file mode 100644 index 0000000..6c2e279 --- /dev/null +++ b/tree-source/templates/graph.svg @@ -0,0 +1,140 @@ + + + + + + +G + + + +N0 + + +Blaise Jonathan Thompson + + + + + +N2 + + +David Craig Thompson + + + + + +N0--N2 + + + + +N1 + + +Nancy Jean Thompson + + + + + +N0--N1 + + + + +N6 + + +Jimmy Thompson + + + + + +N2--N6 + + + + +N5 + + +Laverna Thompson + + + + + +N2--N5 + + + + +N1--N2 + + + + +N4 + + +Roy Nielsen + + + + + +N1--N4 + + + + +N3 + + +Betty Nielsen + + + + + +N1--N3 + + + + +N7 + + +James Nielsen + + + + + +N4--N7 + + + + +N3--N4 + + + + +N3--N7 + + + + +N5--N6 + + + + diff --git a/tree-source/templates/index.html b/tree-source/templates/index.html new file mode 100644 index 0000000..551b2ee --- /dev/null +++ b/tree-source/templates/index.html @@ -0,0 +1,26 @@ + + + + + family tree index + + + + +

blaise-memories/tree

+
+ +

+This page lists all of the nodes of my family tree project. +

+ +

+{% for index, person in people.items() %} + +{{ '%03d' | format(index) }} {{ person.name }} + +
+{% endfor %} +

+ +{% include "footer.html" %} diff --git a/tree-source/templates/person.html b/tree-source/templates/person.html new file mode 100644 index 0000000..8a7d315 --- /dev/null +++ b/tree-source/templates/person.html @@ -0,0 +1,31 @@ + + + + + family tree index + + + + +

+blaise-memories/tree/{{ '%03d' | format(person.index) }} +

+
+ +

+ {{ person.name }} +

+ +

+{% if person.birthday %} birthday: {{ person.birthday }}
{% endif %} +{% if person.birthplace %} birthplace: {{ person.birthplace }}
{% endif %} +{% if person.deathday %} deathday: {{ person.deathday }}
{% endif %} +

+ +

local family tree

+ +{{ svg }} + +

all relatives

+ +{% include "footer.html" %} -- cgit v1.2.3