Merge pull request 'Finish organisation host documents and persistent DuneGit design' (#572) from dev/MC:design/native-suite-complete-20261125 into main
All checks were successful
DuneRealms Web CI / web (push) Successful in 3m42s

This commit is contained in:
unimatrix 2026-11-24 23:07:14 +00:00
commit aab5fbe15d
4 changed files with 19 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -35,6 +35,21 @@ def absolute(match):
shop_html=re.sub(r'\b(src|href)="([^"]*)"',absolute,shop_html)
changes['shop-portal/index.html']=shop_html;targets['shop-portal/index.html']=(shop_root/'index.html').resolve(strict=True)
assert targets['shop-portal/index.html'].is_relative_to(shop_root)
for kind,document in [('clans','clan-center-index.html'),('corp','company-center-index.html')]:
root=pathlib.Path('/var/www/dunerealms-'+kind).resolve(strict=True)
name=kind+'-portal/index.html';changes[name]=(release/'ops'/document).read_text();targets[name]=(root/'index.html').resolve(strict=True)
assert targets[name].is_relative_to(root)
forge=pathlib.Path('/home/dunerealms/apps/forgejo/custom/templates/custom').resolve(strict=True)
for document in ['header.tmpl','body_outer_pre.tmpl']:
target=(forge/document).resolve(strict=True);assert target.is_relative_to(forge)
old=target.read_text();assert '{{' not in old
if document=='header.tmpl':
content=re.sub(r'<(?:link|script)\b[^>]*(?:portal-navigation|realm-design)[^>]*>(?:</script>)?','',old)
content=chrome['head']+'\n'+content
else:
assert old.count('<header')==1
content=re.sub(r'<header\b[^>]*>[\s\S]*?</header>',chrome['header'],old,count=1)
name='forge-templates/'+document;changes[name]=content;targets[name]=target
plan=[]
for relative,content in changes.items():
target=targets[relative]

View file

@ -1,6 +1,8 @@
import {SHARED_HEADER} from './portal-navigation.mjs';
const a='https://www.dunerealms.com/assets/';
export const REALM_PAGE_DESIGNS=Object.freeze(Object.fromEntries([
['clan-center-index','Clans & quests','Your organisation','Your household, its people, equipment and adventures.','nav-clan-v2.webp'],
['company-center-index','Company workspace','Your organisation','Your company, its members, trade and shared plans.','guild.webp'],
['login','Welcome back','My account','Sign in to your DuneRealms account and continue your journey.','nav-account-full-v2.webp'],
['passport','Citizen passport','People of the realm','Identity, honours and the story of a citizen of the realm.','nav-account-full-v2.webp'],
['clan','Clan register','Clans & households','The household, its people and its place in the realm.','nav-clan-v2.webp'],