38428-vm/index.php
2026-02-15 01:15:51 +00:00

477 lines
15 KiB
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/includes/tracker.php';
track_visitor();
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Lili Records Radio - La mejor música en vivo.';
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? 'assets/images/featured.jpg';
// WhatsApp info
$whatsapp_link = "https://chat.whatsapp.com/DkG96pTzAFO3hvLqmzwmTY";
?>
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Lili Records Radio</title>
<!-- Meta tags SEO -->
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
<meta property="og:title" content="Lili Records Radio" />
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<meta property="twitter:card" content="summary_large_image" />
<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=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<style>
:root {
--accent-color: #00e676;
--primary-color: #38bdf8;
--secondary-color: #f472b6;
--bg-dark: #0f172a;
--glass-bg: rgba(255, 255, 255, 0.03);
--glass-border: rgba(255, 255, 255, 0.08);
}
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font-family: 'Inter', sans-serif;
color: #ffffff;
background-color: #0f172a;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.background-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -2;
background-image: url('assets/pasted-20260215-011439-25779668.jpg?v=<?php echo time(); ?>');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.background-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
}
/* Floating Microphones Effect */
.floating-mic {
position: absolute;
color: rgba(255, 255, 255, 0.05);
font-size: 3rem;
z-index: 0;
pointer-events: none;
animation: float-and-rotate 20s linear infinite;
}
@keyframes float-and-rotate {
0% {
transform: translate(0, 0) rotate(0deg);
opacity: 0;
}
10% { opacity: 0.1; }
90% { opacity: 0.1; }
100% {
transform: translate(var(--move-x), var(--move-y)) rotate(360deg);
opacity: 0;
}
}
.app-container {
display: flex;
width: 100%;
max-width: 1000px;
height: auto;
align-items: center;
justify-content: center;
padding: 2rem;
box-sizing: border-box;
position: relative;
z-index: 10;
}
.player-section {
width: 100%;
max-width: 480px;
display: flex;
flex-direction: column;
justify-content: center;
}
.glass-card {
background: var(--glass-bg);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid var(--glass-border);
border-radius: 40px;
padding: 3rem;
box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
transition: all 0.5s ease;
text-align: center;
}
.brand h1 {
font-size: 2.5rem;
font-weight: 700;
margin: 0 0 0.5rem;
color: #fff;
letter-spacing: -0.02em;
}
.brand-logo {
width: 120px;
height: auto;
margin: 0 auto 1.5rem;
display: block;
filter: grayscale(1) brightness(1.5);
opacity: 0.8;
transition: all 0.4s ease;
}
.brand-logo:hover {
filter: grayscale(0) brightness(1);
opacity: 1;
transform: scale(1.05);
}
.brand p {
font-size: 1rem;
font-weight: 300;
opacity: 0.5;
margin-bottom: 2.5rem;
color: #fff;
}
.now-playing-container {
background: rgba(255, 255, 255, 0.02);
border-radius: 24px;
padding: 1.5rem;
border: 1px solid rgba(255, 255, 255, 0.05);
margin-bottom: 2rem;
}
.track-info {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.track-status {
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2em;
color: var(--primary-color);
display: flex;
align-items: center;
gap: 0.5rem;
}
.live-dot {
width: 6px;
height: 6px;
background-color: var(--primary-color);
border-radius: 50%;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.5); opacity: 0.5; }
100% { transform: scale(1); opacity: 1; }
}
.track-title {
font-weight: 500;
font-size: 1.1rem;
color: #f8fafc;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.controls {
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem;
}
.play-btn {
width: 80px;
height: 80px;
border-radius: 50%;
background: #fff;
border: none;
color: var(--bg-dark);
font-size: 2.5rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.play-btn:hover {
transform: scale(1.1);
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}
.volume-container {
width: 100%;
max-width: 200px;
display: flex;
align-items: center;
gap: 1rem;
opacity: 0.5;
transition: opacity 0.3s;
}
.volume-container:hover {
opacity: 1;
}
.volume-slider {
flex: 1;
height: 4px;
-webkit-appearance: none;
background: rgba(255, 255, 255, 0.1);
border-radius: 2px;
outline: none;
}
.volume-slider::-webkit-slider-thumb {
-webkit-appearance: none;
width: 12px;
height: 12px;
background: #fff;
border-radius: 50%;
cursor: pointer;
}
.payment-section {
margin-top: 3rem;
opacity: 0.4;
transition: opacity 0.3s;
}
.payment-section:hover {
opacity: 1;
}
.payment-section p {
font-size: 0.65rem;
font-weight: 600;
letter-spacing: 0.15em;
margin-bottom: 1rem;
}
.qr-container img {
width: 100px;
height: 100px;
border-radius: 12px;
filter: grayscale(1) contrast(1.2);
transition: all 0.4s ease;
}
.qr-container:hover img {
filter: grayscale(0);
transform: scale(1.1);
}
.whatsapp-float {
position: fixed;
bottom: 2rem;
right: 2rem;
color: var(--accent-color);
font-size: 2.5rem;
transition: transform 0.3s;
z-index: 100;
}
.whatsapp-float:hover {
transform: scale(1.1) rotate(10deg);
}
@media (max-width: 640px) {
.glass-card {
padding: 2rem;
}
.brand h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<div class="background-container"></div>
<div class="background-overlay"></div>
<!-- Floating Microphones Background -->
<div id="mics-background"></div>
<div class="app-container">
<section class="player-section">
<div class="glass-card">
<header class="brand">
<img src="assets/pasted-20260214-203540-699a2e6a.png?v=<?php echo time(); ?>" alt="Lili Records Logo" class="brand-logo">
<h1>Lili Records</h1>
<p>Música que acompaña tu vida.</p>
</header>
<div class="radio-player">
<div class="now-playing-container">
<div class="track-info">
<div class="track-status">
<span class="live-dot"></span> EN VIVO
</div>
<div id="track-title" class="track-title">Cargando señal...</div>
</div>
</div>
<div class="controls">
<button id="play-pause" class="play-btn" onclick="togglePlay()">
<i id="play-icon" class="bi bi-play-fill"></i>
</button>
<div class="volume-container">
<i class="bi bi-volume-down-fill"></i>
<input type="range" class="volume-slider" min="0" max="1" step="0.01" value="1" oninput="changeVolume(this.value)">
</div>
</div>
<div class="payment-section">
<p>APOYA NUESTRA LABOR</p>
<div class="qr-container">
<img src="assets/pasted-20260214-203505-f7d808c3.jpg?v=<?php echo time(); ?>" alt="Transfermóvil QR">
</div>
</div>
</div>
</div>
</section>
</div>
<a href="<?= $whatsapp_link ?>" target="_blank" class="whatsapp-float">
<i class="bi bi-whatsapp"></i>
</a>
<audio id="radio-audio" src="https://listen.radioking.com/radio/828046/stream/897251" preload="none"></audio>
<script>
// Create floating mics
const micBg = document.getElementById('mics-background');
const micCount = 15;
for (let i = 0; i < micCount; i++) {
const mic = document.createElement('i');
mic.className = 'bi bi-mic-fill floating-mic';
const startX = Math.random() * window.innerWidth;
const startY = Math.random() * window.innerHeight;
const moveX = (Math.random() - 0.5) * 400;
const moveY = (Math.random() - 0.5) * 400;
const delay = Math.random() * -20;
const duration = 15 + Math.random() * 20;
mic.style.left = `${startX}px`;
mic.style.top = `${startY}px`;
mic.style.setProperty('--move-x', `${moveX}px`);
mic.style.setProperty('--move-y', `${moveY}px`);
mic.style.animationDelay = `${delay}s`;
mic.style.animationDuration = `${duration}s`;
mic.style.fontSize = `${2 + Math.random() * 4}rem`;
micBg.appendChild(mic);
}
const audio = document.getElementById('radio-audio');
const playBtn = document.getElementById('play-pause');
const playIcon = document.getElementById('play-icon');
const trackTitle = document.getElementById('track-title');
const nowPlaying = document.querySelector('.now-playing-container');
function togglePlay() {
if (audio.paused) {
audio.play();
playIcon.classList.remove('bi-play-fill');
playIcon.classList.add('bi-pause-fill');
nowPlaying.classList.add('is-playing');
} else {
audio.pause();
playIcon.classList.remove('bi-pause-fill');
playIcon.classList.add('bi-play-fill');
nowPlaying.classList.remove('is-playing');
}
}
function changeVolume(val) {
audio.volume = val;
}
// Fetch Now Playing Metadata from RadioKing
async function updateMetadata() {
try {
// RadioKing Public API for current track
const response = await fetch('https://www.radioking.com/widgets/currenttrack.php?radio=828046&format=json');
const data = await response.json();
if (data && data.title) {
let fullTitle = data.title;
// If artist is present and not already at the start of the title, prepend it
if (data.artist && !fullTitle.toLowerCase().includes(data.artist.toLowerCase())) {
fullTitle = `${data.artist} - ${fullTitle}`;
}
trackTitle.textContent = fullTitle;
document.title = `▶ ${fullTitle} | Lili Records Radio`;
} else {
trackTitle.textContent = "Lili Records Radio - En Vivo";
}
} catch (error) {
console.error('Error fetching metadata:', error);
trackTitle.textContent = "Lili Records Radio - En Vivo";
}
}
// Update every 30 seconds
updateMetadata();
setInterval(updateMetadata, 30000);
// Handle possible audio interruptions
audio.addEventListener('error', function(e) {
console.error('Audio error:', e);
trackTitle.textContent = "Error de conexión. Reintentando...";
nowPlaying.classList.remove('is-playing');
setTimeout(() => {
audio.load();
if (!audio.paused) {
audio.play();
nowPlaying.classList.add('is-playing');
}
}, 5000);
});
</script>
</body>
</html>