Add family tree page, linked from the NPC's family name
- /npcs/family/{family} (app_npc_family) renders a parent->child tree for
everyone sharing that family name; co-parents who are both in the family
are paired into one couple node, elders first
- FamilyTreeBuilder does the flat-list -> tree assembly
- the NPC detail page's family name (subtitle + Details row) now links there
- .family-tree CSS: nested list with connector lines, small portrait avatars
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,3 +23,69 @@ main.app-main {
|
||||
table.dataTable {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
/* --- Family tree --------------------------------------------------------- */
|
||||
.family-tree,
|
||||
.family-tree ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding-left: 1.25rem;
|
||||
}
|
||||
.family-tree {
|
||||
padding-left: 0;
|
||||
}
|
||||
.family-tree li {
|
||||
position: relative;
|
||||
padding: 0.15rem 0 0.15rem 1rem;
|
||||
}
|
||||
.family-tree ul > li::before { /* elbow connector */
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 50%;
|
||||
width: 0.75rem;
|
||||
border-left: 1px solid var(--bs-border-color);
|
||||
border-bottom: 1px solid var(--bs-border-color);
|
||||
}
|
||||
.family-tree ul > li::after { /* line continuing to siblings below */
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
border-left: 1px solid var(--bs-border-color);
|
||||
}
|
||||
.family-tree ul > li:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
.ft-couple {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.ft-person {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.45rem;
|
||||
padding: 0.2rem 0.5rem;
|
||||
border: 1px solid var(--bs-border-color);
|
||||
border-radius: 0.375rem;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
background: var(--bs-body-bg);
|
||||
}
|
||||
.ft-person:hover {
|
||||
border-color: var(--bs-primary);
|
||||
}
|
||||
.ft-name {
|
||||
font-weight: 500;
|
||||
}
|
||||
.ft-meta {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--bs-secondary-color);
|
||||
}
|
||||
.ft-amp {
|
||||
color: var(--bs-secondary-color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user