forked from unimatrix/web
Connect Company CP to shared welcome context and greeting
This commit is contained in:
parent
e075a100f6
commit
41ae248836
1 changed files with 19 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ export function updatePortalNavigation(html){
|
|||
return updated.replace('</head>',SHARED_HEAD+'</head>');
|
||||
}
|
||||
export function pageContextFor(value,links=PORTAL_LINKS){
|
||||
const url=new URL(value),host=url.hostname;if(url.pathname==='/dunemark-collection.html')return {label:'Dunemark Collection',icon:'imperial-postbank-v2.png'};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'};
|
||||
const url=new URL(value),host=url.hostname;if(host==='corp.dunerealms.com')return {label:'Company CP',icon:'clans/vaerkring-v1.png'};if(url.pathname==='/dunemark-collection.html')return {label:'Dunemark Collection',icon:'imperial-postbank-v2.png'};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'};
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff