feat: Support col.stickelbroeck.com (Spieleseite) & col-admin.stickelbroeck.com (Schaltzentrale)
Some checks are pending
CI/CD Cloud Deployment / test-and-build (push) Waiting to run

This commit is contained in:
Martin Stickelbroeck 2026-10-12 10:16:35 +02:00
parent 0df07eefd1
commit 2fce25b07e
4 changed files with 25 additions and 3 deletions

View file

@ -17,3 +17,13 @@ services:
interval: 30s
timeout: 5s
retries: 3
networks:
- default
- forgejo-net
networks:
default:
forgejo-net:
external: true
name: forgejo_forgejo-net

View file

@ -336,8 +336,8 @@
<span id="liveStatusText">Live · 20.0 Hz Loop</span>
</div>
<a href="/" class="btn-cyan-ghost" style="padding: 8px 18px; font-size: 0.8rem;">
<span>Zur Website</span>
<a href="https://col.stickelbroeck.com" target="_blank" rel="noopener" class="btn-cyan-ghost" style="padding: 8px 18px; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 6px;">
<span>Zur Spieleseite</span>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"></polyline></svg>
</a>
</div>

View file

@ -58,6 +58,11 @@
<span class="audio-label">Atmosphäre</span>
</button>
<a href="https://col-admin.stickelbroeck.com" target="_blank" rel="noopener" class="btn-cyan-ghost" style="padding: 9px 16px; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 6px;">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>
<span>Schaltzentrale</span>
</a>
<a href="#download" class="btn-gold-sheen">
<span>Spielen</span>
</a>

View file

@ -151,9 +151,16 @@ const server = http.createServer((req, res) => {
// ------------------------------------------------------------------------
// Static Page Routes
// ------------------------------------------------------------------------
const host = (req.headers.host || '').toLowerCase();
const isAdminDomain = host.startsWith('col-admin');
let filePath = '';
if (pathname === '/' || pathname === '/index.html') {
if (isAdminDomain) {
filePath = path.join(PUBLIC_DIR, 'dashboard.html');
} else {
filePath = path.join(PUBLIC_DIR, 'index.html');
}
} else if (pathname === '/dashboard' || pathname === '/dashboard.html') {
filePath = path.join(PUBLIC_DIR, 'dashboard.html');
} else {