config dynamics videos
This commit is contained in:
@@ -1,65 +1,14 @@
|
||||
<?php
|
||||
// Dans un vrai projet, ces données viendraient d'une API PeerTube
|
||||
// Pour cet exemple, on utilise des données statiques
|
||||
$recentVideos = [
|
||||
[
|
||||
'id' => 4,
|
||||
'title' => 'Festival Sakifo 2023 - Les meilleurs moments',
|
||||
'thumbnail' => 'img/video-thumbnails/recent-1.jpg',
|
||||
'duration' => 1832, // en secondes
|
||||
'channel' => 'Culture 974',
|
||||
'views' => 3420,
|
||||
'date' => '2023-12-15'
|
||||
],
|
||||
[
|
||||
'id' => 5,
|
||||
'title' => 'Cuisine créole: Recette du rougail saucisse traditionnel',
|
||||
'thumbnail' => 'img/video-thumbnails/recent-2.jpg',
|
||||
'duration' => 685,
|
||||
'channel' => 'Saveurs des Îles',
|
||||
'views' => 7245,
|
||||
'date' => '2023-12-10'
|
||||
],
|
||||
[
|
||||
'id' => 6,
|
||||
'title' => 'Tutoriel: Créer votre première application web avec PHP',
|
||||
'thumbnail' => 'img/video-thumbnails/recent-3.jpg',
|
||||
'duration' => 1540,
|
||||
'channel' => 'CodeMastery',
|
||||
'views' => 2180,
|
||||
'date' => '2023-12-08'
|
||||
],
|
||||
[
|
||||
'id' => 7,
|
||||
'title' => 'Les plus belles plages de La Réunion en 2023',
|
||||
'thumbnail' => 'img/video-thumbnails/recent-4.jpg',
|
||||
'duration' => 925,
|
||||
'channel' => 'Île Aventure',
|
||||
'views' => 5690,
|
||||
'date' => '2023-12-05'
|
||||
],
|
||||
[
|
||||
'id' => 8,
|
||||
'title' => 'Débat: L\'avenir du numérique à La Réunion',
|
||||
'thumbnail' => 'img/video-thumbnails/recent-5.jpg',
|
||||
'duration' => 3245,
|
||||
'channel' => 'Tech Libre',
|
||||
'views' => 1250,
|
||||
'date' => '2023-12-01'
|
||||
],
|
||||
[
|
||||
'id' => 9,
|
||||
'title' => 'Concert live: Groupe Sakili au Téat Plein Air',
|
||||
'thumbnail' => 'img/video-thumbnails/recent-6.jpg',
|
||||
'duration' => 4512,
|
||||
'channel' => 'Culture 974',
|
||||
'views' => 4325,
|
||||
'date' => '2023-11-28'
|
||||
]
|
||||
];
|
||||
// Inclure la configuration si ce n'est pas déjà fait
|
||||
if (!function_exists('getRecentVideos')) {
|
||||
require_once __DIR__ . '/config.php';
|
||||
}
|
||||
|
||||
// Récupérer les vidéos récentes depuis l'API PeerTube
|
||||
$recentVideos = getRecentVideos();
|
||||
|
||||
// Affichage des vidéos
|
||||
foreach ($recentVideos as $video) :
|
||||
foreach ($recentVideos as $video):
|
||||
?>
|
||||
<div class="video-card" data-video-id="<?php echo $video['id']; ?>">
|
||||
<div class="video-thumbnail">
|
||||
|
||||
Reference in New Issue
Block a user