add direct page
This commit is contained in:
+182
@@ -1422,4 +1422,186 @@ i.icon-x,
|
||||
padding: 0;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Styles pour la page de direct */
|
||||
.live-page {
|
||||
width: 100%;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.live-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background-color: var(--card-bg);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: var(--card-shadow);
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.live-player {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-top: 56.25%; /* Ratio 16:9 */
|
||||
}
|
||||
|
||||
.live-player iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.live-info {
|
||||
padding: 20px;
|
||||
border-top: 1px solid var(--divider-color);
|
||||
}
|
||||
|
||||
.live-title {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.live-channel-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.live-channel-info .channel-avatar,
|
||||
.live-channel-info .channel-avatar-placeholder {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.live-channel-info .channel-name {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.live-description {
|
||||
font-size: 16px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.live-description p {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.live-badge.large {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
background-color: var(--primary-red);
|
||||
color: white;
|
||||
border-radius: 4px;
|
||||
padding: 8px 15px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.live-badge.large i {
|
||||
font-size: 12px;
|
||||
animation: pulse 1.5s infinite;
|
||||
}
|
||||
|
||||
.no-live-message {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: var(--card-bg);
|
||||
color: var(--text-color);
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.no-live-message i {
|
||||
font-size: 60px;
|
||||
margin-bottom: 20px;
|
||||
opacity: 0.7;
|
||||
color: var(--primary-red);
|
||||
}
|
||||
|
||||
.no-live-message h2 {
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.no-live-message p {
|
||||
font-size: 18px;
|
||||
max-width: 600px;
|
||||
margin: 0 auto 30px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
display: inline-block;
|
||||
padding: 12px 25px;
|
||||
background-color: var(--primary-red);
|
||||
color: white;
|
||||
border-radius: 4px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #cc0000;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
/* Responsive pour la page de direct */
|
||||
@media (max-width: 768px) {
|
||||
.live-title {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.live-channel-info .channel-avatar,
|
||||
.live-channel-info .channel-avatar-placeholder {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.live-channel-info .channel-name {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.live-badge.large {
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
padding: 6px 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.no-live-message {
|
||||
padding: 40px 15px;
|
||||
}
|
||||
|
||||
.no-live-message i {
|
||||
font-size: 50px;
|
||||
}
|
||||
|
||||
.no-live-message h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.no-live-message p {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Direct - Kaubuntu.re</title>
|
||||
<link rel="stylesheet" href="css/styles.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
|
||||
<!-- Favicons -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="img/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png">
|
||||
<link rel="manifest" href="site.webmanifest">
|
||||
<link rel="icon" type="image/x-icon" href="img/favicon.ico">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
// Inclure la configuration
|
||||
require_once 'includes/config.php';
|
||||
?>
|
||||
<?php include 'includes/sidebar.php'; ?>
|
||||
<!-- Contenu principal -->
|
||||
<div class="main-content">
|
||||
<?php include 'includes/header.php'; ?>
|
||||
|
||||
<!-- Section Direct -->
|
||||
<div class="live-page">
|
||||
<div class="section-header">
|
||||
<div class="section-logo">
|
||||
<img src="img/logo.png" alt="Kaubuntu.re">
|
||||
</div>
|
||||
<h2 class="section-title">Diffusion en direct</h2>
|
||||
</div>
|
||||
|
||||
<div class="live-container">
|
||||
<?php
|
||||
// Vérifier s'il y a un direct en cours
|
||||
$liveStream = getLiveStream();
|
||||
|
||||
if ($liveStream) {
|
||||
// Afficher le direct en cours
|
||||
?>
|
||||
<div class="live-badge large">
|
||||
<i class="fas fa-circle"></i> EN DIRECT
|
||||
</div>
|
||||
<div class="live-player">
|
||||
<iframe
|
||||
src="<?php echo PEERTUBE_URL; ?>/videos/embed/<?php echo $liveStream['id']; ?>?autoplay=1"
|
||||
frameborder="0"
|
||||
allowfullscreen="allowfullscreen"
|
||||
allow="autoplay; fullscreen"
|
||||
title="<?php echo htmlspecialchars($liveStream['title']); ?>">
|
||||
</iframe>
|
||||
</div>
|
||||
<div class="live-info">
|
||||
<h1 class="live-title"><?php echo htmlspecialchars($liveStream['title']); ?></h1>
|
||||
<div class="live-channel-info">
|
||||
<?php if (strpos($liveStream['channelAvatar'], 'default-avatar.png') !== false || empty($liveStream['channelAvatar'])): ?>
|
||||
<div class="channel-avatar-placeholder">
|
||||
<i class="fas fa-user-circle"></i>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<img src="<?php echo $liveStream['channelAvatar']; ?>" alt="<?php echo $liveStream['channel']; ?>" class="channel-avatar">
|
||||
<?php endif; ?>
|
||||
<span class="channel-name"><?php echo $liveStream['channel']; ?></span>
|
||||
</div>
|
||||
<?php if (!empty($liveStream['description'])): ?>
|
||||
<div class="live-description">
|
||||
<?php echo markdown_to_html($liveStream['description']); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
// Aucun direct en cours
|
||||
?>
|
||||
<div class="no-live-message">
|
||||
<i class="fas fa-tv"></i>
|
||||
<h2>Aucun direct en cours</h2>
|
||||
<p>Revenez plus tard pour découvrir nos prochaines diffusions en direct.</p>
|
||||
<a href="index.php" class="btn-primary">Retour à l'accueil</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include 'includes/footer.php'; ?>
|
||||
<?php include 'includes/mobile-menu.php'; ?>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
<h3 class="footer-title">Catégories</h3>
|
||||
<ul class="footer-links">
|
||||
<li><a href="index.php">Accueil</a></li>
|
||||
<li><a href="#">Direct</a></li>
|
||||
<li><a href="direct.php">Direct</a></li>
|
||||
|
||||
<?php
|
||||
if (defined('PRIORITY_CATEGORIES') && !empty(PRIORITY_CATEGORIES)) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<a href="index.php" class="nav-item" data-title="Accueil">
|
||||
<i class="fas fa-home"></i> <span>Accueil</span>
|
||||
</a>
|
||||
<a href="#" class="nav-item" data-title="Direct">
|
||||
<a href="direct.php" class="nav-item" data-title="Direct">
|
||||
<i class="fas fa-broadcast-tower"></i> <span>Direct</span>
|
||||
</a>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user