MC/website/scripts/build-clan-center.mjs
2026-11-27 23:43:05 +00:00

5 lines
1.7 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {mkdir,writeFile} from 'node:fs/promises';
import {fileURLToPath} from 'node:url';
import {SHARED_HEADER,SHARED_HEAD} from './portal-navigation.mjs';
export function clanCenterHtml(){return '<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="robots" content="noindex,nofollow"><title>Clan Center · DuneRealms</title>'+SHARED_HEAD+'<link rel="stylesheet" href="/clan-shell.css"><script src="/clan-shell.js" defer></script></head><body>'+SHARED_HEADER+'<main class="clan-shell"><section class="clan-shell-intro"><p>THE CARAVANS TRAVEL TOGETHER</p><h1>Clan Center</h1><p>Raise a banner, find companions and keep your clan’s roster in order. Sign in with your existing DuneRealms account below.</p><a href="https://cp.dunerealms.com/#clans" target="_blank" rel="noopener">Open Clan Center separately ↗</a></section><iframe id="clan-workspace" src="https://cp.dunerealms.com/?embedded=1#clans" title="DuneRealms Clan Center account tools" height="1100" referrerpolicy="origin"></iframe><noscript><p><a href="https://cp.dunerealms.com/#clans">Open your Clan Center account tools</a>. JavaScript is required to manage clan membership.</p></noscript></main><footer><a href="https://www.dunerealms.com/">dunerealms.com</a> · <a href="https://support.dunerealms.com/">Support</a><p>Independent fan project · Not affiliated with Dune rights holders, Mojang or Microsoft.</p></footer></body></html>';}
if(process.argv[1]&&fileURLToPath(import.meta.url)===process.argv[1]){const root=new URL('../integrations/clans/',import.meta.url);await mkdir(root,{recursive:true});await writeFile(new URL('index.html',root),clanCenterHtml(),'utf8');}