From 136c5f47d2d4e20e075b616487144db9629655bb Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 17 Jun 2025 16:28:35 +0200 Subject: [PATCH 1/3] videos --- includes/navigation.php | 3 ++- videos.php | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 videos.php diff --git a/includes/navigation.php b/includes/navigation.php index 0ceb42b..15fddc2 100644 --- a/includes/navigation.php +++ b/includes/navigation.php @@ -12,7 +12,8 @@ if ($host == 'dev.dtch.online') { Last quarter % Last Matches Top20 - User Stats + User Stats + Videos diff --git a/videos.php b/videos.php new file mode 100644 index 0000000..3201f13 --- /dev/null +++ b/videos.php @@ -0,0 +1,44 @@ + + + + + + + + + +
+
+

Videos

+ + +
+ +
+ +

+
+ +
+ +

No videos found.

+ + +
+
+ + + + \ No newline at end of file -- 2.49.1 From 05796a788186e1ec303d09970a1f8d002e954879 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 17 Jun 2025 16:37:38 +0200 Subject: [PATCH 2/3] videos --- includes/styles.css | 22 ++++++++++++++++++++++ includes/styles_mobile.css | 19 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/includes/styles.css b/includes/styles.css index 6ba4400..cf3919d 100644 --- a/includes/styles.css +++ b/includes/styles.css @@ -240,3 +240,25 @@ td, th { background-color: #0f0f0f; color: #e69109; } + +/* Videos page styles */ +.videos-container { + display: flex; + flex-wrap: wrap; + gap: 16px; + justify-content: center; + padding: 1rem; +} +.video-item { + flex: 1 1 300px; + max-width: 100%; +} +.video-item video { + max-width: 100%; + max-height: 80vh; + width: auto; + height: auto; + object-fit: contain; + display: block; + margin: 0 auto; +} diff --git a/includes/styles_mobile.css b/includes/styles_mobile.css index 70bdf9e..e6aaff5 100644 --- a/includes/styles_mobile.css +++ b/includes/styles_mobile.css @@ -81,4 +81,23 @@ table { section h2 { margin-top: 10px; +} +/* Videos page responsive adjustments */ +.videos-container { + display: flex; + flex-wrap: wrap; + gap: 16px; + justify-content: center; + padding: 1rem; +} +.video-item { + flex: 1 1 100%; + max-width: 100%; +} +.video-item video { + width: 100%; + max-width: 100%; + height: auto; + display: block; + margin: 0 auto; } \ No newline at end of file -- 2.49.1 From 0eb08f3d2fca241bacef7e26981b37d138211da1 Mon Sep 17 00:00:00 2001 From: Lanta Date: Tue, 17 Jun 2025 16:46:51 +0200 Subject: [PATCH 3/3] k --- videos.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/videos.php b/videos.php index 3201f13..80805ef 100644 --- a/videos.php +++ b/videos.php @@ -7,6 +7,19 @@ $allFiles = scandir($videosDir); $videoFiles = array_filter($allFiles, function($file) use ($videosDir) { return is_file($videosDir . '/' . $file) && strtolower(pathinfo($file, PATHINFO_EXTENSION)) === 'mp4'; }); + +// Build array with creation time and sort by creation date descending +$videoData = []; +foreach ($videoFiles as $file) { + $path = $videosDir . '/' . $file; + $videoData[] = [ + 'filename' => $file, + 'ctime' => filectime($path) + ]; +} +usort($videoData, function($a, $b) { + return $b['ctime'] - $a['ctime']; +}); ?> @@ -20,15 +33,16 @@ $videoFiles = array_filter($allFiles, function($file) use ($videosDir) {

Videos

- +
- +
-

+

+

-- 2.49.1