Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Werte nach Bedarf anpassen und als ".env" verwenden.

SITE_NAME="Brauns Lichtershow"
SITE_SUBTITLE="Fernsteuerung für den Falcon Player"
FPP_BASE_URL="http://fpp.local"
FPP_PLAYLIST_SHOW="show 1"
FPP_PLAYLIST_KIDS="show 2"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Alle Werte werden beim Container-Start als Umgebungsvariablen gelesen. Beispiel

```
SITE_NAME=Brauns Lichtershow
SITE_SUBTITLE=Fernsteuerung für den Falcon Player
FPP_BASE_URL=http://fpp.local
FPP_PLAYLIST_SHOW=show 1
FPP_PLAYLIST_KIDS=show 2
Expand All @@ -35,6 +36,7 @@ Eine ausfüllbare Vorlage liegt als `.env.example` bei.

Parameter im Überblick:
- `SITE_NAME`: Text im Seitenkopf.
- `SITE_SUBTITLE`: Unterzeile unter dem Namen.
- `FPP_BASE_URL`: Basis-URL des FPP (z.B. `http://fpp.local`).
- `FPP_PLAYLIST_SHOW`, `FPP_PLAYLIST_KIDS`: Namen der regulären Shows.
- `FPP_PLAYLIST_REQUESTS`: Playlist mit allen verfügbaren Liedern für Wünsche.
Expand Down
1 change: 1 addition & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Default config for local testing without Docker
window.FPP_CONFIG = {
siteName: 'Brauns Lichtershow',
siteSubtitle: 'Fernsteuerung für den Falcon Player',
statusPollMs: 10000,
donationPaypal: 'spenden@example.com',
donationText: 'Vielen Dank für deine Unterstützung!',
Expand Down
1 change: 1 addition & 0 deletions config.template.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Generated on container start from environment variables (see docker-entrypoint.sh)
window.FPP_CONFIG = {
siteName: '${SITE_NAME}',
siteSubtitle: '${SITE_SUBTITLE:-Fernsteuerung für den Falcon Player}',
statusPollMs: ${CLIENT_STATUS_POLL_MS:-10000},
donationPaypal: '${DONATION_PAYPAL:-}',
donationText: `${DONATION_TEXT:-Vielen Dank für deine Unterstützung!}`,
Expand Down
4 changes: 4 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -e

: "${SITE_NAME:=Brauns Lichtershow}"
: "${SITE_SUBTITLE:=Fernsteuerung für den Falcon Player}"
: "${FPP_BASE_URL:=http://localhost}"
: "${FPP_PLAYLIST_SHOW:=show 1}"
: "${FPP_PLAYLIST_KIDS:=show 2}"
Expand All @@ -21,6 +22,9 @@ import os

config = {
"siteName": os.getenv("SITE_NAME", "Brauns Lichtershow"),
"siteSubtitle": os.getenv(
"SITE_SUBTITLE", "Fernsteuerung für den Falcon Player"
),
"statusPollMs": int(os.getenv("CLIENT_STATUS_POLL_MS", "10000")),
"donationPaypal": os.getenv("DONATION_PAYPAL", ""),
"donationText": os.getenv(
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="card">
<header>
<h1 id="headline"></h1>
<p class="subtitle">Fernsteuerung für den Falcon Player</p>
<p class="subtitle" id="subtitle"></p>
<div class="countdown" id="countdown">Nächste Show wird berechnet …</div>
</header>

Expand Down Expand Up @@ -41,6 +41,7 @@ <h1 id="headline"></h1>
<script>
const config = window.FPP_CONFIG || {};
const headline = document.getElementById('headline');
const subtitle = document.getElementById('subtitle');
const btnShow = document.getElementById('btn-show');
const btnKids = document.getElementById('btn-kids');
const btnRequest = document.getElementById('btn-request');
Expand All @@ -63,6 +64,7 @@ <h1 id="headline"></h1>
let pollHandle;

headline.textContent = `${config.siteName || 'FPP Lichtershow'}`;
subtitle.textContent = config.siteSubtitle || 'Fernsteuerung für den Falcon Player';

function setButtonsDisabled(disabled, message) {
[btnShow, btnKids, btnRequest].forEach((btn) => btn.disabled = disabled);
Expand Down