From 4bf8e8fe951d0f2967ca74fbe3d8f02cbc870c15 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 29 Nov 2025 15:11:20 -0500 Subject: [PATCH] Redesign family tree pages with card-based UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix interactive tree deep linking via query parameter - Redesign /family-tree main page with card-based layout - Add feature cards, stats card, generation cards, notable figures - Highlight Family Tree on /resources with Interactive badge 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/server.py | 5 +- kjvstudy_org/templates/family_tree.html | 665 ++++++++++++------ .../templates/family_tree_interactive.html | 37 +- kjvstudy_org/templates/resources.html | 30 +- 4 files changed, 514 insertions(+), 223 deletions(-) diff --git a/kjvstudy_org/server.py b/kjvstudy_org/server.py index d23b6d1..2e67c4d 100644 --- a/kjvstudy_org/server.py +++ b/kjvstudy_org/server.py @@ -1920,8 +1920,9 @@ def resources_page(request: Request): { "name": "Genealogies", "url": "/family-tree", - "description": "Family trees and lineages traced through Scripture", - "count": "Family trees" + "description": "Interactive family tree from Adam to Jesus Christ with detailed person profiles", + "count": "160+ people", + "badge": "Interactive" } ], "Study Tools": [ diff --git a/kjvstudy_org/templates/family_tree.html b/kjvstudy_org/templates/family_tree.html index cbaeea9..de3f9d5 100644 --- a/kjvstudy_org/templates/family_tree.html +++ b/kjvstudy_org/templates/family_tree.html @@ -5,96 +5,62 @@ {% block head %} {% endblock %} {% block content %} -

Biblical Family Tree

-

From Adam to Jesus Christ

+{% set female_names = ['eve', 'sarah', 'rebekah', 'rachel', 'leah', 'ruth', 'mary', 'tamar', 'rahab', 'bathsheba', 'dinah', 'keturah', 'hagar', 'zilpah', 'bilhah', 'jochebed', 'miriam', 'deborah', 'hannah', 'abigail', 'esther', 'naomi', 'naamah', 'milcah', 'adah', 'zillah', 'asenath', 'basemath'] %} -
-

The Bible contains detailed genealogies that trace God's plan through specific family lines, culminating in the birth of Jesus Christ. This record spans from the creation of Adam through countless generations to the birth of our Lord.

-
- -
-
-
- -
-
+
+ + +

+ The Bible contains detailed genealogies that trace God's plan through specific family lines, culminating in the birth of Jesus Christ. This record spans from the creation of Adam through countless generations to the birth of our Lord. +

+ + +
+

Find a Person

+
+
+ +
+
+
+
+ + +
+
+

Interactive Tree

+

Navigate the family tree with an interactive, zoomable diagram. Expand and collapse branches, search for any person, and see the Messianic lineage highlighted in gold.

+
+
+

Messianic Lineage

+

View the direct paternal line from Adam to Jesus Christ in a vertical genealogy chart showing each generation.

+
-
{% if family_tree_data and generations %} -
+ +

Overview

-
-

Loading statistics...

+
+
+ Total People: + {{ family_tree_data|length }} +
+
+ Total Generations: + {{ generations|length }} +
+
+ Longest Lived: + Loading... +
+
+ Most Children: + Loading... +
+
+ Most Siblings: + Loading... +
+
+ Close Family Marriages: + Loading... +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ -
-

Explore the Family Tree

-

- Interactive Tree — - Navigate the family tree with an interactive, zoomable diagram. Expand and collapse branches, search for any person, and see the Messianic lineage highlighted in gold. -

-

- Messianic Lineage — - View the direct paternal line from Adam to Jesus Christ in a vertical genealogy chart. -

-
- -
+ +

The Generations

- - {% for gen_num in generations.keys() | sort %} -
-
-

Generation {{ gen_num }}. {{ generations[gen_num]|length }} individual{% if generations[gen_num]|length != 1 %}s{% endif %}

+
+ {% for gen_num in generations.keys() | sort %} +
+ +
{{ generations[gen_num]|length }} person{% if generations[gen_num]|length != 1 %}s{% endif %}
+
+ {% for person_id in generations[gen_num][:8] %} + {{ family_tree_data[person_id].name }}{% if not loop.last %}, {% endif %} + {% endfor %}{% if generations[gen_num]|length > 8 %}, +{{ generations[gen_num]|length - 8 }} more{% endif %} +
-

- {% for person_id in generations[gen_num][:20] %} - {{ family_tree_data[person_id].name }}{% if not loop.last %}, {% endif %} - {% endfor %}{% if generations[gen_num]|length > 20 %}, and {{ generations[gen_num]|length - 20 }} others{% endif %}. -

+ {% endfor %}
- {% endfor %} -
+ -
+ +

Notable Figures

- - {% set notable = ["Adam", "Noah", "Abraham", "Isaac", "Jacob", "Joseph", "Moses", "David", "Solomon", "Jesus"] %} - {% for person_id, person in family_tree_data.items() %} - {% if person.name in notable %} -
- - -
- {% if person.generation %}Generation {{ person.generation }}{% endif %}{% if person.kekule_number is not none %} • Kekulé #{{ person.kekule_number }}{% endif %}{% if person.birth_year != "Unknown" %} • born {{ person.birth_year }}{% endif %}{% if person.age_at_death != "Unknown" %} • lived {{ person.age_at_death }}{% endif %} -
- -
- {% if person.spouse %} - Married to {{ person.spouse }}. - {% endif %} - {% if person.parents|length > 0 %} - {% if person.spouse %}{% endif %} - Child of - {% for parent_id in person.parents %} - {% if parent_id in family_tree_data %}{{ family_tree_data[parent_id].name }}{% if not loop.last %} and {% endif %}{% endif %} - {% endfor %}. - {% endif %} - {% if person.children|length > 0 %} - Father of - {% for child_id in person.children[:5] %} - {% if child_id in family_tree_data %}{{ family_tree_data[child_id].name }}{% if not loop.last %}, {% endif %}{% endif %} - {% endfor %}{% if person.children|length > 5 %}, and {{ person.children|length - 5 }} others{% endif %}. - {% endif %} -
- - {% if person.verses %} -

- {% for verse in person.verses[:2] %} - {% set ref_parts = verse.reference.split(' ') %} - {% if ref_parts|length >= 2 %} - {% set chapter_verse = ref_parts[-1] %} - {% if ':' in chapter_verse %} - {% set chapter = chapter_verse.split(':')[0] %} - {% set verse_part = chapter_verse.split(':')[1] %} - {% if '-' in verse_part %} - {% set verse_num = verse_part.split('-')[0] %} - {% else %} - {% set verse_num = verse_part %} - {% endif %} - {% set book = ' '.join(ref_parts[:-1]) %} - {{ verse.reference }}{% if not loop.last %}; {% endif %} - {% endif %} +

+ {% set notable = ["Adam", "Noah", "Abraham", "Isaac", "Jacob", "Joseph", "Moses", "David", "Solomon", "Jesus"] %} + {% for person_id, person in family_tree_data.items() %} + {% if person.name in notable %} + {% set is_female = person.name|lower in female_names or (female_names | select('in', person.name|lower) | list | length > 0) %} +
+
+ + {{ person.name }} + + {% if person.kekule_number is not none %} + Kekulé #{{ person.kekule_number }} {% endif %} - {% endfor %} -

+
+ +
+ {% if person.generation %}Generation {{ person.generation }}{% endif %}{% if person.birth_year != "Unknown" %} · Born {{ person.birth_year }}{% endif %}{% if person.age_at_death != "Unknown" %} · Lived {{ person.age_at_death }}{% endif %} +
+ +
+ {% if person.spouse %} + Married to {{ person.spouse }}. + {% endif %} + {% if person.parents|length > 0 %} + Child of + {% for parent_id in person.parents %} + {% if parent_id in family_tree_data %}{{ family_tree_data[parent_id].name }}{% if not loop.last %} and {% endif %}{% endif %} + {% endfor %}. + {% endif %} + {% if person.children|length > 0 %} + Father of + {% for child_id in person.children[:3] %} + {% if child_id in family_tree_data %}{{ family_tree_data[child_id].name }}{% if not loop.last %}, {% endif %}{% endif %} + {% endfor %}{% if person.children|length > 3 %}, +{{ person.children|length - 3 }} more{% endif %}. + {% endif %} +
+ + {% if person.verses %} +
+ {% for verse in person.verses[:1] %} + {% set ref_parts = verse.reference.split(' ') %} + {% if ref_parts|length >= 2 %} + {% set chapter_verse = ref_parts[-1] %} + {% if ':' in chapter_verse %} + {% set chapter = chapter_verse.split(':')[0] %} + {% set verse_part = chapter_verse.split(':')[1] %} + {% if '-' in verse_part %} + {% set verse_num = verse_part.split('-')[0] %} + {% else %} + {% set verse_num = verse_part %} + {% endif %} + {% set book = ' '.join(ref_parts[:-1]) %} + {{ verse.reference }} + {% endif %} + {% endif %} + {% endfor %} +
+ {% endif %} +
{% endif %} -
- {% endif %} - {% endfor %} -
+ {% endfor %} + + {% else %} -
+

Family tree data could not be loaded.

-
+ {% endif %} +