Decorate registered deeds with seals and repair compact deed appointment forms

This commit is contained in:
unimatrix 2026-11-17 03:03:05 +00:00
commit 9899fb8225
2 changed files with 14 additions and 9 deletions

View file

@ -6,4 +6,6 @@
#passport-title{line-height:1.2;font-size:clamp(1.6rem,3.7vw,2.8rem);overflow-wrap:break-word}.profile-header-clan-logo{display:block;width:88px;height:88px;object-fit:contain;filter:drop-shadow(0 4px 7px #0006)}.profile-holdings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.profile-holding-box{padding:22px;min-width:0;border:1px solid #947b43;border-radius:13px;background:linear-gradient(120deg,#213d31ec,#102922f7)}.profile-holding-box h3{font-family:Georgia,serif;color:#e7cc86;margin-top:0}.profile-holding-link{display:flex;align-items:center;gap:14px;padding:10px 0;line-height:1.5;overflow-wrap:anywhere}.profile-holding-link img{width:48px;height:48px;object-fit:contain;flex:none}.profile-holding-box>small{display:block;color:#b7c9b8}@media(max-width:650px){.profile-holdings{grid-template-columns:1fr}}
#passport-title,.profile-holding-card h3,.profile-holding-card a{font-family:'Cinzel','Palatino Linotype',serif;font-weight:600;letter-spacing:.025em;text-wrap:balance}
#passport-title,.profile-holding-box h3,.profile-holding-box a{font-family:'Cinzel','Palatino Linotype',serif;font-weight:600;letter-spacing:.025em;text-wrap:balance}
.profile-holding-box{position:relative;overflow:hidden}.profile-holding-box:after{content:'';position:absolute;right:16px;top:14px;width:68px;height:68px;pointer-events:none;opacity:.12;background:url('/assets/imperial-seal-128.png') center/contain no-repeat}.profile-holding-box h3{position:relative;z-index:1;padding-right:50px;font-family:'Cinzel','Palatino Linotype',serif;font-weight:600}.profile-holding-link{text-decoration:none;font-family:'Cinzel','Palatino Linotype',serif;letter-spacing:.015em}.profile-holding-link:hover{color:#fff0bb}.profile-holding-link .profile-appointment-seal{width:64px;height:64px;filter:drop-shadow(0 4px 6px #0007)}.profile-deed-icon{display:block;width:76px;height:76px;flex:0 0 76px;background:url('https://cp.dunerealms.com/assets/organisation-deeds-clan-tiers-v1.png') left center/300% 100% no-repeat;filter:drop-shadow(0 4px 6px #0007)}.profile-deed-original{background-position:center}.profile-deed-royal{background-position:right}

View file

@ -16,7 +16,7 @@ function render(p){
text('forum',p.forum?.status==='linked'?p.forum.username:'Not linked');
if(typeof p.avatar==='string'&&/^https:\/\/cp\.dunerealms\.com\/api\/avatars\//.test(p.avatar)){$('avatar').src=p.avatar;$('avatar').hidden=false;}
for(const rank of p.ranks||[]){if(rank.label==='Unknown rank')continue;const chip=el('span',rank.label,'chip');chip.dataset.staff=String(rank.key.startsWith('org_'));$('ranks').append(chip);}
const holdingHost=$('holdings');if(holdingHost){holdingHost.replaceChildren();const h=p.holdings||{};for(const [title,rows]of [['Leader of · Clans',h.clans],['Owner of · Companies',h.companies],['Registered deeds',h.deeds],['Daughter clans',h.subhouses]]){const box=el('article',null,'profile-holding-box');box.append(el('h3',title));for(const record of rows||[]){const link=el('a',record.name,'profile-holding-link');link.href=record.url+(title==='Registered deeds'?'#ownership-deed':'');if(record.emblem){const logo=el('img');logo.src=record.emblem;logo.alt='';logo.width=logo.height=48;link.prepend(logo);}box.append(link);if(record.basis)box.append(el('small',record.basis));}if(!rows?.length)box.append(el('p',h.state==='unavailable'||(title.includes('Companies')?h.companiesState:h.clansState)==='unavailable'?'Register temporarily unavailable.':'No records in this register.','muted'));holdingHost.append(box);}if(h.appointments?.length){const box=el('article',null,'profile-holding-box');box.append(el('h3','Dynastic appointments'));for(const appointment of h.appointments){const link=el('a',appointment.address,'profile-holding-link');link.href=appointment.url;box.append(link);}holdingHost.append(box);}}
const holdingHost=$('holdings');if(holdingHost){holdingHost.replaceChildren();const h=p.holdings||{};for(const [title,rows]of [['Leader of · Clans',h.clans],['Owner of · Companies',h.companies],['Registered deeds',h.deeds],['Daughter clans',h.subhouses]]){const box=el('article',null,'profile-holding-box');box.append(el('h3',title));for(const record of rows||[]){const link=el('a',record.name,'profile-holding-link');link.href=record.url+(title==='Registered deeds'?'#ownership-deed':'');if(title==='Registered deeds'){const deed=el('span',null,'profile-deed-icon profile-deed-'+record.kind);deed.setAttribute('aria-hidden','true');link.prepend(deed);}else if(record.emblem){const logo=el('img');logo.src=record.emblem;logo.alt='';logo.width=logo.height=48;link.prepend(logo);}box.append(link);if(record.basis)box.append(el('small',record.basis));}if(!rows?.length)box.append(el('p',h.state==='unavailable'||(title.includes('Companies')?h.companiesState:h.clansState)==='unavailable'?'Register temporarily unavailable.':'No records in this register.','muted'));holdingHost.append(box);}if(h.appointments?.length){const box=el('article',null,'profile-holding-box');box.append(el('h3','Dynastic appointments'));for(const appointment of h.appointments){const link=el('a',appointment.address,'profile-holding-link');link.href=appointment.url;const seal=el('img');seal.src='https://www.dunerealms.com/assets/imperial-seal-128.png';seal.alt='';seal.width=seal.height=64;seal.className='profile-appointment-seal';link.prepend(seal);box.append(link);}holdingHost.append(box);}}
const functions=p.functions||[];
for(const f of functions){const card=el('article',null,'profile-function');card.append(el('strong',f.roleLabel),el('span',f.scopeLabel));$('department').append(card);}
if(!functions.length)$('department').append(el('p','No staff functions listed.','muted'));