diff --git a/website/artwork/staff/order-hall-v1.png b/website/artwork/staff/order-hall-v1.png new file mode 100644 index 00000000..9f916092 Binary files /dev/null and b/website/artwork/staff/order-hall-v1.png differ diff --git a/website/artwork/staff/prompts.txt b/website/artwork/staff/prompts.txt new file mode 100644 index 00000000..b77227dd --- /dev/null +++ b/website/artwork/staff/prompts.txt @@ -0,0 +1,10 @@ +Built-in image_gen, 2026-11-15. + +ORDER HALL +Use case: stylized-concept. Asset type: wide website background artwork, landscape 3:1 composition for DuneRealms Holy Order of the Crysknife public honour gallery. Create a refined cinematic voxel/Minecraft-inspired desert science-fiction ceremonial hall, emerald green stone, warm antique gold architectural details, a single elegant ivory curved crysknife displayed vertically in a gold ceremonial shrine on the RIGHT third, distant desert city beyond arched windows, soft golden dust and restrained torchlight. Keep the LEFT two thirds dark, quiet and uncluttered so live HTML headings and text can sit over them. Grand and dignified, premium game concept art with detailed block-built architecture, matches dark forest green and gold heraldic website. No people, no portraits, no skulls, no blood. No text, no letters, no logos, no UI or frame. This is background artwork, not a mockup. Rich but restrained visual contrast. + +CLAN EMBLEM ORIGINAL +Use case: stylized-concept. Asset type: transparent heraldic clan emblem for Minecraft desert science fiction community. Design a prestigious cadet-branch coat of arms for fictional House Unimatrix-Artreides, an offshoot of an ancient Atreides imperial family. A shield in deep emerald and black, antique gold trim, a striking stylised ivory and green hawk with outstretched wings as the central symbol, a small gold crown indicating imperial lineage, a subtle desert dune and block-built fortress motif on lower shield, two restrained crossed ivory crysknife-like ceremonial blades behind shield. Refined richly detailed voxel/Minecraft-inspired 3D heraldic craftsmanship, readable at 128 pixels, strong silhouette. A tasteful gold scroll beneath with exact legible inscription 'UNIMATRIX-ARTREIDES', smaller upper scroll 'HOUSE'. Emerald, warm gold, ivory, minimal crimson accent. Symmetrical frontal emblem, isolated with generous padding, actual transparent background, no surrounding scene, no mockup, no watermark, no real-world political symbols. Distinct family identity rather than a copy of any existing movie logo. + +CLAN EMBLEM BLUE REVISION +Edit this clan emblem. Preserve the exact shield, hawk, imperial crown, crossed ceremonial ivory blades, Minecraft voxel craftsmanship, desert fortress, composition and exact scroll text HOUSE / UNIMATRIX-ARTREIDES. Change the dominant house colours from emerald green/gold to regal Atreides-inspired cobalt blue and midnight blue, black and silver/ivory, with restrained antique gold crown and trim. Replace green cloth and main shield fields with rich blue. Add only a TOUCH of luminous Borg green: tiny gemstones, the hawk eye, and very fine geometric circuitry accents in a few details, less than 5 percent of visual area. It should read as blue imperial cadet-house heraldry first, subtle technological ancestry second. No additional text, no people, no additional objects. Preserve genuinely transparent background and same generous padding. diff --git a/website/control-panel/public/cp-v2/cp-v2-politics-pages.mjs b/website/control-panel/public/cp-v2/cp-v2-politics-pages.mjs index 8e46bc3f..843f7414 100644 --- a/website/control-panel/public/cp-v2/cp-v2-politics-pages.mjs +++ b/website/control-panel/public/cp-v2/cp-v2-politics-pages.mjs @@ -6,7 +6,7 @@ export function mountPoliticsPage(host,id,{fetcher=fetch}={}){ if(Object.hasOwn(POLITICS_PAGES,id))return mountNativeService(host,'politics',{fetcher,singleHeading:true,title:POLITICS_PAGES[id],initialTab:id}); if(id!=='politics-overview')throw Error('Unknown political workspace.'); const controller=new AbortController(),api=createUserAPI(fetcher,controller.signal);let active=true; - const body=el('section'),status=el('p','Opening your verified political record…'),cards=el('div',undefined,'alpha-stats'),refresh=el('button','Refresh');refresh.type='button';status.setAttribute('role','status');body.append(status,cards,refresh); + const body=el('section'),status=el('p','Opening your verified political record…'),cards=el('div',undefined,'alpha-stats'),refresh=el('button','Refresh');refresh.type='button';status.setAttribute('role','status');const publicRegister=el('a','Public Government & Offices →');publicRegister.href='https://www.dunerealms.com/government.html';body.append(publicRegister,status,cards,refresh); const {root}=createCPV2Page({shellHost:host,title:'Realm & Politics',description:'Your House, the Imperial offices and the existing election chambers.',artwork:'seals/office-landsraad.png',tabs:[{id:'political-record',label:'Your political record',content:body}]});host.replaceChildren(root); async function load(){refresh.disabled=true;cards.replaceChildren();try{const session=await api.request('/api/auth/session');if(!session.user?.permissions?.includes('web.menu.game'))throw Error('Game account access is required.');const data=await api.request('/api/politics/preview');if(!active)return;for(const [label,value]of [['Minecraft identity',data.linked?'Linked':'Not linked'],['House',data.faction||'No confirmed faction'],['Imperial office',data.officeStatus!=='verified'?'Unavailable':data.emperor===true?'Emperor':'Not held'],['House leadership',data.officeStatus!=='verified'?'Unavailable':data.houseLeader===true?'House leader':'Not held']]){const card=el('article',undefined,'alpha-stat');card.append(el('small',label),el('strong',value));cards.append(card);}status.textContent='Account and office status returned by the existing political service. Election results and counts remain in their respective chambers.';}catch(error){if(active)status.textContent=error.message;}finally{if(active)refresh.disabled=false;}} refresh.onclick=()=>void load();void load();return()=>{active=false;controller.abort();root.remove();}; diff --git a/website/node/organisation-public-roster.mjs b/website/node/organisation-public-roster.mjs index b7630d5f..89e67ef2 100644 --- a/website/node/organisation-public-roster.mjs +++ b/website/node/organisation-public-roster.mjs @@ -26,7 +26,7 @@ export function projectPublicOrganisation(rows,orderRows=[],officialRows=[]){ const holders=(type,key,role)=>staff.filter(p=>p.functions.some(f=>f.scopeType===type&&f.scopeKey===key&&f.role===role)).map(p=>({username:p.username,displayName:p.displayName,title:p.title})); const organisation=ORGANISATION.map(d=>({key:d.key,label:d.label,heads:holders('department',d.key,'department_head'),branches:d.branches.map(b=>({...b,leads:holders('branch',b.key,'branch_lead'),members:holders('branch',b.key,'officer')}))})); const order=[...new Map(orderRows.map(r=>[r.username,{username:r.username,displayName:r.display_name||r.username,citation:r.citation||'',profile:r.slug?'/memorial/'+encodeURIComponent(r.slug):'/people/'+encodeURIComponent(r.username)}])).values()]; - const officialAccounts=officialRows.filter(r=>r.id===OFFICIAL_ACCOUNT.id&&r.username===OFFICIAL_ACCOUNT.username&&r.role==='official_account').map(r=>({username:r.username,displayName:'DuneRealms',title:'Official DuneRealms Account',bio:r.bio||'Official account operated by the DuneRealms owner. Verify this profile through the staff directory.',profile:'/people/'+r.username,avatar:'https://cp.dunerealms.com/api/avatars/face/roster/'+r.username,official:true,functions:[],seals:[]})); + const officialAccounts=officialRows.filter(r=>r.id===OFFICIAL_ACCOUNT.id&&r.username===OFFICIAL_ACCOUNT.username&&r.role==='official_account').map(r=>({username:r.username,displayName:'DuneRealms',title:'Official DuneRealms Account',bio:r.bio||'Official DuneRealms announcements and correspondence. Verify this profile through the staff directory.',profile:'/people/'+r.username,avatar:'https://cp.dunerealms.com/api/avatars/face/roster/'+r.username,official:true,functions:[],seals:[]})); return {model:'organisation-v2',publishedOnly:true,executives:staff.filter(p=>p.functions.some(f=>f.scopeType==='organisation')).map(p=>({username:p.username,displayName:p.displayName,title:p.title})),organisation,staff,order,officialAccounts}; } export async function readPublicOrganisation(db){ diff --git a/website/node/public-government.mjs b/website/node/public-government.mjs new file mode 100644 index 00000000..c897c53e --- /dev/null +++ b/website/node/public-government.mjs @@ -0,0 +1,27 @@ +import {electionDates,electionWindow} from '../control-panel/public/election-rules.mjs'; +export const PUBLIC_OFFICES=Object.freeze([ + {key:'emperor',kind:'imperial',faction:'imperium',office:'emperor',name:'Office of the Emperor',scope:'The Imperium',art:'emperor-v1.png',description:'The elected imperial office, representing the realms across the Imperium.'}, + ...[['atreides','House Aerdrecht','house-aerdrecht-v1.png'],['harkonnen','House Harkveen','house-harkveen-v1.png'],['corrino','House Korenholt','house-korenholt-v1.png'],['ordos','House Oordwijk','house-oordwijk-v1.png'],['fremen','Vrijduin','house-vrijduin-v1.png'],['veiled_concord','The Veiled Concord','veiled-concord-v1.png']].map(([faction,scope,art])=>({key:faction,kind:'house',faction,office:faction==='veiled_concord'?'reverent_mother':'house_leader',name:faction==='veiled_concord'?'Office of the Reverent Mother':scope+' Leadership',scope,art,description:faction==='veiled_concord'?'The elected leadership of the Veiled Concord.':'The elected leadership and public representation of '+scope+'.'})) +]); +export function projectGovernment(terms,now=Date.now()){ + return PUBLIC_OFFICES.map(office=>{ + const active=terms.filter(t=>t.kind===office.kind&&t.faction===office.faction&&t.office===office.office&&t.outcome==='winner'&&Number(t.starts_at)<=now&&Number(t.expires_at)>now); + const term=active.length===1?active[0]:null; + const holder=term&&/^[a-z0-9_]{3,32}$/i.test(term.username||'')?{username:term.username,name:term.display_name||term.username,profile:'/people/'+encodeURIComponent(term.username),avatar:'https://cp.dunerealms.com/api/avatars/face/roster/'+encodeURIComponent(term.username)}:null; + return {...office,state:holder?'occupied':active.length?'verification_pending':'vacant',holder,term:holder?{startsAt:Number(term.starts_at),expiresAt:Number(term.expires_at)}:null}; + }); +} +export function publicElectionCalendar(now=Date.now()){ + return ['house','imperial'].map(kind=>{ + const dates=electionDates(kind,now-3*3600000,1),window=electionWindow(kind,dates[0],now); + return {kind,...window,termWeeks:kind==='house'?2:4}; + }); +} +export function createPublicGovernment(db,{clock=Date.now}={}){return async request=>{ + if(request.method!=='GET')return Response.json({message:'Read-only public office register.'},{status:405}); + if(new URL(request.url).search)return Response.json({message:'No identity overrides are accepted.'},{status:400}); + try{ + const now=clock(),rows=await db.prepare("SELECT t.kind,t.faction,t.office,t.starts_at,t.expires_at,t.outcome,a.username,a.display_name FROM political_office_terms t LEFT JOIN site_accounts a ON a.id=t.user_id AND a.password_hash NOT LIKE '!%' WHERE t.outcome='winner' AND t.starts_at<=? AND t.expires_at>? ORDER BY t.starts_at DESC LIMIT 100").bind(now,now).all(); + return Response.json({offices:projectGovernment(rows.results||[],now),elections:publicElectionCalendar(now),observedAt:now},{headers:{'Cache-Control':'public,max-age=30'}}); + }catch{return Response.json({message:'The public office register is temporarily unavailable.'},{status:503,headers:{'Cache-Control':'no-store'}});} +};} diff --git a/website/node/server.mjs b/website/node/server.mjs index 273cfc27..4625244d 100644 --- a/website/node/server.mjs +++ b/website/node/server.mjs @@ -1,4 +1,5 @@ import {startNativeSyncRetryWorker} from './native-sync-outbox.mjs'; +import {createPublicGovernment} from './public-government.mjs'; import {createMemorials} from './memorials.mjs'; import {initializeLifeStatus} from './life-status.mjs'; import {SHARED_HEADER} from '../scripts/portal-navigation.mjs'; @@ -30,6 +31,7 @@ export function createApplication(db,settings={}) { const gitIdentity=createGitIdentityRoute(db,settings,origin); const worldStatus=createWorldStatus(settings); const publicRoster=createPublicStaffRoster(db);const memorials=createMemorials(db,settings); + const publicGovernment=createPublicGovernment(db); const contact=createContact(settings); const gameLink=createGameLink(db,settings,origin); const rewards=createCommunityRewards(db,settings,origin); @@ -55,6 +57,7 @@ export function createApplication(db,settings={}) { if(url.pathname==='/api/game-link'||url.pathname.startsWith('/api/game-link/'))return gameLink(request); if(url.pathname.startsWith('/api/contact/'))return contact(request); if(url.pathname==='/api/staff/roster')return publicRoster(request); + if(url.pathname==='/api/public/government')return publicGovernment(request); if(url.pathname==='/api/companies'){ if(request.method!=='GET')return Response.json({message:'Method not allowed'},{status:405}); return Response.json({companies:await listPublicCompanies(db)},{headers:{'Cache-Control':'no-store'}}); diff --git a/website/scripts/main-menu.mjs b/website/scripts/main-menu.mjs index f228616c..147b656f 100644 --- a/website/scripts/main-menu.mjs +++ b/website/scripts/main-menu.mjs @@ -1,4 +1,4 @@ -export const MAIN_MENU=[['Home','https://www.dunerealms.com/','nav-home-v2.webp'],['Shop','https://www.dunerealms.com/shop.html','nav-exchange-full-v2.webp'],['Boards','https://forums.dunerealms.com/','nav-boards-v2.webp'],['Staff roster','https://www.dunerealms.com/staff.html','nav-staff-v2.webp'],['Discord','https://www.dunerealms.com/discord.html','nav-discord-v2.webp'],['Exchange','https://www.dunerealms.com/exchange.html','nav-exchange-v2.webp'],['Kit Exchange','https://www.dunerealms.com/kits.html','items/office_water.png'],['Support center','https://support.dunerealms.com/','nav-support-v2.webp'],['Account center','https://cp.dunerealms.com/','nav-account-v2.webp'],['Clan center','https://clans.dunerealms.com/','nav-clan-v2.webp'],['Dunopedia','https://wiki.dunerealms.com/','nav-manual-v2.webp']]; +export const MAIN_MENU=[['Home','https://www.dunerealms.com/','nav-home-v2.webp'],['Shop','https://www.dunerealms.com/shop.html','nav-exchange-full-v2.webp'],['Boards','https://forums.dunerealms.com/','nav-boards-v2.webp'],['Staff roster','https://www.dunerealms.com/staff.html','nav-staff-v2.webp'],['Realm & Politics','https://www.dunerealms.com/government.html','seals/office-landsraad.png'],['Discord','https://www.dunerealms.com/discord.html','nav-discord-v2.webp'],['Exchange','https://www.dunerealms.com/exchange.html','nav-exchange-v2.webp'],['Kit Exchange','https://www.dunerealms.com/kits.html','items/office_water.png'],['Support center','https://support.dunerealms.com/','nav-support-v2.webp'],['Account center','https://cp.dunerealms.com/','nav-account-v2.webp'],['Clan center','https://clans.dunerealms.com/','nav-clan-v2.webp'],['Dunopedia','https://wiki.dunerealms.com/','nav-manual-v2.webp']]; export function canonicalMenuHref(value){const u=new URL(value,'https://www.dunerealms.com');if(u.hostname==='dunerealms.com')u.hostname='www.dunerealms.com';if(u.hostname==='www.dunerealms.com'&&/^\/(manual|wiki)\.html$/.test(u.pathname))return'https://wiki.dunerealms.com/';if(u.hostname==='cp.dunerealms.com'&&u.pathname==='/'){if(u.hash==='#shop')return'https://www.dunerealms.com/shop.html';if(u.hash==='#exchange')return'https://www.dunerealms.com/exchange.html';}if(['forums','support','cp','clans','wiki'].some(h=>u.hostname===h+'.dunerealms.com'))return u.origin+'/';return u.origin+(u.pathname==='/index.html'?'/':u.pathname);} export function normalizeMainMenus(doc,currentUrl,links=MAIN_MENU){let changes=0;const set=(node,key,value)=>{if(node.getAttribute(key)!==value){node.setAttribute(key,value);changes++;}}; for(const nav of doc.querySelectorAll('header nav[aria-label="Main navigation"]')){const old=[...nav.querySelectorAll('a')],ordered=[];for(const[name,href,icon]of links){let a=old.find(x=>!ordered.includes(x)&&canonicalMenuHref(x.href)===href);if(!a){a=doc.createElement('a');changes++;}set(a,'href',href);let image=a.querySelector('img');if(!image){image=doc.createElement('img');a.insertBefore(image,a.firstChild);changes++;}set(image,'src','https://www.dunerealms.com/assets/'+icon);set(image,'alt','');set(image,'width','34');set(image,'height','34');let label=[...a.children].find(x=>x.tagName==='SPAN'&&!x.classList.contains('dune-new-overlay')&&!x.classList.contains('dune-sales-overlay'));if(!label){label=doc.createElement('span');a.append(label);changes++;}set(label,'data-dune-nav-label','1');if(label.textContent!==name){label.textContent=name;changes++;}for(const n of [...a.childNodes])if(n.nodeType===3){n.remove();changes++;}const active=canonicalMenuHref(currentUrl)===href;if(active)set(a,'aria-current','page');else if(a.hasAttribute('aria-current')){a.removeAttribute('aria-current');changes++;}ordered.push(a);} diff --git a/website/scripts/portal-navigation.mjs b/website/scripts/portal-navigation.mjs index 88c7ad0e..b51e73f1 100644 --- a/website/scripts/portal-navigation.mjs +++ b/website/scripts/portal-navigation.mjs @@ -26,7 +26,7 @@ export function updatePortalNavigation(html){ return updated.replace('',SHARED_HEAD+''); } export function pageContextFor(value,links=PORTAL_LINKS){ - const url=new URL(value),host=url.hostname;if(url.pathname==='/kits.html')return {label:'Kit Exchange',icon:'items/office_water.png'};if(url.pathname==='/shop.html')return {label:'Shop',icon:'nav-exchange-full-v2.webp'}; if(host==='wiki.dunerealms.com')return {label:'Manual/wiki',icon:'nav-manual-full-v2.webp'}; + const url=new URL(value),host=url.hostname;if(url.pathname==='/government.html')return {label:'Realm & Politics',icon:'seals/office-landsraad.png'};if(url.pathname==='/kits.html')return {label:'Kit Exchange',icon:'items/office_water.png'};if(url.pathname==='/shop.html')return {label:'Shop',icon:'nav-exchange-full-v2.webp'}; if(host==='wiki.dunerealms.com')return {label:'Manual/wiki',icon:'nav-manual-full-v2.webp'}; if(url.pathname.startsWith('/git/'))return {label:'DuneGit',icon:'nav-manual-full-v2.webp'}; if(url.pathname.startsWith('/news/'))return {label:'News dispatch',icon:'nav-discord-full-v2.webp'}; if(url.pathname==='/news-archive.html')return {label:url.searchParams.has('post')?'News dispatch':'News archive',icon:'nav-discord-full-v2.webp'}; diff --git a/website/scripts/publish-shared-chrome.py b/website/scripts/publish-shared-chrome.py new file mode 100644 index 00000000..a602273b --- /dev/null +++ b/website/scripts/publish-shared-chrome.py @@ -0,0 +1,49 @@ +"""Publish canonical release chrome through existing stable nginx aliases.""" +from pathlib import Path +import argparse +import json +import os +import subprocess + +ASSETS = ('portal-navigation.js','portal-navigation.css','release.json', + 'menu-new-items.json','rates-and-charges.html','bank-rates.css') +DESTINATION = Path('/var/lib/dunerealms-public-rates') + +def replace(path, data): + temporary = path.with_name(path.name+'.publication-new') + temporary.write_bytes(data) + temporary.chmod(0o644) + os.chown(temporary,0,0) + os.replace(temporary,path) + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('--apply',action='store_true') + args=parser.parse_args() + release=Path('/home/dunerealms/apps/dunerealms/current').resolve(strict=True) + source=release/'dist/shared-chrome' + data={name:(source/name).read_bytes() for name in ASSETS} + metadata=json.loads(data['release.json']) + if not args.apply: + print(json.dumps({'plan':True,'version':metadata['version'],'assets':len(data)}));return + if os.geteuid()!=0:raise RuntimeError('Deployment operator required') + previous={name:(DESTINATION/name).read_bytes() for name in ASSETS} + try: + for name,content in data.items():replace(DESTINATION/name,content) + # Check the actual nginx response, including its symlink policy. A file + # readability check alone missed the previous 403 regression. + for host in ('www','cp','forums','support','clans','wiki'): + domain=host+'.dunerealms.com' + prefix='dune-navigation' if host in ('forums','support') else 'portal-navigation' + for filename,expected in ((prefix+'.css',data['portal-navigation.css']), + (prefix+'.js',data['portal-navigation.js']), + ('release.json',data['release.json'])): + actual=subprocess.check_output(['curl','--noproxy','*','-fsS','--max-time','12', + '--resolve',domain+':443:127.0.0.1','https://'+domain+'/'+filename],stderr=subprocess.PIPE) + if actual!=expected:raise RuntimeError('Shared publication mismatch: '+host+'/'+filename) + except Exception: + for name,content in previous.items():replace(DESTINATION/name,content) + raise + print(json.dumps({'applied':True,'version':metadata['version'],'hosts':6,'assets':len(data)})) + +if __name__=='__main__':main() diff --git a/website/tests/public-government.test.mjs b/website/tests/public-government.test.mjs new file mode 100644 index 00000000..a7c4db02 --- /dev/null +++ b/website/tests/public-government.test.mjs @@ -0,0 +1,7 @@ +import test from 'node:test';import assert from 'node:assert/strict'; +import {projectGovernment,createPublicGovernment,publicElectionCalendar} from '../node/public-government.mjs'; +const now=Date.parse('2026-11-15T10:00:00Z'); +test('every office remains present before the first election',()=>{const offices=projectGovernment([],now);assert.equal(offices.length,7);assert.ok(offices.every(o=>o.state==='vacant'&&o.holder===null));assert.equal(offices.filter(o=>o.kind==='imperial').length,1);}); +test('only a single active elected term can supply an officeholder',()=>{const term={kind:'imperial',faction:'imperium',office:'emperor',outcome:'winner',starts_at:now-1,expires_at:now+1,username:'citizen_one',display_name:'Citizen One',player_uuid:'private'};const office=projectGovernment([term],now)[0];assert.equal(office.state,'occupied');assert.equal(office.holder.profile,'/people/citizen_one');assert.ok(!JSON.stringify(office).includes('private'));for(const row of [{...term,expires_at:now},{...term,starts_at:now+1},{...term,outcome:'no_votes'}])assert.equal(projectGovernment([row],now)[0].state,'vacant');assert.equal(projectGovernment([term,term],now)[0].state,'verification_pending');}); +test('public calendar includes the currently open voting window',()=>{const calendar=publicElectionCalendar(now);assert.equal(calendar[0].phase,'voting');assert.equal(calendar[0].termWeeks,2);assert.equal(calendar[1].phase,'applications');}); +test('public office read rejects overrides and never invents vacancies on a database outage',async()=>{const api=createPublicGovernment({prepare(){throw Error('DB unavailable');}},{clock:()=>now});assert.equal((await api(new Request('https://www.dunerealms.com/api/public/government?user=other'))).status,400);assert.equal((await api(new Request('https://www.dunerealms.com/api/public/government',{method:'POST'}))).status,405);const response=await api(new Request('https://www.dunerealms.com/api/public/government'));assert.equal(response.status,503);assert.equal((await response.json()).offices,undefined);}); diff --git a/website/web/assets/staff/order-hall-v1.webp b/website/web/assets/staff/order-hall-v1.webp new file mode 100644 index 00000000..567bc8a9 Binary files /dev/null and b/website/web/assets/staff/order-hall-v1.webp differ diff --git a/website/web/directory-panels.css b/website/web/directory-panels.css new file mode 100644 index 00000000..1b716dd6 --- /dev/null +++ b/website/web/directory-panels.css @@ -0,0 +1,4 @@ +/* Shared public staff and government presentation, matched to Citizen Passport. */ +main.staff-directory{max-width:1340px;margin:36px auto 60px;padding:0 28px}.staff-directory [hidden]{display:none!important}.staff-section,.staff-intro{border:1px solid #7f8c61;border-radius:16px;padding:30px;margin:0 0 24px;background:linear-gradient(135deg,#1d4031,#102c23);box-shadow:0 8px 25px #0002;min-width:0}.staff-directory h1,.staff-directory h2,.staff-directory h3,.staff-directory h4{line-height:1.25;overflow-wrap:anywhere}.staff-directory h1{font-size:38px}.staff-directory h2{font-size:29px;margin:0 0 16px}.staff-directory h3{margin:0}.staff-eyebrow{font-weight:700;letter-spacing:.16em;margin:0 0 12px}.staff-intro{display:flex;align-items:center;justify-content:space-between;gap:26px;border-top:3px solid #d2b76b;background:linear-gradient(105deg,#173e2bf2,#102e28e8),url('/assets/sietch.webp') center/cover}.staff-intro>img{width:105px;height:105px;object-fit:contain;filter:drop-shadow(0 5px 10px #0006)}.staff-section-nav{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 26px}.staff-section-nav a,.staff-profile-link{display:inline-block;border:1px solid #a89058;border-radius:7px;padding:8px 16px;background:#0b281d;text-decoration:none;font-size:12px}.staff-section-nav a:hover,.staff-profile-link:hover{background:#294936}.staff-executives{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:30px 0;padding-bottom:30px;border-bottom:1px solid #a8905855}.staff-executives article{display:flex;align-items:center;gap:18px;background:linear-gradient(135deg,#38513b,#112e24);min-width:0}.staff-executives article:first-child{grid-column:1/-1;width:calc((100% - 40px)/3);min-width:300px;justify-self:center;border-top:3px solid #d2b76b}.staff-executives img{width:76px;height:76px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 3px 5px #0005)}.staff-executives a{overflow-wrap:anywhere}.staff-departments{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.staff-department{border-top:3px solid #bca064;background:linear-gradient(145deg,#1a3d2fe8,#0c281ff5),url('/assets/sietch.webp') center/cover;min-width:0}.staff-department>header{margin-bottom:22px}.staff-department>header img{width:86px;height:86px;filter:drop-shadow(0 4px 7px #0005)}.staff-branches{grid-template-columns:1fr;gap:12px;border-top:1px solid #a8905844;padding-top:20px}.staff-branches article{border-left:3px solid #9caa80;background:#0b281dcc}.staff-branch-title{display:flex;align-items:center;gap:14px;margin-bottom:12px}.staff-branch-title h4{margin:0}.staff-branch-title img{width:48px;height:48px;object-fit:contain}.staff-holders a{overflow-wrap:anywhere}.staff-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.staff-person{min-width:0;display:flex;flex-direction:column;border-color:#7f8b6466;background:linear-gradient(145deg,#274936,#102d24);box-shadow:0 5px 18px #0002}.staff-person header{min-width:0}.staff-person header a{overflow-wrap:anywhere}.staff-person header img{border:1px solid #9caa80;image-rendering:pixelated;flex-shrink:0}.staff-bio{overflow-wrap:anywhere;color:#d4dfce}.staff-personal-mark{align-self:center;width:120px;height:120px;object-fit:contain;margin:12px 0;filter:drop-shadow(0 4px 7px #0005)}.staff-person details{margin-bottom:18px}.staff-marks img{width:76px;height:76px;filter:drop-shadow(0 3px 5px #0005)}.staff-profile-link{margin-top:auto;align-self:flex-start}.staff-official{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,1fr);gap:32px;align-items:center;border-color:#b79c58;background:linear-gradient(110deg,#3a4c30,#12362a)}.staff-official .staff-cards{display:block;max-width:none}.staff-official .staff-person{display:grid;grid-template-columns:auto 1fr;gap:0 24px;padding:26px;background:#0c281e;border-color:#a8905888}.staff-official .staff-person>img{width:100px;height:100px;grid-row:1/5;object-fit:contain;align-self:center}.staff-official .staff-person h3{font-size:28px;margin:0 0 8px}.staff-official .staff-person p{font-size:13px;color:#b9ccbd}.staff-verified{border:0;padding:0;border-radius:0;font-weight:700;letter-spacing:.12em;margin-bottom:10px}.staff-order{padding:0;overflow:hidden;background:linear-gradient(135deg,#233c2c,#102b23)}.staff-order-heading{display:flex;gap:28px;align-items:center;padding:40px;border-bottom:1px solid #ab925466;background:linear-gradient(90deg,#102c23f5,#122e24c9 55%,#0b221b44),url('/assets/staff/order-hall-v1.webp') center/cover;min-height:310px}.staff-order-heading>img{width:135px;height:135px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 5px 12px #0008)}.staff-order-heading>div{max-width:620px}.staff-order-heading h2{font-size:34px}.staff-order-heading p:last-child{margin:0;color:#d2dcc9}.staff-order-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:20px;padding:30px}.staff-order-member{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px;background:linear-gradient(145deg,#3d4a2f,#102d24);min-width:0}.staff-order-member>img{float:none;margin:0 0 20px;width:125px;height:125px;filter:drop-shadow(0 4px 9px #0006)}.staff-order-member a{font-size:24px;text-decoration:none}.staff-contact a{background:#0c281e}.government-office-art{width:100px;height:100px;object-fit:contain;align-self:center;margin:12px 0 22px;filter:drop-shadow(0 4px 8px #0006)}.government-state{font-size:11px;color:#e2c880;border:1px solid #a8905866;border-radius:20px;padding:4px 11px;align-self:flex-start}.government-term{font-size:12px;color:#b9ccbd}.government-holder{display:flex;align-items:center;gap:14px;margin:18px 0}.government-holder img{width:56px;height:56px;border:1px solid #a89058;border-radius:8px;image-rendering:pixelated}.government-holder a{font:21px Georgia,serif;text-decoration:none}.government-vacant{border:1px dashed #a8905888;border-radius:9px;padding:18px;color:#c1cdb9;margin:18px 0}.government-vacant strong{display:block;color:#e4ca83;font-size:16px;letter-spacing:.12em}.government-grid{margin-top:25px}.government-notice{padding:16px;border-left:3px solid #d2b76b;background:#0b281d;color:#bacabd;font-size:13px} +@media(max-width:1100px){.staff-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-departments{grid-template-columns:1fr}.staff-executives article{padding:18px;gap:12px}.staff-executives img{width:60px;height:60px}} +@media(max-width:760px){main.staff-directory{padding:0 16px;margin-top:24px}.staff-section,.staff-intro{padding:22px}.staff-directory h1{font-size:30px}.staff-directory h2{font-size:26px}.staff-intro>img{width:75px;height:75px}.staff-executives,.staff-cards,.staff-official{grid-template-columns:1fr}.staff-executives article:first-child{width:100%;min-width:0}.staff-executives article{padding:20px}.staff-executives img{width:76px;height:76px}.staff-department{padding:18px}.staff-official{gap:16px}.staff-official .staff-person{grid-template-columns:1fr}.staff-official .staff-person>img{grid-row:auto;width:86px;height:86px;margin-bottom:16px}.staff-order{padding:0}.staff-order-heading{padding:26px;gap:18px;align-items:flex-start;flex-direction:column;min-height:350px;background-position:65% center}.staff-order-heading>img{width:95px;height:95px}.staff-order-heading h2{font-size:28px}.staff-order-grid{padding:20px}.staff-contact{align-items:flex-start;flex-direction:column}.staff-section-nav{gap:8px}.staff-section-nav a{padding:7px 12px}} diff --git a/website/web/government.html b/website/web/government.html new file mode 100644 index 00000000..3d9e5da7 --- /dev/null +++ b/website/web/government.html @@ -0,0 +1 @@ +Government & Offices | DuneRealmsSkip to government register

DUNEREALMS · REALM & POLITICS

Government & Offices

The offices of the realms, their responsibilities and the people elected to serve.

Checking the public office register…

THE IMPERIUM

Imperial office

The elected imperial office. Political office is separate from network staff authority.

THE HOUSES & THE VEIL

Houses & leadership

Every office keeps its place in this register, including when awaiting an election.

YOUR REALM · YOUR VOICE

Elections & candidatures

House leadership follows a two-week cycle; the imperial office follows a four-week cycle. Voting takes place in Realm & Politics.

Candidatures and ballots require a linked account and the applicable election eligibility. A profile, honour or staff appointment does not itself grant a political office.

Open Realm & Politics →
\ No newline at end of file diff --git a/website/web/government.js b/website/web/government.js new file mode 100644 index 00000000..d7282b3d --- /dev/null +++ b/website/web/government.js @@ -0,0 +1,17 @@ +const el=(tag,text,cls)=>{const n=document.createElement(tag);if(text!==undefined)n.textContent=text;if(cls)n.className=cls;return n;}; +const definitions=[['emperor','Office of the Emperor','The Imperium','emperor-v1.png','imperial'],['atreides','House Aerdrecht Leadership','House Aerdrecht','house-aerdrecht-v1.png'],['harkonnen','House Harkveen Leadership','House Harkveen','house-harkveen-v1.png'],['corrino','House Korenholt Leadership','House Korenholt','house-korenholt-v1.png'],['ordos','House Oordwijk Leadership','House Oordwijk','house-oordwijk-v1.png'],['fremen','Vrijduin Leadership','Vrijduin','house-vrijduin-v1.png'],['veiled_concord','Office of the Reverent Mother','The Veiled Concord','veiled-concord-v1.png']]; +const date=n=>new Date(n).toLocaleString('en-GB',{timeZone:'Europe/Brussels',dateStyle:'medium',timeStyle:'short'})+' · Brussels'; +function card(office,loading=false){ + const c=el('article',undefined,'staff-person'),art=el('img');art.src='/assets/seals/'+office.art;art.alt=office.scope+' insignia';art.width=art.height=100;art.className='government-office-art'; + c.append(art,el('small',office.scope),el('h3',office.name),el('p',office.description||'Elected leadership and representation.','staff-bio')); + if(office.holder){const row=el('div',undefined,'government-holder'),avatar=el('img'),a=el('a',office.holder.name);avatar.src=office.holder.avatar;avatar.alt='';avatar.width=avatar.height=56;a.href=office.holder.profile;row.append(avatar,a);c.append(el('span','IN OFFICE','government-state'),row);if(office.term)c.append(el('p','Term: '+date(office.term.startsAt)+' — '+date(office.term.expiresAt),'government-term'));} + else{const placeholder=el('div',undefined,'government-vacant');placeholder.append(el('strong',loading?'AWAITING CONFIRMATION':office.state==='verification_pending'?'AWAITING VERIFICATION':'VACANT'),el('span',loading?'Checking the elected office register…':office.state==='verification_pending'?'The elected identity is being verified.':'Awaiting election'));c.append(placeholder);} + const a=el('a','View elections →','staff-profile-link');a.href='https://cp.dunerealms.com/#politics/'+(office.kind==='imperial'?'imperial-elections':'house-elections');c.append(a);return c; +} +function render(offices,loading=false){document.querySelector('#imperial-offices').replaceChildren(...offices.filter(o=>o.kind==='imperial').map(o=>card(o,loading)));document.querySelector('#house-offices').replaceChildren(...offices.filter(o=>o.kind!=='imperial').map(o=>card(o,loading)));} +render(definitions.map(([key,name,scope,art,kind='house'])=>({key,name,scope,art,kind})),true); +try{ + const response=await fetch('/api/public/government',{cache:'no-store'});if(!response.ok)throw Error();const data=await response.json();if(!Array.isArray(data.offices)||data.offices.length!==definitions.length)throw Error(); + render(data.offices);document.querySelector('#government-status').textContent='Current elected offices · Updated '+date(data.observedAt); + const calendar=document.querySelector('#government-elections');for(const e of data.elections){const c=el('article',undefined,'staff-person');c.append(el('small',e.phase==='voting'?'VOTING OPEN':'ELECTION CALENDAR'),el('h3',e.kind==='imperial'?'Imperial election':'House elections'),el('p','Voting opens: '+date(e.votingOpens),'government-term'),el('p','Voting closes: '+date(e.votingCloses),'government-term'),el('p','Term cycle: '+e.termWeeks+' weeks','government-term'));calendar.append(c);} +}catch{document.querySelector('#government-status').textContent='The office register is temporarily unavailable. Officeholders cannot currently be confirmed; all offices remain visible.';} diff --git a/website/web/portal-navigation.css b/website/web/portal-navigation.css index 6a5089a9..d1695fb6 100644 --- a/website/web/portal-navigation.css +++ b/website/web/portal-navigation.css @@ -104,7 +104,7 @@ header nav[aria-label="Main navigation"] a .dune-new-overlay,header nav[aria-lab header.dune-site-header{position:relative}.dune-memorial{position:absolute;left:14px;top:10px;z-index:5;display:flex;flex-direction:column;align-items:center;width:116px;text-align:center;color:#ddd4bf;pointer-events:none;filter:drop-shadow(0 3px 5px #0008)}.dune-memorial img{display:block;width:88px;height:88px;object-fit:contain}.dune-memorial span{font:italic 9px/1.3 Georgia,serif;color:#bfb8aa}.dune-memorial strong{font:600 10px/1.4 Georgia,serif;letter-spacing:.02em;color:#e1d5b7}@media(max-width:700px){.dune-memorial{left:5px;top:5px;width:48px}.dune-memorial img{width:48px;height:55px}.dune-memorial span,.dune-memorial strong{display:none}header.dune-site-header>.wordmark{max-width:calc(100% - 104px);margin-left:48px!important;}} /* Framed memorial with a quiet candle */ -header .dune-memorial{width:200px;padding:12px 12px 15px;box-sizing:border-box;background:linear-gradient(140deg,#0b0c0bea,#171914eb);border:1px solid #786747;border-radius:7px;box-shadow:inset 0 0 0 3px #080b09,inset 0 0 0 4px #9a855b22,0 4px 15px #0005;}header .dune-memorial img{width:74px;height:78px;}header .dune-memorial span,header .dune-memorial strong{display:block;}header .dune-memorial strong{font-size:12px}.dune-memorial-dedication p{margin:8px 0 5px;font:10px/1.4 Georgia,serif;color:#c2b99f}.dune-memorial-dedication blockquote{margin:5px 0;font:italic 11px/1.5 Georgia,serif;color:#e6dcc5}.dune-memorial-dedication small{font:9px Georgia,serif;color:#9c9484}header .dune-memorial .dune-memorial-candle{position:relative;display:block;width:12px;height:24px;margin:17px auto 0;border-radius:2px 2px 3px 3px;background:linear-gradient(90deg,#8c7b57,#ead7ac 40%,#ad986c);box-shadow:0 2px 4px #0006}.dune-memorial-flame{position:absolute;left:3px;top:-13px;width:7px;height:13px;border-radius:70% 30% 60% 40%;background:radial-gradient(ellipse at 50% 80%,#fff9d5 0 22%,#f7c46a 40%,#c47732 75%);box-shadow:0 0 9px 3px #e7b15238;transform-origin:bottom center;animation:memorial-candle 3s ease-in-out infinite alternate}@keyframes memorial-candle{0%,100%{transform:rotate(-3deg) scaleY(.95);opacity:.9}50%{transform:rotate(3deg) scaleY(1.06);opacity:1}}@media(max-width:1240px){header .dune-memorial{position:relative;left:auto;top:auto;order:5;flex:0 0 calc(100% - 24px);width:calc(100% - 24px);max-width:360px;margin:12px auto 8px;display:grid;grid-template-columns:68px 1fr;column-gap:10px;text-align:left;align-items:center;}header .dune-memorial img{grid-column:1;grid-row:1/5;width:62px;height:72px;}header .dune-memorial>span:not(.dune-memorial-candle),header .dune-memorial>strong,.dune-memorial-dedication{grid-column:2;}header .dune-memorial .dune-memorial-candle{grid-column:1;grid-row:5;margin:14px auto 0;}header.dune-site-header>.wordmark{max-width:calc(100% - 65px);margin-left:0!important;}.dune-memorial-dedication blockquote{font-size:11px;}}@media(prefers-reduced-motion:reduce){.dune-memorial-flame{animation:none}} +header .dune-memorial{width:200px;padding:12px 12px 15px;box-sizing:border-box;background:linear-gradient(140deg,#0b0c0bea,#171914eb);border:1px solid #786747;border-radius:7px;box-shadow:inset 0 0 0 3px #080b09,inset 0 0 0 4px #9a855b22,0 4px 15px #0005;}header .dune-memorial img{width:74px;height:78px;}header .dune-memorial span,header .dune-memorial strong{display:block;}header .dune-memorial strong{font-size:12px}.dune-memorial-dedication p{margin:8px 0 5px;font:10px/1.4 Georgia,serif;color:#c2b99f}.dune-memorial-dedication blockquote{margin:5px 0;font:italic 11px/1.5 Georgia,serif;color:#e6dcc5}.dune-memorial-dedication small{font:9px Georgia,serif;color:#9c9484}header .dune-memorial .dune-memorial-candle{position:relative;display:block;width:12px;height:24px;margin:17px auto 0;border-radius:2px 2px 3px 3px;background:linear-gradient(90deg,#8c7b57,#ead7ac 40%,#ad986c);box-shadow:0 2px 4px #0006}.dune-memorial-flame{position:absolute;left:3px;top:-13px;width:7px;height:13px;border-radius:70% 30% 60% 40%;background:radial-gradient(ellipse at 50% 80%,#fff9d5 0 22%,#f7c46a 40%,#c47732 75%);box-shadow:0 0 9px 3px #e7b15238;transform-origin:bottom center;animation:memorial-candle 3s ease-in-out infinite alternate}@keyframes memorial-candle{0%,100%{transform:rotate(-3deg) scaleY(.95);opacity:.9}50%{transform:rotate(3deg) scaleY(1.06);opacity:1}}@media(max-width:1100px){header .dune-memorial{position:relative;left:auto;top:auto;order:5;flex:0 0 calc(100% - 24px);width:calc(100% - 24px);max-width:360px;margin:12px auto 8px;display:grid;grid-template-columns:68px 1fr;column-gap:10px;text-align:left;align-items:center;}header .dune-memorial img{grid-column:1;grid-row:1/5;width:62px;height:72px;}header .dune-memorial>span:not(.dune-memorial-candle),header .dune-memorial>strong,.dune-memorial-dedication{grid-column:2;}header .dune-memorial .dune-memorial-candle{grid-column:1;grid-row:5;margin:14px auto 0;}header.dune-site-header>.wordmark{max-width:calc(100% - 65px);margin-left:0!important;}.dune-memorial-dedication blockquote{font-size:11px;}}@media(prefers-reduced-motion:reduce){.dune-memorial-flame{animation:none}} /* Preserve memorial contrast against native application quote styles */ header.dune-site-header .dune-memorial .dune-memorial-dedication blockquote{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;color:#e6dcc5!important;font:italic 11px/1.5 Georgia,serif!important;margin:5px 0!important}header.dune-site-header .dune-memorial .dune-memorial-dedication blockquote::before,header.dune-site-header .dune-memorial .dune-memorial-dedication blockquote::after{display:none!important} @@ -127,5 +127,6 @@ header.dune-site-header nav[aria-label="Main navigation"] a,header.dune-site-hea #portals .portal::before{content:'';position:absolute;inset:0;z-index:-1;background:radial-gradient(ellipse at 85% 0%,color-mix(in srgb,var(--workspace-accent) 17%,transparent),transparent 65%);pointer-events:none} #portals .portal[data-id="realm"]{--workspace-accent:#8dcbb1}#portals .portal[data-id="bureau"]{--workspace-accent:#cbb680}#portals .portal[data-id="forge"]{--workspace-accent:#a9a1d6}#portals .portal[data-id="politics"]{--workspace-accent:#d0a56b}#portals .portal[data-id="post"]{--workspace-accent:#86bacd}#portals .portal[data-id="bank"]{--workspace-accent:#e1c66c}#portals .portal[data-id="market"]{--workspace-accent:#cb9b7d} #portals .portal>span:not(.dune-new-overlay){color:var(--workspace-accent)}#portals .portal.active,#portals .portal[aria-current="page"]{outline:2px solid var(--workspace-accent);outline-offset:-2px}#portals .portal:focus-visible{outline:3px solid #fff1c1;outline-offset:3px} -/* Reserve the memorial column; navigation may wrap before it can overlap it. */ -@media(min-width:1241px){body>header.dune-site-header{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;padding:12px 24px 12px 230px!important;min-height:270px!important}body>header.dune-site-header>nav[aria-label="Main navigation"]{flex-wrap:wrap!important;justify-content:center!important;flex:0 1 auto!important;max-width:100%!important;width:auto!important}} + +/* Context banner is shared across public and native pages; existing CP banner stays. */ +.dune-context-banner{box-sizing:border-box!important;min-height:100px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:24px!important;padding:15px 3%!important;border-top:1px solid #dbb667!important;border-bottom:3px double #dbb667!important;margin:0!important;background:linear-gradient(90deg,#081f16cc,#092d1c55,#071c14b9),url('https://www.dunerealms.com/assets/minecraft-hero.webp') center/cover!important;color:#ffe3a0!important}.dune-context-banner>strong{font:clamp(28px,3vw,46px)/1.2 Georgia,serif!important;color:#ffe3a0!important;text-shadow:0 3px 5px #000!important}.dune-context-banner>div{text-align:right!important;font:24px/1.2 Georgia,serif!important;color:#fff0c8!important}.dune-context-banner small{display:block!important;font:16px/1.5 Georgia,serif!important;color:#fff0c8!important}@media(max-width:650px){.dune-context-banner{align-items:flex-start!important;flex-direction:column!important;gap:12px!important;padding:20px!important}.dune-context-banner>div{text-align:left!important;font-size:19px!important}.dune-context-banner small{font-size:13px!important}} diff --git a/website/web/portal-navigation.js b/website/web/portal-navigation.js index fdb89dea..a3ef1ee8 100644 --- a/website/web/portal-navigation.js +++ b/website/web/portal-navigation.js @@ -1,5 +1,5 @@ (()=>{let menuIndex=0;for(const header of document.querySelectorAll('.dune-site-header')){if(window.top!==window.self){header.hidden=true;continue;}const toggle=header.querySelector('.menu-toggle'),nav=header.querySelector('nav');if(!toggle||!nav)continue;if(!nav.id){do{nav.id='dune-main-navigation-'+(++menuIndex);}while(document.getElementById(nav.id)!==nav);}toggle.setAttribute('aria-controls',nav.id);const setOpen=open=>{nav.classList.toggle('open',open);toggle.setAttribute('aria-expanded',String(open));toggle.setAttribute('aria-label',open?'Close navigation':'Open navigation');};setOpen(nav.classList.contains('open'));toggle.addEventListener('click',event=>{event.stopImmediatePropagation();setOpen(!nav.classList.contains('open'));},true);header.addEventListener('keydown',event=>{if(event.key==='Escape'&&nav.classList.contains('open')){event.preventDefault();setOpen(false);toggle.focus();}});for(const a of nav.querySelectorAll('a')){const url=new URL(a.href);if(url.host===location.host&&url.pathname===location.pathname&&url.hash===location.hash)a.setAttribute('aria-current','page');}}})();(()=>{if(window.top!==window.self){document.documentElement.classList.add('dune-embedded');return;}const links=[["Home","https://www.dunerealms.com/","nav-home-v2.webp"],["Boards","https://forums.dunerealms.com/","nav-boards-v2.webp"],["Exchange","https://www.dunerealms.com/exchange.html","nav-exchange-v2.webp"],["Kit Exchange","https://www.dunerealms.com/kits.html","items/office_water.png"],["Discord","https://www.dunerealms.com/discord.html","nav-discord-v2.webp"],["Manual/wiki","https://wiki.dunerealms.com/","nav-manual-v2.webp"],["Staff roster","https://www.dunerealms.com/staff.html","nav-staff-v2.webp"],["Support center","https://support.dunerealms.com/","nav-support-v2.webp"],["Account center","https://cp.dunerealms.com/","nav-account-v2.webp"],["Clan center","https://clans.dunerealms.com/","nav-clan-v2.webp"]],choose=function pageContextFor(value,links=PORTAL_LINKS){ - const url=new URL(value),host=url.hostname;if(url.pathname==='/kits.html')return {label:'Kit Exchange',icon:'items/office_water.png'};if(url.pathname==='/shop.html')return {label:'Shop',icon:'nav-exchange-v2.webp'}; if(host==='wiki.dunerealms.com')return {label:'Manual/wiki',icon:'nav-manual-full-v2.webp'}; + const url=new URL(value),host=url.hostname;if(url.pathname==='/government.html')return {label:'Realm & Politics',icon:'seals/office-landsraad.png'};if(url.pathname==='/kits.html')return {label:'Kit Exchange',icon:'items/office_water.png'};if(url.pathname==='/shop.html')return {label:'Shop',icon:'nav-exchange-v2.webp'}; if(host==='wiki.dunerealms.com')return {label:'Manual/wiki',icon:'nav-manual-full-v2.webp'}; if(url.pathname.startsWith('/news/'))return {label:'News dispatch',icon:'nav-discord-full-v2.webp'}; if(url.pathname==='/news-archive.html')return {label:url.searchParams.has('post')?'News dispatch':'News archive',icon:'nav-discord-full-v2.webp'}; if(host==='cp.dunerealms.com'){const pages={'#website-posts':['Website posts','discord'],'#permissions':['Website ranks','account'],'#staff-manual':['Staff manual','manual'],'#server-operations':['Server operations','home'],'#staff-tickets':['Staff ticket desk','support'],'#forum-admin':['Forum moderation','boards'],'#exchange-admin':['Exchange administration','exchange'],'#staff':['Administration','account']};const page=pages[url.hash];if(page)return {label:page[0],icon:'nav-'+page[1]+'-full-v2.webp'};} @@ -63,3 +63,8 @@ /* Central automatic release menu badges */ (()=>{let items=[{"href":"https://cp.dunerealms.com/#shop","introducedIn":"1.0.0.2","badge":"NEW"},{"href":"https://wiki.dunerealms.com/","introducedIn":"1.0.0.2","badge":"NEW"},{"href":"https://clans.dunerealms.com/","introducedIn":"1.0.0.2","badge":"NEW"},{"href":"https://cp.dunerealms.com/","badge":"NEW","updatedIn":"1.0.1.0","introducedIn":"1.0.1.0"},{"href":"https://cp.dunerealms.com/#exchange","updatedIn":"1.0.0.2","badge":"UPDATE"},{"href":"https://support.dunerealms.com/","updatedIn":"1.0.0.3","badge":"UPDATE"},{"href":"https://www.dunerealms.com/staff.html","updatedIn":"1.0.0.5","badge":"UPDATE"},{"href":"https://www.dunerealms.com/","badge":"NEW","introducedIn":"1.0.0.3","updatedIn":"1.0.0.3"},{"href":"https://www.dunerealms.com/shop.html","updatedIn":"1.0.0.5","badge":"UPDATE"},{"href":"https://www.dunerealms.com/kits.html","introducedIn":"1.0.0.5","badge":"NEW"},{"href":"https://cp.dunerealms.com/#kits-exchange","introducedIn":"1.0.0.5","badge":"NEW"},{"href":"https://cp.dunerealms.com/#realm","badge":"NEW","introducedIn":"v2-api"},{"href":"https://cp.dunerealms.com/#bureau","badge":"NEW","introducedIn":"v2-api"},{"href":"https://cp.dunerealms.com/#forge","badge":"NEW","introducedIn":"v2-api"},{"href":"https://cp.dunerealms.com/#politics","badge":"NEW","introducedIn":"v2-api"},{"href":"https://cp.dunerealms.com/#post","badge":"NEW","introducedIn":"v2-api"},{"href":"https://cp.dunerealms.com/#bank","badge":"NEW","introducedIn":"v2-api"},{"href":"https://cp.dunerealms.com/#market","badge":"NEW","introducedIn":"v2-api"},{"href":"https://www.dunerealms.com/rates-and-charges.html","updatedIn":"1.0.1.0","badge":"UPDATE"}];function mark(){const release=document.querySelector('.dune-release-badge')?.textContent.match(/\d+(?:\.\d+){3}/)?.[0];for(const a of document.querySelectorAll('header nav[aria-label="Main navigation"] a,#portals .portal[data-id]')){const href=a.matches('#portals .portal')?'https://cp.dunerealms.com/#'+a.dataset.id:a.href;const item=items.find(x=>x.href===href),label=['NEW','UPDATE'].includes(item?.badge)?item.badge:null;let tag=a.querySelector('.dune-new-overlay');if(label){if(!tag){tag=document.createElement('span');tag.className='dune-new-overlay';a.append(tag);}if(tag.textContent!==label)tag.textContent=label;tag.classList.toggle('dune-update-overlay',label==='UPDATE');tag.setAttribute('aria-label',label==='NEW'?'New this release':'Updated this release');}else if(tag)tag.remove();}}fetch('/menu-new-items.json',{cache:'no-store'}).then(r=>r.ok?r.json():null).then(data=>{if(Array.isArray(data?.items)){items=data.items;mark();}}).catch(()=>{});mark();new MutationObserver(mark).observe(document.body,{childList:true,subtree:true,characterData:true});})(); + +/* Shared contextual page banner */ +(()=>{if(window.top!==window.self)return;const titles={'staff.html':['STAFF & ORGANISATION','The people behind the realms'],'government.html':['REALM & POLITICS','Government, Houses and elected offices'],'rates-and-charges.html':['IMPERIAL POSTBANK','Rates & Charges'],'shop.html':['DUNEFORGE SHOP','Goods and services for your journey'],'kits.html':['KIT EXCHANGE','Equip your next adventure'],'exchange.html':['CHOAM EXCHANGE','Trade across the realms'],'discord.html':['COMMUNITY DISCORD','The caravan frequency'],'news.html':['NEWS FROM THE REALM','The Imperial Dispatch'],'news-archive.html':['NEWS ARCHIVE','Dispatches from across the realms']}; +function sync(){const marker=document.querySelector('.dune-page-marker');if(!marker)return;if(document.querySelector('.command-banner')){document.querySelector('.dune-context-banner')?.remove();return;}let banner=document.querySelector('.dune-context-banner');if(!banner){banner=document.createElement('section');banner.className='dune-context-banner';const brand=document.createElement('strong');brand.textContent='✦ DuneRealms';const copy=document.createElement('div'),title=document.createElement('span'),sub=document.createElement('small');copy.append(title,sub);banner.append(brand,copy);marker.after(banner);}const file=location.pathname.split('/').pop(),host=location.hostname.split('.')[0],welcome=marker.getAttribute('aria-label')?.replace('Welcome to ','')||'The realms';let context=titles[file]||(['','index.html'].includes(file)&&host==='www'?['HOME','Your journey begins here']:host==='forums'?['COMMUNITY BOARDS','Stories, discussions and community life']:host==='support'?['SUPPORT CENTER','Help for your journey']:host==='clans'?['CLANS & ALLIANCES','Raise your banner']:host==='wiki'?['DUNOPEDIA','Your guide to the realms']:location.pathname.startsWith('/people/')?['CITIZEN PROFILE','The Imperial Citizen Register']:location.pathname.startsWith('/memorial/')?['IN REMEMBRANCE','The community memorial']:['DUNEREALMS',welcome]);const title=banner.children[1].children[0],sub=banner.children[1].children[1];if(title.textContent!==context[0])title.textContent=context[0];if(sub.textContent!==context[1])sub.textContent=context[1];if(marker.nextElementSibling!==banner)marker.after(banner);} +sync();new MutationObserver(sync).observe(document.body,{childList:true,subtree:true});addEventListener('hashchange',sync);})(); diff --git a/website/web/staff-directory.js b/website/web/staff-directory.js index 891c3398..48453fb4 100644 --- a/website/web/staff-directory.js +++ b/website/web/staff-directory.js @@ -3,16 +3,16 @@ const files=Object.fromEntries(['community_operations','dunerealms_operations',' function seal(file,label){const img=el('img');img.src='/assets/seals/'+file;img.alt=label;img.loading='lazy';img.addEventListener('error',()=>{img.hidden=true;},{once:true});return img;} function profile(p){const a=el('a',p.displayName||p.username);a.href=/^\/(?:people|memorial)\/[a-z0-9_%.-]+$/i.test(p.profile||'')?p.profile:'/people/'+encodeURIComponent(p.username);return a;} function holders(people,empty='VACANT'){const wrap=el('div',undefined,'staff-holders');if(!people.length)wrap.append(el('span',empty,'staff-vacant'));for(const p of people)wrap.append(profile(p));return wrap;} -function card(p){const c=el('article',undefined,'staff-person'),head=el('header'),avatar=el('img');avatar.src=p.avatar||'https://cp.dunerealms.com/api/avatars/face/roster/'+encodeURIComponent(p.username);avatar.alt='';avatar.loading='lazy';avatar.width=avatar.height=64;head.append(avatar,profile(p));c.append(head,el('p',p.title||p.rank||'Staff','staff-title'),el('p',p.bio||'No public biography added yet.','staff-bio')); +function card(p){const c=el('article',undefined,'staff-person'),head=el('header'),avatar=el('img');avatar.src=p.avatar||'https://cp.dunerealms.com/api/avatars/face/roster/'+encodeURIComponent(p.username);avatar.alt='';avatar.loading='lazy';avatar.width=avatar.height=64;head.append(avatar,profile(p));c.append(head,el('p',p.title||p.rank||'Staff','staff-title'),el('p',p.bio||'','staff-bio')); const list=el('ul');for(const f of p.functions||[]){const li=el('li');li.append(el('strong',f.scopeLabel),el('span',f.roleLabel));list.append(li);}c.append(list); - const marks=el('div',undefined,'staff-marks'),seen=new Set();if(p.personalSeal?.file&&/^[a-z0-9_-]+\.png$/.test(p.personalSeal.file))marks.append(seal(p.personalSeal.file,p.personalSeal.label));for(const f of p.functions||[]){const file=files[f.scopeKey];if(file&&!seen.has(file)){marks.append(seal(file,f.scopeLabel+' function seal'));seen.add(file);}} - for(const a of p.seals||[])if(/^[a-z0-9_-]+\.png$/.test(a.file||''))marks.append(seal(a.file,a.label||'Earned honour'));if(marks.childElementCount){const details=el('details');details.append(el('summary','Function seals & earned honours'),marks);c.append(details);}return c;} + const marks=el('div',undefined,'staff-marks'),seen=new Set();if(p.personalSeal?.file&&/^[a-z0-9_-]+\.png$/.test(p.personalSeal.file)){const personal=seal(p.personalSeal.file,p.personalSeal.label);personal.className='staff-personal-mark';c.insertBefore(personal,list);}for(const f of p.functions||[]){const file=files[f.scopeKey];if(file&&!seen.has(file)){marks.append(seal(file,f.scopeLabel+' function seal'));seen.add(file);}} + for(const a of p.seals||[])if(/^[a-z0-9_-]+\.png$/.test(a.file||''))marks.append(seal(a.file,a.label||'Earned honour'));if(marks.childElementCount){const details=el('details');details.append(el('summary','Function seals & earned honours'),marks);c.append(details);}const link=profile(p);link.textContent='View profile →';link.className='staff-profile-link';c.append(link);return c;} function render(data){const chart=document.querySelector('#organisation-chart'),cards=document.querySelector('#staff-members'),order=document.querySelector('#order-members'); if(data.model!=='organisation-v2'){const people=new Map();for(const g of data.groups||[])for(const p of g.staff||[])people.set(p.username,p);for(const p of people.values())cards.append(card(p));chart.append(el('p','The new organigram will appear when its migration is activated.','staff-empty'));document.querySelector('#staff-status').textContent=people.size+' existing public staff profiles.';return;} - const exec=el('div',undefined,'staff-executives');for(const p of data.executives){const c=el('article');c.append(el('small',p.title),profile(p));exec.append(c);}chart.append(exec); - const deps=el('div',undefined,'staff-departments');for(const d of data.organisation){const section=el('section',undefined,'staff-department'),head=el('header');head.append(seal(files[d.key],d.label),el('h3',d.label));section.append(head,el('small','DEPARTMENT HEAD'),holders(d.heads));const branches=el('div',undefined,'staff-branches');for(const b of d.branches){const c=el('article');c.append(el('h4',b.label),el('small','BRANCH LEAD'),holders(b.leads),el('small','OFFICERS'),holders(b.members,'No published officers'));branches.append(c);}section.append(branches);deps.append(section);}chart.append(deps); + const exec=el('div',undefined,'staff-executives');for(const p of data.executives){const c=el('article'),text=el('div'),person=data.staff.find(s=>s.username===p.username);if(person?.personalSeal)c.append(seal(person.personalSeal.file,p.title+' personal seal'));text.append(el('small',p.title),profile(p));c.append(text);exec.append(c);}chart.append(exec); + const deps=el('div',undefined,'staff-departments');for(const d of data.organisation){const section=el('section',undefined,'staff-department'),head=el('header');head.append(seal(files[d.key],d.label),el('h3',d.label));section.append(head,el('small','DEPARTMENT HEAD'),holders(d.heads));const branches=el('div',undefined,'staff-branches');for(const b of d.branches){const c=el('article');const title=el('header',undefined,'staff-branch-title');title.append(seal(files[b.key],b.label),el('h4',b.label));c.append(title,el('small','BRANCH LEAD'),holders(b.leads),el('small','OFFICERS'),holders(b.members,'No published officers'));branches.append(c);}section.append(branches);deps.append(section);}chart.append(deps); for(const p of data.staff)cards.append(card(p));if(!data.staff.length)cards.append(el('p','No staff profiles are published yet.','staff-empty')); - for(const p of data.officialAccounts||[]){const c=card(p);c.prepend(el('span','Verified official account','staff-verified'));document.querySelector('#official-accounts').append(c);document.querySelector('#official-account-section').hidden=false;} + for(const p of data.officialAccounts||[]){const c=el('article',undefined,'staff-person');c.append(seal('master-imperial-150.png','DuneRealms official insignia'),el('span','✓ VERIFIED OFFICIAL ACCOUNT','staff-verified'),el('h3','DuneRealms'),el('p','Official announcements and correspondence.'));const link=profile(p);link.textContent='Verify official profile →';link.className='staff-profile-link';c.append(link);document.querySelector('#official-accounts').append(c);document.querySelector('#official-account-section').hidden=false;} for(const p of data.order){const c=el('article',undefined,'staff-order-member');c.append(seal('order-crysknife-v1.png','Holy Order of the Crysknife'),profile(p));if(p.citation)c.append(el('p',p.citation));order.append(c);}if(!data.order.length)order.append(el('p','No public Order memberships are listed.','staff-empty')); document.querySelector('#staff-status').textContent=data.staff.length+' published staff profiles · Functions from the central organisation register.'; } diff --git a/website/web/staff.html b/website/web/staff.html index 0794cd2b..197812bf 100644 --- a/website/web/staff.html +++ b/website/web/staff.html @@ -1 +1 @@ -Our People | DuneRealmsSkip to staff directory

Our people

Leadership, departments and the people behind DuneRealms.

LEADERSHIP & RESPONSIBILITY

Our organisation

Explore our leadership, departments and branches. A person may hold several functions; each remains accountable within its own scope.

Loading the public staff register…

MEET THE TEAM

Staff directory

One profile per person, with their current functions and public biography.

SERVICE BEYOND OFFICE

Holy Order of the Crysknife

The Order recognises service to DuneRealms. Membership is distinct from staff authority and may include community members.

THE RIGHT TEAM, IN ONE PLACE

How can we help?

Contact Support for account help, appeals, sales, technical issues or private enquiries.

Open Support Center →
\ No newline at end of file +Our People | DuneRealmsSkip to staff directory

DUNEREALMS · THE PEOPLE BEHIND THE REALMS

Our people

Leadership, departments and the people who keep the realms moving.

LEADERSHIP & RESPONSIBILITY

Our organisation

Explore our leadership, departments and branches. A person may hold several functions; each remains accountable within its own scope.

Loading the public staff register…

MEET THE TEAM

Staff directory

One profile per person, with their current functions and public biography.

Holy Order of the Crysknife insignia

SERVICE · HONOUR · LEGACY

Holy Order of the Crysknife

Honouring exceptional service to DuneRealms. A distinction held by members of our community, separate from staff appointments.

THE RIGHT TEAM, IN ONE PLACE

How can we help?

Contact Support for account help, appeals, sales, technical issues or private enquiries.

Open Support Center →
\ No newline at end of file