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
Some checks are pending
CI/CD Cloud Deployment / test-and-build (push) Waiting to run
This commit is contained in:
parent
0df07eefd1
commit
2fce25b07e
4 changed files with 25 additions and 3 deletions
|
|
@ -17,3 +17,13 @@ services:
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- forgejo-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
forgejo-net:
|
||||||
|
external: true
|
||||||
|
name: forgejo_forgejo-net
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -336,8 +336,8 @@
|
||||||
<span id="liveStatusText">Live · 20.0 Hz Loop</span>
|
<span id="liveStatusText">Live · 20.0 Hz Loop</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="/" class="btn-cyan-ghost" style="padding: 8px 18px; font-size: 0.8rem;">
|
<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 Website</span>
|
<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>
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,11 @@
|
||||||
<span class="audio-label">Atmosphäre</span>
|
<span class="audio-label">Atmosphäre</span>
|
||||||
</button>
|
</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">
|
<a href="#download" class="btn-gold-sheen">
|
||||||
<span>Spielen</span>
|
<span>Spielen</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -151,9 +151,16 @@ const server = http.createServer((req, res) => {
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// Static Page Routes
|
// Static Page Routes
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
const host = (req.headers.host || '').toLowerCase();
|
||||||
|
const isAdminDomain = host.startsWith('col-admin');
|
||||||
|
|
||||||
let filePath = '';
|
let filePath = '';
|
||||||
if (pathname === '/' || pathname === '/index.html') {
|
if (pathname === '/' || pathname === '/index.html') {
|
||||||
|
if (isAdminDomain) {
|
||||||
|
filePath = path.join(PUBLIC_DIR, 'dashboard.html');
|
||||||
|
} else {
|
||||||
filePath = path.join(PUBLIC_DIR, 'index.html');
|
filePath = path.join(PUBLIC_DIR, 'index.html');
|
||||||
|
}
|
||||||
} else if (pathname === '/dashboard' || pathname === '/dashboard.html') {
|
} else if (pathname === '/dashboard' || pathname === '/dashboard.html') {
|
||||||
filePath = path.join(PUBLIC_DIR, 'dashboard.html');
|
filePath = path.join(PUBLIC_DIR, 'dashboard.html');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue