forked from unimatrix/web
Unify deed titles, character identity and household specialist appointments
This commit is contained in:
parent
8a894faa31
commit
4a16f5c083
3 changed files with 244 additions and 95 deletions
|
|
@ -2,3 +2,5 @@
|
|||
|
||||
.profile-clan-emblem{display:block;width:110px;height:110px;object-fit:contain;margin:0 auto 18px;filter:drop-shadow(0 4px 8px #0005)}
|
||||
.profile-political-offices{border:3px double #c7a05a;background:linear-gradient(120deg,#4b252c,#261e22);box-shadow:inset 0 0 0 3px #d5ad6114}.profile-political-office-list{display:grid;gap:16px}.profile-political-office{display:flex;align-items:center;gap:24px;padding:20px;border:1px solid #b8975688;border-radius:10px;background:#f6eddd0a;min-width:0}.profile-political-office>img{width:96px;height:96px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 4px 8px #0005)}.profile-political-office small{color:#d4ba82;letter-spacing:.08em;text-transform:uppercase}.profile-political-office h3{margin:7px 0 10px}.profile-political-office strong{color:#edd7a0;font-size:13px}.profile-political-office p{margin:8px 0 0;font-size:12px}@media(max-width:520px){.profile-political-office{align-items:flex-start;flex-direction:column;gap:14px;padding:16px}.profile-political-office>img{width:80px;height:80px}}
|
||||
|
||||
#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}}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@
|
|||
<section id="personal-seal-panel" class="profile-panel personal-seal-panel" hidden><div><p class="eyebrow">PERSONAL RECOGNITION</p><h2>Personal seal</h2><p>Issued in this member’s name.</p></div><div id="personal-seal"></div></section>
|
||||
<section id="order-panel" class="profile-panel profile-order" hidden><img src="/assets/seals/order-crysknife-v1.png" alt="Holy Order of the Crysknife" width="120" height="120"><div><p class="eyebrow">SERVICE BEYOND OFFICE</p><h2>Holy Order of the Crysknife</h2><p>Order membership recognises service to DuneRealms and is separate from staff authority.</p></div></section>
|
||||
<section class="profile-panel"><p class="eyebrow">SERVICE & RECOGNITION</p><h2 id="recognition-title">Seals & earned awards</h2><p id="recognition-description" class="muted">Current function seals and recorded community achievements.</p><div id="seals" class="profile-award-groups"></div></section>
|
||||
<section id="holdings-panel" class="profile-panel"><p class="eyebrow">HOUSEHOLD & ENTERPRISE</p><h2>Leadership & holdings</h2><div id="holdings" class="profile-holdings"></div></section>
|
||||
<section class="profile-panel"><p class="eyebrow">AROUND THE REALMS</p><h2>Community activity</h2><div id="community" class="profile-community"></div></section>
|
||||
</main><footer><a href="/">DuneRealms</a><nav><a href="https://support.dunerealms.com/">Support</a><a href="/rates-and-charges.html">Rates & Charges</a></nav></footer></body></html>
|
||||
|
|
|
|||
|
|
@ -12,9 +12,11 @@ function renderPoliticalOffices(host,data){
|
|||
return true;
|
||||
}
|
||||
function render(p){
|
||||
document.title=(p.displayName||p.username)+' | DuneRealms';text('passport-title',p.displayName||p.username);text('handle','@'+p.username+(p.personnelNumber?' · '+p.personnelNumber:''));text('status',p.showcase?'Verified official DuneRealms account':'DuneRealms community member');if(p.showcase){text('recognition-title','Seal & award showcase');text('recognition-description','The general DuneRealms catalogue. Personal seals and the Holy Order of the Crysknife are excluded.');}text('joined',p.joinedAt?new Date(p.joinedAt).toLocaleDateString('en-GB'):null);text('clan',p.clan?.status==='member'?p.clan.name:'No clan listed');text('forum',p.forum?.status==='linked'?p.forum.username:'Not linked');
|
||||
document.title=(p.displayName||p.username)+' | DuneRealms';text('passport-title',p.holdings?.address||p.characterName||p.displayName||p.username);text('handle','@'+p.username+(p.personnelNumber?' · '+p.personnelNumber:''));text('status',p.showcase?'Verified official DuneRealms account':'DuneRealms community member');if(p.showcase){text('recognition-title','Seal & award showcase');text('recognition-description','The general DuneRealms catalogue. Personal seals and the Holy Order of the Crysknife are excluded.');}text('joined',p.joinedAt?new Date(p.joinedAt).toLocaleDateString('en-GB'):null);text('clan',p.clan?.status==='member'?p.clan.name:'No clan listed');if(p.clan?.status==='member'){const link=el('a'),logo=el('img');link.href='https://www.dunerealms.com/clans/'+encodeURIComponent(p.clan.tag);link.title=p.clan.name;link.setAttribute('aria-label','Open '+p.clan.name+' public clan page');logo.src=p.clan.emblem;logo.alt=p.clan.name;logo.width=logo.height=88;logo.className='profile-header-clan-logo';link.append(logo);$('clan').replaceChildren(link);}
|
||||
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 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'));
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff