b2in/public/_cabinet/_old/index_1.html
2026-04-10 17:18:17 +02:00

292 lines
9.8 KiB
HTML

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cabinet Digital Signage Bielefeld</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;600;700&display=swap" rel="stylesheet">
<style>
/* --- GRUNDGERÜST --- */
body, html {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background-color: #000;
display: flex;
justify-content: center;
align-items: center;
}
#main-container {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
max-width: 100vw;
max-height: 100vh;
/* Seitenverhältnis 9:16 (1080:1920) beibehalten */
aspect-ratio: 9 / 16;
}
/* Wenn Bildschirm breiter als 9:16 ist, nach Höhe skalieren */
@media (min-aspect-ratio: 9/16) {
#main-container {
width: auto;
height: 100vh;
}
}
/* Wenn Bildschirm höher als 9:16 ist, nach Breite skalieren */
@media (max-aspect-ratio: 9/16) {
#main-container {
width: 100vw;
height: auto;
}
}
/* --- VIDEO BEREICH (Oben) --- */
#video-wrapper {
flex-grow: 1;
position: relative;
background: #000;
overflow: hidden;
}
#video-player {
width: 100%;
height: 100%;
object-fit: cover; /* Video füllt den Bereich randlos */
object-position: center 15%; /* Fallback-Position, wird per JavaScript überschrieben */
display: block;
}
/* --- FOOTER BEREICH (Unten - ca. 16.67% der Höhe = 320px bei 1920px) --- */
#footer {
height: 16.67vh;
min-height: 200px;
background-color: #1a1a1a; /* Dunkelgrau */
color: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px; /* 60px bei 1080px Breite */
box-sizing: border-box;
border-top: 0.26vh solid #009FE3; /* Cabinet Blau - 5px bei 1920px */
font-size: 10px
}
/* --- INHALTE IM FOOTER --- */
.cta-text-container {
width: 65%;
opacity: 1;
transition: opacity 1s ease-in-out;
}
.cta-headline {
font-size: 2.2em; /* Relativ zur Footer-Schriftgröße */
font-weight: 300;
margin-bottom: 0.3em;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #bbb;
}
.cta-subline {
font-size: 2.8em; /* Relativ zur Footer-Schriftgröße */
font-weight: 700;
line-height: 1.1;
}
.qr-container {
width: 30%;
display: flex;
flex-direction: column;
align-items: center;
opacity: 1;
transition: opacity 1s ease-in-out;
}
.qr-code-img {
width: 12em; /* Relativ zur Footer-Schriftgröße */
height: auto;
max-width: 200px;
aspect-ratio: 1 / 1; /* Erzwingt quadratische Form */
object-fit: contain;
background-color: white; /* Weißer Hintergrund für Lesbarkeit */
padding: 0.8em;
border-radius: 0.6em;
box-sizing: border-box;
}
.scan-hint {
margin-top: 0.8em;
font-size: 1.3em; /* Relativ zur Footer-Schriftgröße */
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 600;
color: #009FE3; /* Akzentfarbe */
}
/* Hilfsklasse für den Überblend-Effekt */
.fade-out {
opacity: 0;
}
</style>
</head>
<body>
<div id="main-container">
<!-- VIDEO BEREICH -->
<div id="video-wrapper">
<!-- Videos werden hier geladen. 'muted' ist oft nötig für Autoplay -->
<video id="video-player" autoplay muted playsinline></video>
</div>
<!-- FOOTER BEREICH -->
<div id="footer">
<div class="cta-text-container" id="text-area">
<div class="cta-headline" id="headline">LADEN...</div>
<div class="cta-subline" id="subline">Inhalte werden geladen</div>
</div>
<div class="qr-container" id="qr-area">
<img src="" id="qr-image" class="qr-code-img" alt="QR Code">
<span class="scan-hint">Scan Me</span>
</div>
</div>
</div>
<script>
/* ==============================================
KONFIGURATION
============================================== */
// 1. VIDEOS (Dateinamen und Position hier anpassen)
// position: Prozentwert von 0% (ganz oben) bis 100% (ganz unten)
const videoPlaylist = [
{ src: "assets/video5.mp4", position: 10 },
{ src: "assets/video5.mp4", position: 10 },
{ src: "assets/video3.mp4", position: 15 },
{ src: "assets/video4.mp4", position: 25 },
];
// 2. INHALTE & LINKS
// Ich habe deine Links hier eingetragen. Die Texte kannst du anpassen.
const footerContent = [
{
headline: "Beratung & Termin",
subline: "Planen Sie Ihren Traumschrank.\nJetzt Termin vereinbaren.",
url: "https://cabinet.b2in.eu/go.php?z=t"
},
{
headline: "Inspiration",
subline: "Entdecken Sie unsere Ideen-Pinnwände auf Pinterest.",
url: "https://cabinet.b2in.eu/go.php?z=p"
},
{
headline: "Instagram",
subline: "Folgen Sie uns für tägliche Einblicke & Design.",
url: "https://cabinet.b2in.eu/go.php?z=i"
},
{
headline: "Facebook",
subline: "News, Aktionen & Community.\nWerden Sie Fan.",
url: "https://cabinet.b2in.eu/go.php?z=f"
}
];
/* ==============================================
PROGRAMM-LOGIK (Ab hier nichts ändern)
============================================== */
// --- VIDEO PLAYER LOGIC ---
const videoElement = document.getElementById('video-player');
let currentVideoIndex = 0;
function playNextVideo() {
const video = videoPlaylist[currentVideoIndex];
videoElement.src = video.src;
videoElement.style.objectPosition = `center ${video.position}%`;
videoElement.play().catch(e => console.log("Autoplay blocked/failed", e));
currentVideoIndex++;
if (currentVideoIndex >= videoPlaylist.length) {
currentVideoIndex = 0;
}
}
videoElement.addEventListener('ended', playNextVideo);
// Start Video
if(videoPlaylist.length > 0) playNextVideo();
// --- FOOTER ROTATION LOGIC ---
let currentFooterIndex = 0;
const textArea = document.getElementById('text-area');
const qrArea = document.getElementById('qr-area');
const headlineEl = document.getElementById('headline');
const sublineEl = document.getElementById('subline');
const qrImageEl = document.getElementById('qr-image');
function updateFooter() {
// 1. Ausblenden
textArea.classList.add('fade-out');
qrArea.classList.add('fade-out');
// 2. Warten, Inhalt tauschen, Einblenden
setTimeout(() => {
const content = footerContent[currentFooterIndex];
// Text setzen
headlineEl.innerText = content.headline;
sublineEl.innerText = content.subline;
// QR Code generieren (API Aufruf)
// Wir nutzen 'qrserver.com', eine schnelle und kostenlose API
const qrSize = "300x300";
const qrColor = "000000"; // Schwarz
const qrBg = "ffffff"; // Weiß
// encodeURIComponent sorgt dafür, dass Sonderzeichen im Link funktionieren
const qrUrl = `https://api.qrserver.com/v1/create-qr-code/?size=${qrSize}&color=${qrColor}&bgcolor=${qrBg}&margin=10&data=${encodeURIComponent(content.url)}`;
qrImageEl.src = qrUrl;
// Index weiterschalten
currentFooterIndex++;
if (currentFooterIndex >= footerContent.length) {
currentFooterIndex = 0;
}
// 3. Einblenden
// Kurze Verzögerung damit das Bild Zeit hat zu laden (optisch schöner)
qrImageEl.onload = () => {
textArea.classList.remove('fade-out');
qrArea.classList.remove('fade-out');
};
// Fallback falls Bild sofort da ist (Cache)
setTimeout(() => {
textArea.classList.remove('fade-out');
qrArea.classList.remove('fade-out');
}, 100);
}, 1000); // 1 Sekunde für Fade-Out Animation
}
// Start Footer Loop
updateFooter();
setInterval(updateFooter, 30000); // Alle 30.000 ms (30 sek) wechseln
</script>
</body>
</html>