From 8354538f708907f44edb58733011596aceed35d3 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 25 Nov 2026 00:06:30 +0100 Subject: [PATCH] Complete standalone organisation hosts and persistent DuneGit chrome --- website/ops/clan-center-index.html | 2 +- website/ops/company-center-index.html | 2 +- website/ops/publish-realm-design.py | 15 +++++++++++++++ website/scripts/realm-page-design.mjs | 2 ++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/website/ops/clan-center-index.html b/website/ops/clan-center-index.html index 35093289..b48d1e9a 100644 --- a/website/ops/clan-center-index.html +++ b/website/ops/clan-center-index.html @@ -1 +1 @@ -Clans & Quests · DuneRealms
\ No newline at end of file +Clans & Quests · DuneRealms
JAVA + BEDROCK · THE CARAVAN ENDURESSupportMy account

Clans & quests

Your household, its people, equipment and adventures.

\ No newline at end of file diff --git a/website/ops/company-center-index.html b/website/ops/company-center-index.html index cf122860..cb543c7a 100644 --- a/website/ops/company-center-index.html +++ b/website/ops/company-center-index.html @@ -1 +1 @@ -Company CP · DuneRealms
\ No newline at end of file +Company CP · DuneRealms
JAVA + BEDROCK · THE CARAVAN ENDURESSupportMy account

Company workspace

Your company, its members, trade and shared plans.

\ No newline at end of file diff --git a/website/ops/publish-realm-design.py b/website/ops/publish-realm-design.py index a16dd3b8..8c8877f0 100644 --- a/website/ops/publish-realm-design.py +++ b/website/ops/publish-realm-design.py @@ -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)[^>]*>(?:)?','',old) + content=chrome['head']+'\n'+content + else: + assert old.count(']*>[\s\S]*?',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] diff --git a/website/scripts/realm-page-design.mjs b/website/scripts/realm-page-design.mjs index e4495235..f03ff5c5 100644 --- a/website/scripts/realm-page-design.mjs +++ b/website/scripts/realm-page-design.mjs @@ -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'],