summaryrefslogtreecommitdiff
path: root/tree-source/templates
diff options
context:
space:
mode:
Diffstat (limited to 'tree-source/templates')
-rw-r--r--tree-source/templates/footer.html10
-rw-r--r--tree-source/templates/graph.dot31
-rw-r--r--tree-source/templates/graph.svg140
-rw-r--r--tree-source/templates/index.html26
-rw-r--r--tree-source/templates/person.html31
5 files changed, 238 insertions, 0 deletions
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 @@
+<hr>
+
+<p>
+built {{ date }}
+{{ "\xa0" * 36 }}
+<a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a>: no copyright
+</p>
+
+</body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.43.0 (0)
+ -->
+<!-- Title: G Pages: 1 -->
+<svg width="622pt" height="188pt"
+ viewBox="0.00 0.00 622.00 188.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 184)">
+<title>G</title>
+<polygon fill="#1d1f21" stroke="transparent" points="-4,4 -4,-184 618,-184 618,4 -4,4"/>
+<!-- N0 -->
+<g id="node1" class="node">
+<title>N0</title>
+<g id="a_node1"><a xlink:href="http://memories.blaise.zone/tree/000/" xlink:title="Blaise Jonathan Thompson">
+<polygon fill="#c5c8c6" stroke="#c5c8c6" points="416,-108 210,-108 210,-72 416,-72 416,-108"/>
+<text text-anchor="middle" x="313" y="-86.3" font-family="Times,serif" font-size="14.00" fill="#1d1f21">Blaise Jonathan Thompson</text>
+</a>
+</g>
+</g>
+<!-- N2 -->
+<g id="node2" class="node">
+<title>N2</title>
+<g id="a_node2"><a xlink:href="../002" xlink:title="David Craig Thompson">
+<polygon fill="none" stroke="#c5c8c6" points="526.5,-36 347.5,-36 347.5,0 526.5,0 526.5,-36"/>
+<text text-anchor="middle" x="437" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#c5c8c6">David Craig Thompson</text>
+</a>
+</g>
+</g>
+<!-- N0&#45;&#45;N2 -->
+<g id="edge2" class="edge">
+<title>N0&#45;&#45;N2</title>
+<path fill="none" stroke="#de935f" d="M381.75,-71.83C381.75,-61 381.75,-47.29 381.75,-36.41"/>
+</g>
+<!-- N1 -->
+<g id="node3" class="node">
+<title>N1</title>
+<g id="a_node3"><a xlink:href="../001" xlink:title="Nancy Jean Thompson">
+<polygon fill="none" stroke="#c5c8c6" points="327.5,-36 152.5,-36 152.5,0 327.5,0 327.5,-36"/>
+<text text-anchor="middle" x="240" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#c5c8c6">Nancy Jean Thompson</text>
+</a>
+</g>
+</g>
+<!-- N0&#45;&#45;N1 -->
+<g id="edge1" class="edge">
+<title>N0&#45;&#45;N1</title>
+<path fill="none" stroke="#de935f" d="M268.75,-71.83C268.75,-61 268.75,-47.29 268.75,-36.41"/>
+</g>
+<!-- N6 -->
+<g id="node6" class="node">
+<title>N6</title>
+<g id="a_node6"><a xlink:href="../006" xlink:title="Jimmy Thompson">
+<polygon fill="none" stroke="#c5c8c6" points="614,-180 474,-180 474,-144 614,-144 614,-180"/>
+<text text-anchor="middle" x="544" y="-158.3" font-family="Times,serif" font-size="14.00" fill="#c5c8c6">Jimmy Thompson</text>
+</a>
+</g>
+</g>
+<!-- N2&#45;&#45;N6 -->
+<g id="edge7" class="edge">
+<title>N2&#45;&#45;N6</title>
+<path fill="none" stroke="#de935f" d="M500.25,-36.24C500.25,-63.94 500.25,-116.3 500.25,-143.91"/>
+</g>
+<!-- N5 -->
+<g id="node7" class="node">
+<title>N5</title>
+<g id="a_node7"><a xlink:href="../005" xlink:title="Laverna Thompson">
+<polygon fill="none" stroke="#c5c8c6" points="456,-180 304,-180 304,-144 456,-144 456,-180"/>
+<text text-anchor="middle" x="380" y="-158.3" font-family="Times,serif" font-size="14.00" fill="#c5c8c6">Laverna Thompson</text>
+</a>
+</g>
+</g>
+<!-- N2&#45;&#45;N5 -->
+<g id="edge6" class="edge">
+<title>N2&#45;&#45;N5</title>
+<path fill="none" stroke="#de935f" d="M436,-36.24C436,-63.94 436,-116.3 436,-143.91"/>
+</g>
+<!-- N1&#45;&#45;N2 -->
+<g id="edge5" class="edge">
+<title>N1&#45;&#45;N2</title>
+<path fill="none" stroke="#b5db68" d="M327.55,-18C334.13,-18 340.77,-18 347.36,-18"/>
+</g>
+<!-- N4 -->
+<g id="node4" class="node">
+<title>N4</title>
+<g id="a_node4"><a xlink:href="../004" xlink:title="Roy Nielsen">
+<polygon fill="none" stroke="#c5c8c6" points="234,-180 132,-180 132,-144 234,-144 234,-180"/>
+<text text-anchor="middle" x="183" y="-158.3" font-family="Times,serif" font-size="14.00" fill="#c5c8c6">Roy Nielsen</text>
+</a>
+</g>
+</g>
+<!-- N1&#45;&#45;N4 -->
+<g id="edge4" class="edge">
+<title>N1&#45;&#45;N4</title>
+<path fill="none" stroke="#de935f" d="M171.67,-36.24C171.67,-63.94 171.67,-116.3 171.67,-143.91"/>
+</g>
+<!-- N3 -->
+<g id="node5" class="node">
+<title>N3</title>
+<g id="a_node5"><a xlink:href="../003" xlink:title="Betty Nielsen">
+<polygon fill="none" stroke="#c5c8c6" points="114,-180 0,-180 0,-144 114,-144 114,-180"/>
+<text text-anchor="middle" x="57" y="-158.3" font-family="Times,serif" font-size="14.00" fill="#c5c8c6">Betty Nielsen</text>
+</a>
+</g>
+</g>
+<!-- N1&#45;&#45;N3 -->
+<g id="edge3" class="edge">
+<title>N1&#45;&#45;N3</title>
+<path fill="none" stroke="#de935f" d="M190.83,-36.42C190.83,-45.28 190.83,-54 190.83,-54 190.83,-54 80,-54 80,-54 80,-54 80,-112.87 80,-143.68"/>
+</g>
+<!-- N7 -->
+<g id="node8" class="node">
+<title>N7</title>
+<g id="a_node8"><a xlink:href="../007" xlink:title="James Nielsen">
+<polygon fill="none" stroke="#c5c8c6" points="130,-36 12,-36 12,0 130,0 130,-36"/>
+<text text-anchor="middle" x="71" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#c5c8c6">James Nielsen</text>
+</a>
+</g>
+</g>
+<!-- N4&#45;&#45;N7 -->
+<g id="edge10" class="edge">
+<title>N4&#45;&#45;N7</title>
+<path fill="none" stroke="#de935f" d="M131.8,-156C125.93,-156 122,-156 122,-156 122,-156 122,-73.45 122,-36.04"/>
+</g>
+<!-- N3&#45;&#45;N4 -->
+<g id="edge9" class="edge">
+<title>N3&#45;&#45;N4</title>
+<path fill="none" stroke="#b5db68" d="M114.1,-168C119.96,-168 125.89,-168 131.68,-168"/>
+</g>
+<!-- N3&#45;&#45;N7 -->
+<g id="edge8" class="edge">
+<title>N3&#45;&#45;N7</title>
+<path fill="none" stroke="#de935f" d="M46,-143.76C46,-116.06 46,-63.7 46,-36.09"/>
+</g>
+<!-- N5&#45;&#45;N6 -->
+<g id="edge11" class="edge">
+<title>N5&#45;&#45;N6</title>
+<path fill="none" stroke="#b5db68" d="M456.24,-162C462.09,-162 467.99,-162 473.8,-162"/>
+</g>
+</g>
+</svg>
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 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" name="viewport" content="width=80ch">
+ <title>family tree index</title>
+ <link rel="stylesheet" href="../style.css">
+</head>
+<body>
+
+<h1><a href="http://blaise.zone">blaise</a>-<a href="../">memories</a>/tree</h1>
+<hr>
+
+<p>
+This page lists all of the nodes of my family tree project.
+</p>
+
+<p>
+{% for index, person in people.items() %}
+<a href="./{{ '%03d' | format(index) }}">
+{{ '%03d' | format(index) }} {{ person.name }}
+</a>
+<br>
+{% endfor %}
+</p>
+
+{% 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 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" name="viewport" content="width=80ch">
+ <title>family tree index</title>
+ <link rel="stylesheet" href="../../style.css">
+</head>
+<body>
+
+<h1>
+<a href="http://blaise.zone">blaise</a>-<a href="../">memories</a>/<a href="../">tree</a>/{{ '%03d' | format(person.index) }}
+</h1>
+<hr>
+
+<h2>
+ {{ person.name }}
+</h2>
+
+<p>
+{% if person.birthday %} birthday: {{ person.birthday }} <br> {% endif %}
+{% if person.birthplace %} birthplace: {{ person.birthplace }} <br> {% endif %}
+{% if person.deathday %} deathday: {{ person.deathday }} <br> {% endif %}
+</p>
+
+<h3>local family tree</h3>
+
+{{ svg }}
+
+<h3>all relatives</h3>
+
+{% include "footer.html" %}