Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
681f47f2aa |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,11 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from .models import RadioStream, Show
|
||||||
|
|
||||||
# Register your models here.
|
@admin.register(RadioStream)
|
||||||
|
class RadioStreamAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('name', 'url', 'is_active')
|
||||||
|
|
||||||
|
@admin.register(Show)
|
||||||
|
class ShowAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('title', 'host', 'weekday', 'start_time', 'end_time')
|
||||||
|
list_filter = ('weekday',)
|
||||||
37
core/migrations/0001_initial.py
Normal file
37
core/migrations/0001_initial.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2026-01-31 23:30
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='RadioStream',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(default='Lili Records Live', max_length=200)),
|
||||||
|
('url', models.URLField(help_text='The URL of the live audio stream (e.g., Icecast/Shoutcast URL)')),
|
||||||
|
('is_active', models.BooleanField(default=True)),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Show',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('title', models.CharField(max_length=200)),
|
||||||
|
('host', models.CharField(max_length=200)),
|
||||||
|
('description', models.TextField(blank=True)),
|
||||||
|
('image_url', models.URLField(blank=True, help_text='URL for the show image', null=True)),
|
||||||
|
('start_time', models.TimeField()),
|
||||||
|
('end_time', models.TimeField()),
|
||||||
|
('weekday', models.IntegerField(choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')])),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
Binary file not shown.
@ -1,3 +1,25 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
# Create your models here.
|
class RadioStream(models.Model):
|
||||||
|
name = models.CharField(max_length=200, default="Lili Records Live")
|
||||||
|
url = models.URLField(help_text="The URL of the live audio stream (e.g., Icecast/Shoutcast URL)")
|
||||||
|
is_active = models.BooleanField(default=True)
|
||||||
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
class Show(models.Model):
|
||||||
|
title = models.CharField(max_length=200)
|
||||||
|
host = models.CharField(max_length=200)
|
||||||
|
description = models.TextField(blank=True)
|
||||||
|
image_url = models.URLField(blank=True, null=True, help_text="URL for the show image")
|
||||||
|
start_time = models.TimeField()
|
||||||
|
end_time = models.TimeField()
|
||||||
|
weekday = models.IntegerField(choices=[
|
||||||
|
(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'),
|
||||||
|
(3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')
|
||||||
|
])
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f"{self.title} with {self.host}"
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="es">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}Knowledge Base{% endblock %}</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{% block title %}{{ project_name }}{% endblock %}</title>
|
||||||
|
|
||||||
{% if project_description %}
|
{% if project_description %}
|
||||||
<meta name="description" content="{{ project_description }}">
|
<meta name="description" content="{{ project_description }}">
|
||||||
<meta property="og:description" content="{{ project_description }}">
|
<meta property="og:description" content="{{ project_description }}">
|
||||||
@ -13,13 +15,130 @@
|
|||||||
<meta property="og:image" content="{{ project_image_url }}">
|
<meta property="og:image" content="{{ project_image_url }}">
|
||||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
<meta property="twitter:image" content="{{ project_image_url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
<!-- Bootstrap 5 CDN -->
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<!-- Google Fonts: Inter & Lexend -->
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Lexend:wght@400;600;700&display=swap" rel="stylesheet">
|
||||||
|
<!-- Font Awesome -->
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
||||||
|
|
||||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--bg-color: #0f172a;
|
||||||
|
--card-bg: rgba(30, 41, 59, 0.7);
|
||||||
|
--accent-primary: #38bdf8;
|
||||||
|
--accent-secondary: #fb7185;
|
||||||
|
--text-main: #f8fafc;
|
||||||
|
--text-muted: #94a3b8;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
color: var(--text-main);
|
||||||
|
font-family: 'Inter', sans-serif;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, .navbar-brand {
|
||||||
|
font-family: 'Lexend', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass {
|
||||||
|
background: var(--card-bg);
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
-webkit-backdrop-filter: blur(12px);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
background: rgba(15, 23, 42, 0.8) !important;
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
color: var(--text-muted) !important;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link:hover, .nav-link.active {
|
||||||
|
color: var(--accent-primary) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: var(--accent-primary);
|
||||||
|
border: none;
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 10px 24px;
|
||||||
|
font-weight: 600;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: #0ea5e9;
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: auto;
|
||||||
|
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||||
|
padding: 2rem 0;
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand d-flex align-items-center" href="/">
|
||||||
|
<i class="fas fa-compact-disc fa-spin me-2 text-rose" style="--fa-animation-duration: 5s; color: var(--accent-secondary);"></i>
|
||||||
|
<span class="fw-bold">Lili Records</span>
|
||||||
|
</a>
|
||||||
|
<button class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav ms-auto">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" href="/">Inicio</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/admin/">Admin</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main class="flex-shrink-0">
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="text-center">
|
||||||
|
<div class="container">
|
||||||
|
<p>© 2026 Lili Record's Radio. Todos los derechos reservados.</p>
|
||||||
|
<div class="social-links">
|
||||||
|
<a href="#" class="text-muted me-3"><i class="fab fa-instagram"></i></a>
|
||||||
|
<a href="#" class="text-muted me-3"><i class="fab fa-twitter"></i></a>
|
||||||
|
<a href="#" class="text-muted"><i class="fab fa-facebook"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Bootstrap JS -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@ -1,145 +1,185 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
{% block title %}{{ project_name }}{% endblock %}
|
{% block content %}
|
||||||
|
<div class="container py-5">
|
||||||
|
<div class="row align-items-center min-vh-75">
|
||||||
|
<!-- Hero & Player Section -->
|
||||||
|
<div class="col-lg-6 mb-5 mb-lg-0">
|
||||||
|
<h1 class="display-3 fw-bold mb-4">
|
||||||
|
Siente el <span style="color: var(--accent-primary);">Ritmo</span> de Lili Records
|
||||||
|
</h1>
|
||||||
|
<p class="lead text-muted mb-5">
|
||||||
|
La radio que te acompaña en cada momento. Música, entrevistas y el mejor contenido en vivo directamente en tus oídos.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="glass p-4 p-md-5 position-relative overflow-hidden">
|
||||||
|
<!-- Decorative Circle -->
|
||||||
|
<div class="position-absolute" style="top: -20px; right: -20px; width: 100px; height: 100px; background: var(--accent-secondary); filter: blur(60px); opacity: 0.3;"></div>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center mb-4">
|
||||||
|
<div class="show-art me-4 position-relative">
|
||||||
|
{% if current_show and current_show.image_url %}
|
||||||
|
<img src="{{ current_show.image_url }}" alt="{{ current_show.title }}" class="rounded-circle shadow-lg" style="width: 120px; height: 120px; object-fit: cover; border: 4px solid rgba(255,255,255,0.1);">
|
||||||
|
{% else %}
|
||||||
|
<div class="rounded-circle shadow-lg d-flex align-items-center justify-content-center bg-dark" style="width: 120px; height: 120px; border: 4px solid rgba(255,255,255,0.1);">
|
||||||
|
<i class="fas fa-music fa-3x text-muted"></i>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="live-badge position-absolute top-0 start-0 bg-danger text-white px-2 py-1 rounded-pill" style="font-size: 0.7rem; font-weight: bold;">LIVE</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3 class="mb-1">{% if current_show %}{{ current_show.title }}{% else %}Música Continua{% endif %}</h3>
|
||||||
|
<p class="text-muted mb-0">{% if current_show %}Con {{ current_show.host }}{% else %}Lili Records Radio{% endif %}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Custom Audio Player -->
|
||||||
|
<div class="player-controls">
|
||||||
|
{% if active_stream %}
|
||||||
|
<audio id="radio-player" src="{{ active_stream.url }}"></audio>
|
||||||
|
<div class="d-flex align-items-center justify-content-between mb-3">
|
||||||
|
<button id="play-btn" class="btn btn-primary rounded-circle d-flex align-items-center justify-content-center" style="width: 64px; height: 64px;">
|
||||||
|
<i class="fas fa-play fa-lg"></i>
|
||||||
|
</button>
|
||||||
|
<div class="flex-grow-1 mx-4">
|
||||||
|
<div class="progress bg-dark" style="height: 6px; border-radius: 3px;">
|
||||||
|
<div id="player-progress" class="progress-bar" style="width: 0%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="volume-control d-flex align-items-center">
|
||||||
|
<i class="fas fa-volume-up text-muted me-2"></i>
|
||||||
|
<input type="range" id="volume-slider" class="form-range" min="0" max="1" step="0.1" value="0.8" style="width: 80px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-between text-muted small">
|
||||||
|
<span id="status-text">Listo para transmitir</span>
|
||||||
|
<span id="stream-name">{{ active_stream.name }}</span>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-dark border-0 glass text-center">
|
||||||
|
<i class="fas fa-exclamation-triangle me-2"></i> No hay transmisiones activas en este momento.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- App Features Section -->
|
||||||
|
<div class="col-lg-5 offset-lg-1">
|
||||||
|
<div class="row g-4">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="glass p-4 d-flex align-items-start">
|
||||||
|
<div class="icon-box bg-primary bg-opacity-10 p-3 rounded-4 me-3">
|
||||||
|
<i class="fas fa-mobile-alt text-primary fa-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h5 class="fw-bold">Optimizado para iOS</h5>
|
||||||
|
<p class="text-muted mb-0">Disfruta de la mejor experiencia móvil con nuestra interfaz diseñada para tu iPhone.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="glass p-4 d-flex align-items-start">
|
||||||
|
<div class="icon-box bg-rose bg-opacity-10 p-3 rounded-4 me-3" style="--bg-opacity: 0.1;">
|
||||||
|
<i class="fas fa-calendar-alt text-rose fa-xl" style="color: var(--accent-secondary);"></i>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h5 class="fw-bold">Programación 24/7</h5>
|
||||||
|
<p class="text-muted mb-0">Nunca te pierdas tus shows favoritos con nuestra grilla de programación actualizada.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="glass p-4 d-flex align-items-start">
|
||||||
|
<div class="icon-box bg-info bg-opacity-10 p-3 rounded-4 me-3">
|
||||||
|
<i class="fas fa-podcast text-info fa-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h5 class="fw-bold">Episodios On-Demand</h5>
|
||||||
|
<p class="text-muted mb-0">¿Te perdiste un programa? Escúchalo cuando quieras en nuestra sección de podcasts.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const player = document.getElementById('radio-player');
|
||||||
|
const playBtn = document.getElementById('play-btn');
|
||||||
|
const playIcon = playBtn ? playBtn.querySelector('i') : null;
|
||||||
|
const volumeSlider = document.getElementById('volume-slider');
|
||||||
|
const statusText = document.getElementById('status-text');
|
||||||
|
const progressBar = document.getElementById('player-progress');
|
||||||
|
|
||||||
|
if (player) {
|
||||||
|
playBtn.addEventListener('click', function() {
|
||||||
|
if (player.paused) {
|
||||||
|
player.play().then(() => {
|
||||||
|
playIcon.classList.remove('fa-play');
|
||||||
|
playIcon.classList.add('fa-pause');
|
||||||
|
statusText.innerText = 'Transmitiendo en vivo...';
|
||||||
|
startVisualizer();
|
||||||
|
}).catch(err => {
|
||||||
|
console.error("Error playing stream:", err);
|
||||||
|
statusText.innerText = 'Error al conectar';
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
player.pause();
|
||||||
|
playIcon.classList.remove('fa-pause');
|
||||||
|
playIcon.classList.add('fa-play');
|
||||||
|
statusText.innerText = 'Pausado';
|
||||||
|
stopVisualizer();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
volumeSlider.addEventListener('input', function() {
|
||||||
|
player.volume = this.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
let progressInterval;
|
||||||
|
function startVisualizer() {
|
||||||
|
let width = 0;
|
||||||
|
progressInterval = setInterval(() => {
|
||||||
|
width = (width + 1) % 100;
|
||||||
|
progressBar.style.width = width + '%';
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
function stopVisualizer() {
|
||||||
|
clearInterval(progressInterval);
|
||||||
|
progressBar.style.width = '0%';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
{% block head %}
|
|
||||||
<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@400;700&display=swap" rel="stylesheet">
|
|
||||||
<style>
|
<style>
|
||||||
:root {
|
.min-vh-75 { min-height: 75vh; }
|
||||||
--bg-color-start: #6a11cb;
|
.text-rose { color: var(--accent-secondary); }
|
||||||
--bg-color-end: #2575fc;
|
.bg-rose { background-color: var(--accent-secondary); }
|
||||||
--text-color: #ffffff;
|
|
||||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
.progress {
|
||||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
.progress-bar {
|
||||||
box-sizing: border-box;
|
transition: width 0.1s linear;
|
||||||
|
box-shadow: 0 0 10px var(--accent-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
input[type=range]::-webkit-slider-runnable-track {
|
||||||
margin: 0;
|
background: rgba(255,255,255,0.1);
|
||||||
font-family: 'Inter', sans-serif;
|
height: 4px;
|
||||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
border-radius: 2px;
|
||||||
color: var(--text-color);
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
min-height: 100vh;
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body::before {
|
input[type=range]::-webkit-slider-thumb {
|
||||||
content: '';
|
background: var(--accent-primary);
|
||||||
position: absolute;
|
margin-top: -6px;
|
||||||
inset: 0;
|
|
||||||
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
|
|
||||||
animation: bg-pan 20s linear infinite;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes bg-pan {
|
|
||||||
0% {
|
|
||||||
background-position: 0% 0%;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
background-position: 100% 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
padding: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background: var(--card-bg-color);
|
|
||||||
border: 1px solid var(--card-border-color);
|
|
||||||
border-radius: 16px;
|
|
||||||
padding: 2.5rem 2rem;
|
|
||||||
backdrop-filter: blur(20px);
|
|
||||||
-webkit-backdrop-filter: blur(20px);
|
|
||||||
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0 0 1.2rem;
|
|
||||||
letter-spacing: -0.02em;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0.5rem 0;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
opacity: 0.92;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader {
|
|
||||||
margin: 1.5rem auto;
|
|
||||||
width: 56px;
|
|
||||||
height: 56px;
|
|
||||||
border: 4px solid rgba(255, 255, 255, 0.25);
|
|
||||||
border-top-color: #fff;
|
|
||||||
border-radius: 50%;
|
|
||||||
animation: spin 1s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.runtime code {
|
|
||||||
background: rgba(0, 0, 0, 0.25);
|
|
||||||
padding: 0.15rem 0.45rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sr-only {
|
|
||||||
position: absolute;
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
padding: 0;
|
|
||||||
margin: -1px;
|
|
||||||
overflow: hidden;
|
|
||||||
clip: rect(0, 0, 0, 0);
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 1rem;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
opacity: 0.75;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<main>
|
|
||||||
<div class="card">
|
|
||||||
<h1>Analyzing your requirements and generating your app…</h1>
|
|
||||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
|
||||||
<span class="sr-only">Loading…</span>
|
|
||||||
</div>
|
|
||||||
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
|
|
||||||
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
|
|
||||||
<p class="runtime">
|
|
||||||
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
|
|
||||||
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
<footer>
|
|
||||||
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
|
|
||||||
</footer>
|
|
||||||
{% endblock %}
|
|
||||||
@ -1,25 +1,28 @@
|
|||||||
import os
|
import os
|
||||||
import platform
|
|
||||||
|
|
||||||
from django import get_version as django_version
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
from .models import RadioStream, Show
|
||||||
|
|
||||||
def home(request):
|
def home(request):
|
||||||
"""Render the landing screen with loader and environment details."""
|
"""Render the radio player landing page."""
|
||||||
host_name = request.get_host().lower()
|
|
||||||
agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic"
|
|
||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
|
current_weekday = now.weekday()
|
||||||
|
current_time = now.time()
|
||||||
|
|
||||||
|
active_stream = RadioStream.objects.filter(is_active=True).first()
|
||||||
|
|
||||||
|
# Simple logic for current show: match weekday and time range
|
||||||
|
current_show = Show.objects.filter(
|
||||||
|
weekday=current_weekday,
|
||||||
|
start_time__lte=current_time,
|
||||||
|
end_time__gte=current_time
|
||||||
|
).first()
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"project_name": "New Style",
|
"project_name": "Lili Records Radio",
|
||||||
"agent_brand": agent_brand,
|
"active_stream": active_stream,
|
||||||
"django_version": django_version(),
|
"current_show": current_show,
|
||||||
"python_version": platform.python_version(),
|
"now": now,
|
||||||
"current_time": now,
|
"project_description": os.getenv("PROJECT_DESCRIPTION", "Lili Records Radio - La mejor música en vivo."),
|
||||||
"host_name": host_name,
|
|
||||||
"project_description": os.getenv("PROJECT_DESCRIPTION", ""),
|
|
||||||
"project_image_url": os.getenv("PROJECT_IMAGE_URL", ""),
|
|
||||||
}
|
}
|
||||||
return render(request, "core/index.html", context)
|
return render(request, "core/index.html", context)
|
||||||
Loading…
x
Reference in New Issue
Block a user