diff --git a/app/Modules/Fykos/DefaultModule/DefaultPresenter.php b/app/Modules/Fykos/DefaultModule/DefaultPresenter.php index e2fe11eda..4035637fd 100644 --- a/app/Modules/Fykos/DefaultModule/DefaultPresenter.php +++ b/app/Modules/Fykos/DefaultModule/DefaultPresenter.php @@ -73,21 +73,37 @@ public function loadNews(): array public function loadEventData(): void { $this->template->events = [ + 'DSEF' => [ + 'heading' => [ + 'cs' => 'DSEF', + 'en' => 'DSEF' // Added English translation + ], + 'date' => date('Y-m-d H:i:s', strtotime('2024-10-21 09:00:00')), + 'show-in-en' => false, + 'is_series' => false, + 'url' => 'https://dsef.cz', + 'description' => [ + 'cs' => 'Den s experimentální fyzikou na Matfyzu', + 'en' => 'Day with experimental physics at Matfyz' + ], + 'show-on-timeline' => true, + 'logo_eventbox' => '/images/logos/dsef_symbol.svg', + ], 'Naboj' => [ 'heading' => [ 'cs' => 'Fyzikální Náboj', - 'en' => null + 'en' => 'Physical Náboj' // Added English translation ], 'date' => date('Y-m-d H:i:s', strtotime('2024-11-15 09:00:00')), - 'show-in-en' => false - ], - 'DSEF' => [ - 'heading' => [ - 'cs' => 'DSEF', - 'en' => null + 'show-in-en' => false, + 'is_series' => false, + 'url' => 'https://physics.naboj.org', + 'description' => [ + 'cs' => 'Týmová soutěž v Praze, Ostravě a jinde ve světě', + 'en' => 'Team competition in Prague, Ostrava, and elsewhere in the world' ], - 'date' => date('Y-m-d H:i:s', strtotime('2024-10-21 09:00:00')), - 'show-in-en' => false + 'show-on-timeline' => true, + 'logo_eventbox' => '/images/logos/naboj_symbol.svg', ], 'FOL' => [ 'heading' => [ @@ -95,7 +111,15 @@ public function loadEventData(): void 'en' => 'Physics Brawl Online' ], 'date' => date('Y-m-d H:i:s', strtotime('2024-11-20 17:00:00')), - 'show-in-en' => true + 'show-in-en' => true, + 'is_series' => false, + 'url' => 'https://online.fyziklani.cz', + 'description' => [ + 'cs' => 'Celosvětová soutěž, které se může účastnit každý', + 'en' => 'Worldwide competition open to everyone' + ], + 'show-on-timeline' => true, + 'logo_eventbox' => '/images/logos/fyziklani_online_symbol.svg' ], 'FOF' => [ 'heading' => [ @@ -103,23 +127,43 @@ public function loadEventData(): void 'en' => 'Fyziklani' ], 'date' => date('Y-m-d H:i:s', strtotime('2025-02-14 10:30:00')), - 'show-in-en' => true + 'show-in-en' => true, + 'is_series' => false, + 'url' => 'https://fyziklani.cz', + 'description' => [ + 'cs' => 'Největší týmová fyzikální soutěž v Evropě', + 'en' => 'The largest team physics competition in Europe' + ], + 'show-on-timeline' => true, + 'logo_eventbox' => '/images/logos/fyziklani_symbol.svg' ], 'serie-1' => [ 'heading' => [ 'cs' => 'Deadline 1. série', 'en' => 'Deadline Series 1' ], - 'date' => date('Y-m-d H:i:s', strtotime('2024-10-06 23:59:59')), - 'show-in-en' => true + 'date' => date('Y-m-d H:i:s', strtotime('2024-10-06 23:59:59')), + 'show-in-en' => true, + 'is_series' => true, + 'description' => [ + 'cs' => 'Rýže, kondenzátor a filodendron na cestě', + 'en' => 'Rice, capacitor, and philodendron on the road' ], + 'show-on-timeline' => true + ], 'serie-2' => [ 'heading' => [ 'cs' => 'Deadline 2. série', 'en' => 'Deadline Series 2' ], 'date' => date('Y-m-d H:i:s', strtotime('2024-11-24 23:59:59')), - 'show-in-en' => true + 'show-in-en' => true, + 'is_series' => true, + 'description' => [ + 'cs' => 'Bitcoin, stromy a omrzování', + 'en' => 'Bitcoin, trees, and cold exposure' + ], + 'show-on-timeline' => true ], 'serie-3' => [ 'heading' => [ @@ -127,7 +171,13 @@ public function loadEventData(): void 'en' => 'Deadline Series 3' ], 'date' => date('Y-m-d H:i:s', strtotime('2025-01-12 23:59:59')), - 'show-in-en' => true + 'show-in-en' => true, + 'is_series' => true, + 'description' => [ + 'cs' => 'Chleba, starý zářič a aquapark', + 'en' => 'Bread, radiation emitter, and water park' + ], + 'show-on-timeline' => true ], 'serie-4' => [ 'heading' => [ @@ -135,7 +185,13 @@ public function loadEventData(): void 'en' => 'Deadline Series 4' ], 'date' => date('Y-m-d H:i:s', strtotime('2025-02-23 23:59:59')), - 'show-in-en' => true + 'show-in-en' => true, + 'is_series' => true, + 'description' => [ + 'cs' => 'Kouř, stín a raketou na zkoušku', + 'en' => 'Smoke, shadow, and rocketing to an exam' + ], + 'show-on-timeline' => true ], 'serie-5' => [ 'heading' => [ @@ -143,7 +199,13 @@ public function loadEventData(): void 'en' => 'Deadline Series 5' ], 'date' => date('Y-m-d H:i:s', strtotime('2025-03-30 23:59:59')), - 'show-in-en' => true + 'show-in-en' => true, + 'is_series' => true, + 'description' => [ + 'cs' => 'Čtverec, minigolf a vagon ve vesmíru', + 'en' => 'Square, minigolf, and a wagon in space' + ], + 'show-on-timeline' => true ], 'serie-6' => [ 'heading' => [ @@ -151,11 +213,22 @@ public function loadEventData(): void 'en' => 'Deadline Series 6' ], 'date' => date('Y-m-d H:i:s', strtotime('2025-05-11 23:59:59')), - 'show-in-en' => true + 'show-in-en' => true, + 'is_series' => true, + 'description' => [ + 'cs' => 'Akční film, ponorka a ořezávání tužky', + 'en' => 'Action movie, submarine, and pencil sharpening' + ], + 'show-on-timeline' => true ] ]; $this->template->timelineBegin = date('Y-m-d', strtotime('2024-09-01')); $this->template->timelineEnd = date('Y-m-d', strtotime('2025-05-31')); + + // sort chronologically + // usort($this->template->events, function ($a, $b) { + // return strtotime($a['date']) - strtotime($b['date']); + // }); } public function findCountdownEventIndices(array $events): array diff --git a/app/Modules/Fykos/DefaultModule/templates/Default/default.latte b/app/Modules/Fykos/DefaultModule/templates/Default/default.latte index 548da6271..72d4ed767 100644 --- a/app/Modules/Fykos/DefaultModule/templates/Default/default.latte +++ b/app/Modules/Fykos/DefaultModule/templates/Default/default.latte @@ -171,10 +171,8 @@