From 6e695b610fe53eb87e1f6a2017eb831f6e6257b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Mi=C5=A1o=20=C4=8Cerve=C5=88=C3=A1k?= Date: Wed, 20 Mar 2024 21:31:06 +0100 Subject: [PATCH] fix latte errors --- .../ApiResults/ApiResultsComponent.php | 1 + .../ImageGallery/ImageGalleryControl.php | 2 +- .../TeamResults/TeamResultsComponent.php | 5 +- .../UpperHomePrague/upperHomePrague.latte | 1 + app/Modules/Core/BasePresenter.php | 22 ++++++--- .../Dsef/ArchiveModule/BasePresenter.php | 12 +++-- app/Modules/Dsef/Core/BasePresenter.php | 8 ++-- app/Modules/Dsef/Core/templates/@layout.latte | 1 + .../Dsef/DefaultModule/BasePresenter.php | 7 +-- .../templates/Registration/default.latte | 1 - .../Fof/ArchiveModule/BasePresenter.php | 5 +- .../DetailedResultsPresenter.php | 2 +- .../Fof/ArchiveModule/ReportsPresenter.php | 2 +- .../Fof/ArchiveModule/ResultsPresenter.php | 2 +- .../Fof/ArchiveModule/TeamsPresenter.php | 2 +- app/Modules/Fof/Core/templates/@layout.latte | 8 ++-- .../Fof/DefaultModule/BasePresenter.php | 2 +- .../Fof/DefaultModule/SchedulePresenter.php | 3 +- .../templates/Accommodation/default.latte | 3 +- .../templates/Merch/default.latte | 3 +- .../templates/Rules/default.latte | 3 +- .../templates/Scholarship/default.en.latte | 7 +-- .../templates/Scholarship/report.latte | 4 -- .../DefaultModule/templates/schedule.latte | 27 ++++++----- .../Fol/ArchiveModule/BasePresenter.php | 5 +- .../Fol/ArchiveModule/ReportsPresenter.php | 4 +- .../Fol/ArchiveModule/ResultsPresenter.php | 2 +- .../Fol/ArchiveModule/TeamsPresenter.php | 2 +- app/Modules/Fol/Core/templates/@layout.latte | 10 ++-- .../Fol/DefaultModule/BasePresenter.php | 2 +- .../Fol/DefaultModule/FaqPresenter.php | 2 +- .../DefaultModule/templates/Faq/default.latte | 1 + .../FyziklaniInternational/default.cs.latte | 2 - .../templates/Rules/complete.en.latte | 6 +-- .../templates/Rules/default.latte | 1 + .../DefaultModule/templates/schedule.latte | 1 + app/Modules/Fykos/Core/BasePresenter.php | 6 ++- .../Fykos/Core/templates/@layout.latte | 3 +- .../Fykos/DefaultModule/DefaultPresenter.php | 2 +- .../Fykos/DefaultModule/ProblemsPresenter.php | 3 ++ .../templates/About/allPastOrganizers.latte | 7 +-- .../templates/About/history.cs.latte | 29 ++++++------ .../templates/About/history.en.latte | 23 +++++---- .../templates/About/organizers.latte | 5 +- .../templates/Default/default.latte | 14 +++--- .../templates/Merch/default.latte | 9 ++-- .../templates/Problems/default.latte | 1 + .../templates/SupportUs/default.cs.latte | 6 +-- .../templates/Task/default.latte | 2 +- .../Fykos/EventsModule/CampsPresenter.php | 14 +++--- .../templates/Camps/default.cs.latte | 3 +- .../templates/Camps/detail.cs.latte | 2 + .../templates/Fykos/default.latte | 5 +- app/Modules/Vyfuk/Core/BasePresenter.php | 47 ++++++++++--------- .../templates/About/contact.latte | 1 - .../templates/About/default.latte | 1 - .../templates/About/history.latte | 1 - .../templates/About/organizers.latte | 3 +- .../templates/About/sponsors.latte | 3 +- .../templates/Archive/default.latte | 3 +- .../templates/Archive/serials.latte | 3 +- .../templates/Default/default.latte | 1 - .../templates/Events/calendar.latte | 1 - .../DefaultModule/templates/Events/camp.latte | 3 +- .../templates/Events/default.latte | 3 +- .../templates/Events/meeting.latte | 3 +- .../templates/Problems/bingo.latte | 3 +- .../templates/Problems/default.latte | 3 +- .../templates/Results/default.latte | 3 +- .../templates/Section/rules.latte | 1 - .../templates/Section/teachers.latte | 5 +- app/Renderers/templates/formRender.latte | 1 + 72 files changed, 212 insertions(+), 182 deletions(-) diff --git a/app/Components/ApiResults/ApiResultsComponent.php b/app/Components/ApiResults/ApiResultsComponent.php index 8dde2ac6..0e478afe 100644 --- a/app/Components/ApiResults/ApiResultsComponent.php +++ b/app/Components/ApiResults/ApiResultsComponent.php @@ -85,6 +85,7 @@ public function render(): void /** * @throws JsonException + * @throws Throwable */ public function renderTeamsData(): void { diff --git a/app/Components/ImageGallery/ImageGalleryControl.php b/app/Components/ImageGallery/ImageGalleryControl.php index 98c8322a..ea963fa9 100644 --- a/app/Components/ImageGallery/ImageGalleryControl.php +++ b/app/Components/ImageGallery/ImageGalleryControl.php @@ -3,7 +3,7 @@ declare(strict_types=1); namespace App\Components\ImageGallery; -; + use Fykosak\Utils\Components\DIComponent; use Nette\Caching\Cache; use Nette\Caching\Storage; diff --git a/app/Components/TeamResults/TeamResultsComponent.php b/app/Components/TeamResults/TeamResultsComponent.php index 9b45a70e..b15a673d 100644 --- a/app/Components/TeamResults/TeamResultsComponent.php +++ b/app/Components/TeamResults/TeamResultsComponent.php @@ -6,6 +6,7 @@ use App\Models\NetteDownloader\ORM\Models\ModelTeam; use App\Models\NetteDownloader\ORM\Services\DummyService; +use App\Modules\Core\Lang; use Fykosak\FKSDBDownloaderCore\Requests\TeamsRequest; use Fykosak\Utils\Components\DIComponent; use Nette\Application\UI\Form; @@ -148,7 +149,7 @@ protected function createComponentFilterForm(): Form // one member teams $form->addCheckbox( 'OneMemberTeams', - $this->translator->lang === 'cs' ? 'Pouze jednočlenné týmy' : 'One member teams only' + $this->translator->lang === Lang::CS ? 'Pouze jednočlenné týmy' : 'One member teams only' ); // countries @@ -163,7 +164,7 @@ protected function createComponentFilterForm(): Form $countryISOContainer->addCheckbox( $countryISO, sprintf( - $this->translator->lang === 'cs' ? '%s:%s účastníků' : '%s:%s participants', + $this->translator->lang === Lang::CS ? '%s:%s účastníků' : '%s:%s participants', $countryISO, $count ) diff --git a/app/Components/UpperHomePrague/upperHomePrague.latte b/app/Components/UpperHomePrague/upperHomePrague.latte index bfd68e33..fd35f9bb 100644 --- a/app/Components/UpperHomePrague/upperHomePrague.latte +++ b/app/Components/UpperHomePrague/upperHomePrague.latte @@ -1,4 +1,5 @@ {varType App\Models\GamePhaseCalculator $gamePhaseCalculator} +{varType string $lang} {block content} diff --git a/app/Modules/Core/BasePresenter.php b/app/Modules/Core/BasePresenter.php index ef981cbe..97c1e277 100644 --- a/app/Modules/Core/BasePresenter.php +++ b/app/Modules/Core/BasePresenter.php @@ -10,6 +10,7 @@ use App\Models\Exceptions\UnderConstructionException; use Fykosak\Utils\Localization\GettextTranslator; use Fykosak\Utils\Localization\UnsupportedLanguageException; +use Fykosak\Utils\UI\Navigation\NavItem; use Fykosak\Utils\UI\PageTitle; use Nette\Application\UI\Presenter; use Nette\Application\UI\Template; @@ -18,6 +19,7 @@ abstract class BasePresenter extends Presenter { /** @persistent */ public ?string $lang = null; // = 'cs'; + public Lang $language; public GettextTranslator $translator; @@ -45,6 +47,9 @@ protected function createComponentNavigation(): Navigation return $navigation; } + /** + * @return NavItem[] + */ abstract protected function getNavItems(): array; final public function setPageTitle(PageTitle $pageTitle): void @@ -56,6 +61,7 @@ protected function createTemplate(): Template { $template = parent::createTemplate(); $template->lang = $this->lang; + $template->language = $this->language; /** @var \Nette\Bridges\ApplicationLatte\Template $template */ $template->setTranslator($this->translator); @@ -71,18 +77,22 @@ protected function createTemplate(): Template protected function localize(): void { // Lang is null in error presenter because no rote rule was applied - if (!isset($this->lang) || $this->lang == null) { + if (!isset($this->lang) || !$this->lang) { $this->lang = 'en'; // todo guess language by domain } + $this->language = Lang::from($this->lang); - $this->translator->setLang($this->lang); + $this->translator->setLang($this->language); } + /** + * @return string[] + */ public function formatTemplateFiles(): array { [$file,] = parent::formatTemplateFiles(); return [ - str_replace('.latte', '.' . $this->lang . '.latte', $file), + str_replace('.latte', '.' . $this->language->value . '.latte', $file), $file, ]; } @@ -92,7 +102,7 @@ public function formatTemplateFiles(): array */ protected function csen(string $cs, string $en): string { - if ($this->lang === 'cs') { + if ($this->translator->lang === Lang::CS) { return $cs; } else { return $en; @@ -115,11 +125,11 @@ protected function throwUnderConstructionException(): void */ protected function createComponentGallery(): ImageGalleryControl { - return new ImageGalleryControl($this->context); + return new ImageGalleryControl($this->getContext()); } protected function createComponentPdfGallery(): PdfGalleryControl { - return new PdfGalleryControl($this->context); + return new PdfGalleryControl($this->getContext()); } } diff --git a/app/Modules/Dsef/ArchiveModule/BasePresenter.php b/app/Modules/Dsef/ArchiveModule/BasePresenter.php index 5768f9ed..0a7dd9ce 100644 --- a/app/Modules/Dsef/ArchiveModule/BasePresenter.php +++ b/app/Modules/Dsef/ArchiveModule/BasePresenter.php @@ -74,7 +74,7 @@ public function formatTemplateFiles(): array $key = parent::getEventKey($this->getEvent()); return [ - str_replace('.latte', '.' . $key . '.' . $this->lang . '.latte', end($files)), + str_replace('.latte', '.' . $key . '.' . $this->language->value . '.latte', end($files)), str_replace('.latte', '.' . $key . '.latte', end($files)), ...$files, ]; @@ -97,25 +97,29 @@ protected function createComponentScheduleParticipants(): AllScheduleListCompone return new AllScheduleListComponent($this->event->eventId, $this->getContext()); } + /** + * @return NavItem[] + * @throws \Throwable + */ protected function getNavItems(): array { $items = []; if (RegistrationPresenter::isVisible($this->gamePhaseCalculator)) { $items[] = new NavItem( - new PageTitle( 'Registrace', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Registrace', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO ':Default:Registration:', ); } if (CurrentPresenter::isVisible($this->gamePhaseCalculator)) { $items[] = new NavItem( - new PageTitle( 'Aktuální ročník', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Aktuální ročník', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO ':Default:Current:', ); } $items[] = new NavItem( - new PageTitle( 'Archiv', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Archiv', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO ':Default:Archive:default', ); return $items; diff --git a/app/Modules/Dsef/Core/BasePresenter.php b/app/Modules/Dsef/Core/BasePresenter.php index 53bf44c0..f2514b35 100644 --- a/app/Modules/Dsef/Core/BasePresenter.php +++ b/app/Modules/Dsef/Core/BasePresenter.php @@ -35,21 +35,21 @@ protected function localize(): void } /** - * @throws \Throwable + * @return NavItem[] */ protected function getNavItems(): array { $items = []; $items[] = new NavItem( - new PageTitle( 'Registrace', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Registrace', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO 'Registration:', ); $items[] = new NavItem( - new PageTitle( 'Aktuální ročník', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Aktuální ročník', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO 'Current:', ); $items[] = new NavItem( - new PageTitle( 'Minulé ročníky', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Minulé ročníky', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO 'Archive:', ); diff --git a/app/Modules/Dsef/Core/templates/@layout.latte b/app/Modules/Dsef/Core/templates/@layout.latte index 8033adea..14ec9caa 100644 --- a/app/Modules/Dsef/Core/templates/@layout.latte +++ b/app/Modules/Dsef/Core/templates/@layout.latte @@ -1,3 +1,4 @@ +{varType string $lang} diff --git a/app/Modules/Dsef/DefaultModule/BasePresenter.php b/app/Modules/Dsef/DefaultModule/BasePresenter.php index 40488db4..3e7caa48 100644 --- a/app/Modules/Dsef/DefaultModule/BasePresenter.php +++ b/app/Modules/Dsef/DefaultModule/BasePresenter.php @@ -10,6 +10,7 @@ abstract class BasePresenter extends \App\Modules\Dsef\Core\BasePresenter { /** + * @return NavItem[] * @throws \Throwable */ protected function getNavItems(): array @@ -17,20 +18,20 @@ protected function getNavItems(): array $items = []; if (RegistrationPresenter::isVisible($this->gamePhaseCalculator)) { $items[] = new NavItem( - new PageTitle( 'Registrace', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Registrace', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO 'Registration:', ); } if (CurrentPresenter::isVisible($this->gamePhaseCalculator)) { $items[] = new NavItem( - new PageTitle( 'Aktuální ročník', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Aktuální ročník', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO 'Current:', ); } $items[] = new NavItem( - new PageTitle( 'Minulé ročníky', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO + new PageTitle('Minulé ročníky', 'visible-sm-inline glyphicon glyphicon-info-sign'), // TODO 'Archive:', ); return $items; diff --git a/app/Modules/Dsef/DefaultModule/templates/Registration/default.latte b/app/Modules/Dsef/DefaultModule/templates/Registration/default.latte index b8bf3d5c..290249f3 100644 --- a/app/Modules/Dsef/DefaultModule/templates/Registration/default.latte +++ b/app/Modules/Dsef/DefaultModule/templates/Registration/default.latte @@ -1,4 +1,3 @@ -{varType string $lang} {varType App\Models\GamePhaseCalculator $gamePhaseCalculator} {block title} diff --git a/app/Modules/Fof/ArchiveModule/BasePresenter.php b/app/Modules/Fof/ArchiveModule/BasePresenter.php index 74665990..b752a082 100644 --- a/app/Modules/Fof/ArchiveModule/BasePresenter.php +++ b/app/Modules/Fof/ArchiveModule/BasePresenter.php @@ -58,6 +58,9 @@ protected function getEvent(): ModelEvent return $this->event; } + /** + * @return NavItem[] + */ protected function getNavItems(): array { return [ @@ -100,7 +103,7 @@ public function formatTemplateFiles(): array $key = parent::createEventKey($this->getEvent()); return [ - str_replace('.latte', '.' . $key . '.' . $this->lang . '.latte', end($files)), + str_replace('.latte', '.' . $key . '.' . $this->language->value . '.latte', end($files)), str_replace('.latte', '.' . $key . '.latte', end($files)), ...$files, ]; diff --git a/app/Modules/Fof/ArchiveModule/DetailedResultsPresenter.php b/app/Modules/Fof/ArchiveModule/DetailedResultsPresenter.php index 1d25ec7d..548ed153 100644 --- a/app/Modules/Fof/ArchiveModule/DetailedResultsPresenter.php +++ b/app/Modules/Fof/ArchiveModule/DetailedResultsPresenter.php @@ -10,6 +10,6 @@ class DetailedResultsPresenter extends BasePresenter { public function renderDefault(): void { - $this->setPageTitle(new PageTitle( $this->csen('Podrobné výsledky', 'Detailed results'))); + $this->setPageTitle(new PageTitle($this->csen('Podrobné výsledky', 'Detailed results'))); } } diff --git a/app/Modules/Fof/ArchiveModule/ReportsPresenter.php b/app/Modules/Fof/ArchiveModule/ReportsPresenter.php index 419284d7..5a01d156 100644 --- a/app/Modules/Fof/ArchiveModule/ReportsPresenter.php +++ b/app/Modules/Fof/ArchiveModule/ReportsPresenter.php @@ -20,7 +20,7 @@ public function renderDefault(): void /* $this->template->reports = $this->reportService->getTable() ->where('lang = ? AND event_id = ?', $this->lang, $this->getEvent()->eventId);*/ $this->template->year = $this->getEvent()->begin->format('Y'); - $this->setPageTitle(new PageTitle( $this->csen('Ohlasy účastníků', 'Contestants\' reports'))); + $this->setPageTitle(new PageTitle($this->csen('Ohlasy účastníků', 'Contestants\' reports'))); } /** diff --git a/app/Modules/Fof/ArchiveModule/ResultsPresenter.php b/app/Modules/Fof/ArchiveModule/ResultsPresenter.php index e68ed024..3db93988 100644 --- a/app/Modules/Fof/ArchiveModule/ResultsPresenter.php +++ b/app/Modules/Fof/ArchiveModule/ResultsPresenter.php @@ -13,7 +13,7 @@ class ResultsPresenter extends BasePresenter public function renderDefault(): void { - $this->setPageTitle(new PageTitle( $this->csen('Výsledky', 'Results'))); + $this->setPageTitle(new PageTitle($this->csen('Výsledky', 'Results'))); } /** diff --git a/app/Modules/Fof/ArchiveModule/TeamsPresenter.php b/app/Modules/Fof/ArchiveModule/TeamsPresenter.php index d9b7cbe6..a4fab018 100644 --- a/app/Modules/Fof/ArchiveModule/TeamsPresenter.php +++ b/app/Modules/Fof/ArchiveModule/TeamsPresenter.php @@ -12,7 +12,7 @@ class TeamsPresenter extends BasePresenter { public function renderDefault(): void { - $this->setPageTitle(new PageTitle( $this->csen('Týmy', 'Teams'))); + $this->setPageTitle(new PageTitle($this->csen('Týmy', 'Teams'))); } /** diff --git a/app/Modules/Fof/Core/templates/@layout.latte b/app/Modules/Fof/Core/templates/@layout.latte index c6e501a5..3279f34d 100644 --- a/app/Modules/Fof/Core/templates/@layout.latte +++ b/app/Modules/Fof/Core/templates/@layout.latte @@ -1,10 +1,10 @@ -{varType App\Modules\Core\BasePresenter $presenter} {varType string $lang} +{varType App\Modules\Core\Lang $language} {varType App\Models\GamePhaseCalculator $gamePhaseCalculator} - + {ifset title}{include title} | {/ifset} @@ -25,7 +25,7 @@ <meta property="og:image" content="{switch $lang}{case cs}https://fyziklani.cz/images/fof-og-image-cs.png{default}https://fyziklani.cz/images/fof-og-image-en.png{/switch}"/> <meta property="og:description" content="{switch $lang}{case cs}Týmová soutěž v řešení fyzikálních problémů{default}Team competition in solving physics problems{/switch}"/> <meta property="og:image:type" content="image/png"/> - <meta property="og:locale" content="{$presenter->translator->locales[$presenter->lang]}"/> + <meta property="og:locale" content="{$language->getLocale()}"/> <meta property="og:url" content="{plink //this}"/> <link href="{$basePath}/images/icon.png" rel="icon" type="image/png"/> <link href="{asset 'assets/main.css'}" rel="stylesheet"/> @@ -128,7 +128,7 @@ </a>*} <a href="https://www.nfneuron.cz/" style="text-align: center"> <img src="{$basePath}/images/logos/neuron-logo.jpg" alt="Neuron logo" style="max-width: 10rem"> - </a> + </a> </div> </div> <div class="category"> diff --git a/app/Modules/Fof/DefaultModule/BasePresenter.php b/app/Modules/Fof/DefaultModule/BasePresenter.php index add8fba7..934567f0 100644 --- a/app/Modules/Fof/DefaultModule/BasePresenter.php +++ b/app/Modules/Fof/DefaultModule/BasePresenter.php @@ -33,7 +33,7 @@ protected function getNavItems(): array ); $items[] = new NavItem( new PageTitle( - $this->csen('Ubytování', 'Accommodation'), + $this->csen('Ubytování', 'Accommodation'), 'visible-sm-inline glyphicon glyphicon-question-sign' ), ':Default:Accommodation:default', diff --git a/app/Modules/Fof/DefaultModule/SchedulePresenter.php b/app/Modules/Fof/DefaultModule/SchedulePresenter.php index 246034ff..f0d8e770 100644 --- a/app/Modules/Fof/DefaultModule/SchedulePresenter.php +++ b/app/Modules/Fof/DefaultModule/SchedulePresenter.php @@ -6,6 +6,7 @@ use App\Models\Downloader\FKSDBDownloader; use App\Models\Downloader\ScheduleRequest; +use App\Modules\Core\Lang; final class SchedulePresenter extends BasePresenter { @@ -18,7 +19,7 @@ public function inject(FKSDBDownloader $downloader): void public function translateDay(string $day): string { - if ($this->lang !== 'cs') { + if ($this->language !== Lang::CS) { return $day; } return match ($day) { diff --git a/app/Modules/Fof/DefaultModule/templates/Accommodation/default.latte b/app/Modules/Fof/DefaultModule/templates/Accommodation/default.latte index 27b4418b..b09d43d1 100644 --- a/app/Modules/Fof/DefaultModule/templates/Accommodation/default.latte +++ b/app/Modules/Fof/DefaultModule/templates/Accommodation/default.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block main} <div class="panel color-auto"> <section class="inner-container"> @@ -26,7 +27,7 @@ <p><a href="https://www.hotelduo.cz/">Hotel Duo</a> je čtyřhvězdičkový hotel kousek od metra Střížkov. Jeho polohu najdete na adrese <a href="https://www.google.com/maps/place/Hotel+Duo/@50.12811,14.4721567,14.5z/data=!4m8!3m7!1s0x470bec9f3e172603:0x19ad14d3ab594bd!5m2!4m1!1i2!8m2!3d50.1268927!4d14.4859316">Teplická 492, 190 00 Praha, Česká republika</a>.</p> <p>V ceně ubytování je zahrnuta snídaně formou bufetu.</p> - + <p>Pokoje v hotelu jsou dvojlůžkové a trojlůžkové. Soutěžící a doprovod bude do pokojů přiřazen podle délky pobytu a až poté podle vlastních preferencí (tedy ubytovaní na více nocí zřejmě nebudou s těmi na jednu noc). </p> {default} diff --git a/app/Modules/Fof/DefaultModule/templates/Merch/default.latte b/app/Modules/Fof/DefaultModule/templates/Merch/default.latte index ec6f3661..3ae7cc16 100644 --- a/app/Modules/Fof/DefaultModule/templates/Merch/default.latte +++ b/app/Modules/Fof/DefaultModule/templates/Merch/default.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block main} <div class="panel color-auto"> <section class="inner-container"> @@ -195,4 +196,4 @@ </div> </section> </div> -{/block} \ No newline at end of file +{/block} diff --git a/app/Modules/Fof/DefaultModule/templates/Rules/default.latte b/app/Modules/Fof/DefaultModule/templates/Rules/default.latte index bb3970da..df90bead 100644 --- a/app/Modules/Fof/DefaultModule/templates/Rules/default.latte +++ b/app/Modules/Fof/DefaultModule/templates/Rules/default.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block subtitle} {switch $lang} {case cs}Pravidla @@ -144,4 +145,4 @@ </div> </div> -{/block} \ No newline at end of file +{/block} diff --git a/app/Modules/Fof/DefaultModule/templates/Scholarship/default.en.latte b/app/Modules/Fof/DefaultModule/templates/Scholarship/default.en.latte index cff57bfa..9450696d 100644 --- a/app/Modules/Fof/DefaultModule/templates/Scholarship/default.en.latte +++ b/app/Modules/Fof/DefaultModule/templates/Scholarship/default.en.latte @@ -1,9 +1,10 @@ +{varType string $lang} {block title}Scholarship Program{/block} {block main} <div class="panel color-auto"> <section class="inner-container"> - {* + {* {ifset subtitle}<div class="subheader">{include subtitle}</div>{/ifset} {ifset title}<h1>{include title}</h1>{/ifset} *} @@ -46,7 +47,7 @@ <p>The applications are for high-school (or equivalent) students only and should be made in a team of up to 5, where all the participants are at least 15 years old and from at most 2 different schools.</p> <p>Any team satisfying the above criteria anywhere in the world can apply. Note, however, that while Fyziklani aims to be open to all high-school students all around the world, the resources for this scholarship are limited. Thus, it is aimed preferentially (not exclusively) at highly-talented students from economically less-advantaged backgrounds or from areas where the students have comparatively fewer opportunities than in Europe.</p> - + <p>We also recommend to, before applying, register in the Physics Brawl Online, which is essentially an online version of Fyziklani. Firstly, it will give you an idea of how Fyziklani itself works, and secondly, it is relevant to the application.</p> <p>Applications for the scholarship ended on November 30, 2023. The results have been announced to the applicants.</p> @@ -96,4 +97,4 @@ </section> </div> -{/block main} \ No newline at end of file +{/block main} diff --git a/app/Modules/Fof/DefaultModule/templates/Scholarship/report.latte b/app/Modules/Fof/DefaultModule/templates/Scholarship/report.latte index 9a0cd480..880cc978 100644 --- a/app/Modules/Fof/DefaultModule/templates/Scholarship/report.latte +++ b/app/Modules/Fof/DefaultModule/templates/Scholarship/report.latte @@ -1,7 +1,3 @@ -{varType string $lang} -{varType App\Models\NetteDownloader\ORM\Models\ModelEvent $event} -{varType string $eventKey} - {block subtitle} Participant's view of the event {/block} diff --git a/app/Modules/Fof/DefaultModule/templates/schedule.latte b/app/Modules/Fof/DefaultModule/templates/schedule.latte index 63491acc..fa1cafbc 100644 --- a/app/Modules/Fof/DefaultModule/templates/schedule.latte +++ b/app/Modules/Fof/DefaultModule/templates/schedule.latte @@ -1,5 +1,6 @@ +{varType string $lang} <div class="timeline timeline-wider"> - + <div> <div class="timeline-group">{switch $lang}{case cs}Pondělí 12. 2.{default}Monday, Feb 12{/switch}</div> @@ -45,7 +46,7 @@ </div> {/switch} </div> - + <div> <span class="timeline-element-icon"></span> {switch $lang} @@ -65,7 +66,7 @@ {/switch} </div> </div> - + <div> <div class="timeline-group">{switch $lang}{case cs}Úterý 13. 2.{default}Tuesday, Feb 13{/switch}</div> @@ -90,7 +91,7 @@ </div> {/switch} </div> - + <div> <span class="timeline-element-icon"></span> {switch $lang} @@ -112,7 +113,7 @@ </div> {/switch} </div> - + <div> <span class="timeline-element-icon"></span> {switch $lang} @@ -135,11 +136,11 @@ {/switch} </div> </div> - - + + <div> <div class="timeline-group">{switch $lang}{case cs}Středa 14. 2.{default}Wednesday, Feb 14{/switch}</div> - + <div> <span class="timeline-element-icon"></span> {switch $lang} @@ -161,7 +162,7 @@ </div> {/switch} </div> - + <div> <span class="timeline-element-icon"></span> {switch $lang} @@ -183,7 +184,7 @@ </div> {/switch} </div> - + <div> <span class="timeline-element-icon"></span> {switch $lang} @@ -222,7 +223,7 @@ </div> {/switch} </div> - + </div> <div> <div class="timeline-group">{switch $lang}{case cs}Čtvrtek 15. 2.{default}Thursday, Feb 15{/switch}</div> @@ -326,7 +327,7 @@ Presentation about FYKOS during the break before announcement of results </p> </div> - {/switch} + {/switch} </div> <div> @@ -484,4 +485,4 @@ {/switch} </div> </div> -</div> \ No newline at end of file +</div> diff --git a/app/Modules/Fol/ArchiveModule/BasePresenter.php b/app/Modules/Fol/ArchiveModule/BasePresenter.php index 4d7982c7..922e2a4b 100644 --- a/app/Modules/Fol/ArchiveModule/BasePresenter.php +++ b/app/Modules/Fol/ArchiveModule/BasePresenter.php @@ -58,6 +58,9 @@ protected function getEvent(): ModelEvent return $this->event; } + /** + * @return NavItem[] + */ protected function getNavItems(): array { return [ @@ -103,7 +106,7 @@ public function formatTemplateFiles(): array $key = parent::createEventKey($this->getEvent()); return [ - str_replace('.latte', '.' . $key . '.' . $this->lang . '.latte', end($files)), + str_replace('.latte', '.' . $key . '.' . $this->language->value . '.latte', end($files)), str_replace('.latte', '.' . $key . '.latte', end($files)), ...$files, ]; diff --git a/app/Modules/Fol/ArchiveModule/ReportsPresenter.php b/app/Modules/Fol/ArchiveModule/ReportsPresenter.php index 35876f00..44205143 100644 --- a/app/Modules/Fol/ArchiveModule/ReportsPresenter.php +++ b/app/Modules/Fol/ArchiveModule/ReportsPresenter.php @@ -20,10 +20,10 @@ public function renderDefault(): void $data = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'reports.json'); $query = json_decode($data); $this->template->reports = array_filter($query, function ($item) { - return $item->lang === $this->lang && $item->event_id === $this->getEvent()->eventId; + return $item->lang === $this->language->value && $item->event_id === $this->getEvent()->eventId; }); $this->template->year = $this->getEvent()->begin->format('Y'); - $this->setPageTitle(new PageTitle( $this->csen('Ohlasy účastníků', 'Contestants\' reports'))); + $this->setPageTitle(new PageTitle($this->csen('Ohlasy účastníků', 'Contestants\' reports'))); } /** diff --git a/app/Modules/Fol/ArchiveModule/ResultsPresenter.php b/app/Modules/Fol/ArchiveModule/ResultsPresenter.php index 539a56cc..fc0ca022 100644 --- a/app/Modules/Fol/ArchiveModule/ResultsPresenter.php +++ b/app/Modules/Fol/ArchiveModule/ResultsPresenter.php @@ -13,7 +13,7 @@ class ResultsPresenter extends BasePresenter public function renderDefault(): void { - $this->setPageTitle(new PageTitle( $this->csen('Výsledky', 'Results'))); + $this->setPageTitle(new PageTitle($this->csen('Výsledky', 'Results'))); } /** diff --git a/app/Modules/Fol/ArchiveModule/TeamsPresenter.php b/app/Modules/Fol/ArchiveModule/TeamsPresenter.php index 1df88aa9..373e0d91 100644 --- a/app/Modules/Fol/ArchiveModule/TeamsPresenter.php +++ b/app/Modules/Fol/ArchiveModule/TeamsPresenter.php @@ -12,7 +12,7 @@ class TeamsPresenter extends BasePresenter { public function renderDefault(): void { - $this->setPageTitle(new PageTitle( $this->csen('Týmy', 'Teams'))); + $this->setPageTitle(new PageTitle($this->csen('Týmy', 'Teams'))); } /** diff --git a/app/Modules/Fol/Core/templates/@layout.latte b/app/Modules/Fol/Core/templates/@layout.latte index 211c7173..315f48b0 100644 --- a/app/Modules/Fol/Core/templates/@layout.latte +++ b/app/Modules/Fol/Core/templates/@layout.latte @@ -1,10 +1,10 @@ -{varType App\Modules\Core\BasePresenter $presenter} {varType string $lang} +{varType App\Modules\Core\Lang $language} {varType App\Models\GamePhaseCalculator $gamePhaseCalculator} <!DOCTYPE html> -<html lang="{$presenter->lang}"> +<html lang="{$language->value}"> <head> <title> {ifset title}{include title} | {/ifset} @@ -25,7 +25,7 @@ <meta property="og:image" content="{switch $lang}{case cs}https://online.fyziklani.cz/images/fol-og-image-cs.png{default}https://physicsbrawl.org/images/fol-og-image-en.png{/switch}"/> <meta property="og:description" content="{switch $lang}{case cs}Týmová soutěž v řešení fyzikálních problémů{default}Team competition in solving physics problems{/switch}"/> <meta property="og:image:type" content="image/png"/> - <meta property="og:locale" content="{$presenter->translator->locales[$presenter->lang]}"/> + <meta property="og:locale" content="{$language->getLocale()}"/> <meta property="og:url" content="{plink //this}"/> <link href="{$basePath}/images/fol_symbol.svg" rel="icon" type="image/svg"/> <link href="{asset 'assets/main.css'}" rel="stylesheet"/> @@ -252,8 +252,8 @@ </nav> <a href="#top" style="position: absolute; bottom: 0; right: 0;"><i class="fas fa-arrow-up"></i></a> </div> - - + + {*<div class="col-md-3"> <nav> <ul> diff --git a/app/Modules/Fol/DefaultModule/BasePresenter.php b/app/Modules/Fol/DefaultModule/BasePresenter.php index 37247a7e..b6ee9065 100755 --- a/app/Modules/Fol/DefaultModule/BasePresenter.php +++ b/app/Modules/Fol/DefaultModule/BasePresenter.php @@ -64,7 +64,7 @@ protected function getNavItems(): array if (TeamsPresenter::isVisible($this->gamePhaseCalculator)) { $items[] = new NavItem( - new PageTitle( $this->csen('Týmy', 'Teams'), 'visible-sm-inline glyphicon glyphicon-edit'), + new PageTitle($this->csen('Týmy', 'Teams'), 'visible-sm-inline glyphicon glyphicon-edit'), ':Default:Teams:', ); } diff --git a/app/Modules/Fol/DefaultModule/FaqPresenter.php b/app/Modules/Fol/DefaultModule/FaqPresenter.php index cdf6ef4e..4b7af9f1 100644 --- a/app/Modules/Fol/DefaultModule/FaqPresenter.php +++ b/app/Modules/Fol/DefaultModule/FaqPresenter.php @@ -11,7 +11,7 @@ private function loadQuestions(): void $data = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'faq.json'); $query = json_decode($data); $query = array_filter($query, function ($item) { - return $item->lang === $this->lang; + return $item->lang === $this->language->value; }); // questions sorted by category diff --git a/app/Modules/Fol/DefaultModule/templates/Faq/default.latte b/app/Modules/Fol/DefaultModule/templates/Faq/default.latte index 83a7b87c..f5a45564 100644 --- a/app/Modules/Fol/DefaultModule/templates/Faq/default.latte +++ b/app/Modules/Fol/DefaultModule/templates/Faq/default.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block title} {switch $lang} {case cs}Často kladené dotazy diff --git a/app/Modules/Fol/DefaultModule/templates/FyziklaniInternational/default.cs.latte b/app/Modules/Fol/DefaultModule/templates/FyziklaniInternational/default.cs.latte index fd8d092b..be6ef3b8 100644 --- a/app/Modules/Fol/DefaultModule/templates/FyziklaniInternational/default.cs.latte +++ b/app/Modules/Fol/DefaultModule/templates/FyziklaniInternational/default.cs.latte @@ -1,5 +1,3 @@ -{varType string $lang} - {block title}Fyziklani International{/block} {block content} diff --git a/app/Modules/Fol/DefaultModule/templates/Rules/complete.en.latte b/app/Modules/Fol/DefaultModule/templates/Rules/complete.en.latte index 20c85976..d9dd40ec 100644 --- a/app/Modules/Fol/DefaultModule/templates/Rules/complete.en.latte +++ b/app/Modules/Fol/DefaultModule/templates/Rules/complete.en.latte @@ -49,7 +49,7 @@ https://docs.google.com/document/d/1zp6S7CP9X_bwr1Jffneq2OAvPt47krSGp4zn6bKfBNk/ <h1>Registration</h1> <ul> - <liTo participate in the competition, pre-registration is required at <a href="https://physicsbrawl.org">https://physicsbrawl.org</a>.</li> + <li>To participate in the competition, pre-registration is required at <a href="https://physicsbrawl.org">https://physicsbrawl.org</a>.</li> <li>By registering for the competition, each team agrees to follow the Rules of Conduct and these Rules of Physics Brawl Online and confirms they have made themselves acquainted with them.</li> <li>A team consists of 1-5 competitors.</li> <li>To compete in categories A, B, or C, all team members must be high-school students, primary school students, or their respective equivalents. There is also an Open category (non-competitive) for other competitors that do not meet the criteria for A, B, or C categories.</li> @@ -94,7 +94,7 @@ https://docs.google.com/document/d/1zp6S7CP9X_bwr1Jffneq2OAvPt47krSGp4zn6bKfBNk/ <li>Problems will be published in the form of PDF files in the competition environment after the start of the competition.</li> <li>Teams send the results directly via the competition environment. Results sent by other means (email, etc.) will not be accepted.</li> <li>Official announcements from the organizers will be communicated via the online board, only exceptionally by email. The teams are obliged to watch the online board.</li> - <li>During the competition, the up-to-date results of all teams are posted. However, these will be hidden 20 minutes before the end of the competition.</li> + <li>During the competition, the up-to-date results of all teams are posted. However, these will be hidden 20 minutes before the end of the competition.</li> </ul> </section> </div> @@ -105,7 +105,7 @@ https://docs.google.com/document/d/1zp6S7CP9X_bwr1Jffneq2OAvPt47krSGp4zn6bKfBNk/ <h1>The competition system and awarding of points</h1> <ul> - <li>The competition lasts 3 hours.</li> + <li>The competition lasts 3 hours.</li> <li>Teams solve the problems. For each correct answer to a problem, the team receives a new problem from the particular series (unless the solved problem is the last problem in the series).</li> <li>The competition consists of two parallel parts - the Main series and the Hurry-up (consisting of three series); more details are below.</li> <li>The competition consists of 4 parallel series.</li> diff --git a/app/Modules/Fol/DefaultModule/templates/Rules/default.latte b/app/Modules/Fol/DefaultModule/templates/Rules/default.latte index cb6014e6..c452be9f 100644 --- a/app/Modules/Fol/DefaultModule/templates/Rules/default.latte +++ b/app/Modules/Fol/DefaultModule/templates/Rules/default.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block subtitle} {switch $lang} {case cs}Pravidla diff --git a/app/Modules/Fol/DefaultModule/templates/schedule.latte b/app/Modules/Fol/DefaultModule/templates/schedule.latte index da047986..875b8ac9 100644 --- a/app/Modules/Fol/DefaultModule/templates/schedule.latte +++ b/app/Modules/Fol/DefaultModule/templates/schedule.latte @@ -1,3 +1,4 @@ +{varType string $lang} <div class="timeline"> <div> <span class="timeline-element-icon"></span> diff --git a/app/Modules/Fykos/Core/BasePresenter.php b/app/Modules/Fykos/Core/BasePresenter.php index a6392a80..59ce7ff6 100644 --- a/app/Modules/Fykos/Core/BasePresenter.php +++ b/app/Modules/Fykos/Core/BasePresenter.php @@ -12,6 +12,9 @@ abstract class BasePresenter extends \App\Modules\Core\BasePresenter { public const CURRENT_YEAR = 37; // TODO: get from db + /** + * @return NavItem[] + */ protected function getNavItems(): array { $items = []; @@ -35,7 +38,8 @@ protected function getNavItems(): array $items[] = new NavItem( new PageTitle( - $this->csen('Seminář', 'FYKOS Competition'), 'visible-sm-inline glyphicon glyphicon-info-sign' + $this->csen('Seminář', 'FYKOS Competition'), + 'visible-sm-inline glyphicon glyphicon-info-sign' ), // TODO ':Events:Fykos:', [], diff --git a/app/Modules/Fykos/Core/templates/@layout.latte b/app/Modules/Fykos/Core/templates/@layout.latte index 0b0a5091..685fa9b8 100644 --- a/app/Modules/Fykos/Core/templates/@layout.latte +++ b/app/Modules/Fykos/Core/templates/@layout.latte @@ -1,3 +1,4 @@ +{varType string $lang} <!DOCTYPE html> <html lang="cs"> @@ -15,7 +16,7 @@ <meta property="og:type" content="website"/> <meta property="og:title" content="FYKOS"/> <meta property="og:image" content="{switch $lang}{case cs}https://fykos.cz/images/fykos-og-image-cs.png{default}https://fykos.org/images/fykos-og-image-en.png{/switch}"/> - <meta property="og:description" + <meta property="og:description" {switch $lang} {case cs}content="Skupina pořádající vzdělávací soutěže ve fyzice pro středoškoláky." {default}content="Group organizing educational events in physics for high-school students." diff --git a/app/Modules/Fykos/DefaultModule/DefaultPresenter.php b/app/Modules/Fykos/DefaultModule/DefaultPresenter.php index ec6f0a73..f5141f1d 100644 --- a/app/Modules/Fykos/DefaultModule/DefaultPresenter.php +++ b/app/Modules/Fykos/DefaultModule/DefaultPresenter.php @@ -37,7 +37,7 @@ public function loadNews(): array $newsList = json_decode($json, true); // implement colors - foreach ($newsList[$this->lang] as &$news) { + foreach ($newsList[$this->language->value] as &$news) { switch ($news['color']) { case 'fof': $news['color'] = '#e6060d'; diff --git a/app/Modules/Fykos/DefaultModule/ProblemsPresenter.php b/app/Modules/Fykos/DefaultModule/ProblemsPresenter.php index 9a60768d..20f1720b 100644 --- a/app/Modules/Fykos/DefaultModule/ProblemsPresenter.php +++ b/app/Modules/Fykos/DefaultModule/ProblemsPresenter.php @@ -20,6 +20,9 @@ public function injectServiceProblem(ProblemService $problemService): void $this->problemService = $problemService; } + /** + * @throws \Throwable + */ public function renderDefault(): void { $year = $this->year ?? self::CURRENT_YEAR; diff --git a/app/Modules/Fykos/DefaultModule/templates/About/allPastOrganizers.latte b/app/Modules/Fykos/DefaultModule/templates/About/allPastOrganizers.latte index 4f213c60..5c6153d1 100644 --- a/app/Modules/Fykos/DefaultModule/templates/About/allPastOrganizers.latte +++ b/app/Modules/Fykos/DefaultModule/templates/About/allPastOrganizers.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block title} {switch $lang} {case 'cs'}Bývalí organizátoři @@ -22,7 +23,7 @@ <div class="col-md-4 mb-4"> <div class="card h-100"> - <img src="{$basePath}/images/people/person{$organizer['personId']}.jpg" + <img src="{$basePath}/images/people/person{$organizer['personId']}.jpg" class="card-img-top" onerror="this.src = '/images/people/personUnknown.jpg'" alt="{$organizer['name']}"> @@ -50,7 +51,7 @@ {case 'cs'} ročník {default} year {/switch} - {$organizer['since']} - + {$organizer['since']} - {switch $lang} {case 'cs'} současnost {default} present @@ -74,4 +75,4 @@ </div> </section> </div> -{/block} \ No newline at end of file +{/block} diff --git a/app/Modules/Fykos/DefaultModule/templates/About/history.cs.latte b/app/Modules/Fykos/DefaultModule/templates/About/history.cs.latte index 3c248666..7ebb94c8 100644 --- a/app/Modules/Fykos/DefaultModule/templates/About/history.cs.latte +++ b/app/Modules/Fykos/DefaultModule/templates/About/history.cs.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title} Historie {/block} @@ -243,13 +242,13 @@ <section class="inner-container"> <h2>2017 - 2021 (Daniela Dupkalová (dříve Pittnerová))</h2> <p> - Od roku 2018 byla hlavní organizátorkou FYKOSu Daniela (tehdy ještě) Pittnerová, jejím zástupcem Daniel Dupkala - a ve 34. ročníku Martin Vaněk, vedoucím semináře byl dále Přemysl Kolorenč. Oddělení pro vnější vztahy a propagaci - (OVVP) MFF UK bylo zrušeno sloučením s Oddělením mediální komunikace (OMK) k 31. 12. 2017, od 1. 1. 2018 je FYKOS - financován přes Oddělení propagace a mediální komunikace (OPMK). FYKOS každý rok, pokud nám v tom nezabránil COVID-19, - stále pořádal dvě soustředění, Den s experimentální fyzikou, FYKOSí Fyziklání (od roku 2019 přejmenováno na Fyziklání), - Fyziklání online (od 2021 Fyziklání Online), Fyzikální Náboj a přednášky pro SŠ. Jednou se skutečnil i Týden s aplikovanou - fyzikou v Praze a okolí. Fyziklání bylo rozšířeno do zahraničí, a tedy pořádané i v angličtině. Experimentální sekci + Od roku 2018 byla hlavní organizátorkou FYKOSu Daniela (tehdy ještě) Pittnerová, jejím zástupcem Daniel Dupkala + a ve 34. ročníku Martin Vaněk, vedoucím semináře byl dále Přemysl Kolorenč. Oddělení pro vnější vztahy a propagaci + (OVVP) MFF UK bylo zrušeno sloučením s Oddělením mediální komunikace (OMK) k 31. 12. 2017, od 1. 1. 2018 je FYKOS + financován přes Oddělení propagace a mediální komunikace (OPMK). FYKOS každý rok, pokud nám v tom nezabránil COVID-19, + stále pořádal dvě soustředění, Den s experimentální fyzikou, FYKOSí Fyziklání (od roku 2019 přejmenováno na Fyziklání), + Fyziklání online (od 2021 Fyziklání Online), Fyzikální Náboj a přednášky pro SŠ. Jednou se skutečnil i Týden s aplikovanou + fyzikou v Praze a okolí. Fyziklání bylo rozšířeno do zahraničí, a tedy pořádané i v angličtině. Experimentální sekci vedl Erik Hendrych. Letáky a brožurky sázela v TeXu Markéta Calábková a Matěj Rzehulka. </p> <ul> @@ -265,13 +264,13 @@ <section class="inner-container"> <h2>2021 - ? (Martin Vaněk)</h2> <p> - Hlavním organizátorem byl Martin Vaněk, zástupcem nejprve Daniela Pittnerová, poté Vojtěch David a Elena Chochoľaková, - vedoucím semináře byl dále Přemysl Kolorenč. FYKOS stále spadá pod Ústav teoretické fyziky MFF UK a Oddělení propagace - a mediální komunikace (OPMK) MFF UK. Akce FYKOSu v tomto období pokračují svůj velký růst, který započal u minulých dvou - hlavních organizátorů – Fyziklání (vedené nejprve Danielem Dupkalou a poté Vojtěchem Davidem) má poprvé v roce 2023 přes - tisíc účastníků z více než dvaceti zemí a Fyziklání Online (vedené Kateřinou Charvátovou) se šplhá ke čtyřem tisícovkám - soutěžících z celého světa. Každoročně se také tradičně organizují akce Den s experimentální fyzikou, Fyzikální Náboj a - dvě soustředění. Nově se v roce 2023 přidaly také stáže na MFF UK pro nejlepší řešitele experimentálních úloh FYKOSu. + Hlavním organizátorem byl Martin Vaněk, zástupcem nejprve Daniela Pittnerová, poté Vojtěch David a Elena Chochoľaková, + vedoucím semináře byl dále Přemysl Kolorenč. FYKOS stále spadá pod Ústav teoretické fyziky MFF UK a Oddělení propagace + a mediální komunikace (OPMK) MFF UK. Akce FYKOSu v tomto období pokračují svůj velký růst, který započal u minulých dvou + hlavních organizátorů – Fyziklání (vedené nejprve Danielem Dupkalou a poté Vojtěchem Davidem) má poprvé v roce 2023 přes + tisíc účastníků z více než dvaceti zemí a Fyziklání Online (vedené Kateřinou Charvátovou) se šplhá ke čtyřem tisícovkám + soutěžících z celého světa. Každoročně se také tradičně organizují akce Den s experimentální fyzikou, Fyzikální Náboj a + dvě soustředění. Nově se v roce 2023 přidaly také stáže na MFF UK pro nejlepší řešitele experimentálních úloh FYKOSu. Naopak se již (alespoň prozatím) neorganizují přednášky pro středoškoláky a Týden s aplikovanou fyzikou. {* Napsat o nových webech, vypsat vedoucí jednotlivých akcí, napsat o expanzi*} </p> diff --git a/app/Modules/Fykos/DefaultModule/templates/About/history.en.latte b/app/Modules/Fykos/DefaultModule/templates/About/history.en.latte index b5acaaa3..4f375112 100644 --- a/app/Modules/Fykos/DefaultModule/templates/About/history.en.latte +++ b/app/Modules/Fykos/DefaultModule/templates/About/history.en.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title} History {/block} @@ -378,14 +377,14 @@ <section class="inner-container"> <h2>2017 - 2021 (Daniela Dupkalová (formerly Pittnerová))</h2> <p> - Since 2018, Daniela (formerly) Pittnerová has been the head organizer of FYKOS, with Daniel Dupkala as her deputy, together and Martin Vaněk - in the 34th year. Přemysl Kolorenč continued to be the Head of FYKOS. The Department of External Relations and Promotion (OVVP) - at MFF UK was merged with the Department of Media Communication (OMK) on December 31, 2017. - From January 1, 2018, FYKOS has been funded through the Department of Promotion and Media Communication (OPMK). - Every year, if not prevented by COVID-19, FYKOS still organized two training camps, Day with Experimental Physics, - FYKOSí Fyziklání (renamed to Fyziklani in 2019), Physics Brawl Online, and lectures for high schools. - The Week with Applied Physics was also held in Prague and its surroundings. - Fyziklání expanded internationally and was organized in English as well. Erik Hendrych led the experimental section. + Since 2018, Daniela (formerly) Pittnerová has been the head organizer of FYKOS, with Daniel Dupkala as her deputy, together and Martin Vaněk + in the 34th year. Přemysl Kolorenč continued to be the Head of FYKOS. The Department of External Relations and Promotion (OVVP) + at MFF UK was merged with the Department of Media Communication (OMK) on December 31, 2017. + From January 1, 2018, FYKOS has been funded through the Department of Promotion and Media Communication (OPMK). + Every year, if not prevented by COVID-19, FYKOS still organized two training camps, Day with Experimental Physics, + FYKOSí Fyziklání (renamed to Fyziklani in 2019), Physics Brawl Online, and lectures for high schools. + The Week with Applied Physics was also held in Prague and its surroundings. + Fyziklání expanded internationally and was organized in English as well. Erik Hendrych led the experimental section. Booklets were typeset in TeX by Markéta Calábková and Matěj Rzehulka. </p> <ul> @@ -407,8 +406,8 @@ (OPMK) at MFF UK. FYKOS events in this period continue their significant growth, which started with the previous two Head Organizers - Fyziklani (led first by Daniel Dupkala and then by Vojtěch David) had over a thousand participants from more than twenty countries in 2023, and Physics Brawl Online (led by Kateřina Charvátová) - reached over 4500 participants from over 60 countries in the same year. Each year, the traditional events Day with Experimental Physics, - Náboj Physics, and two camps are still organized. In 2023, internships at MFF UK for the best participants in the experimental problems + reached over 4500 participants from over 60 countries in the same year. Each year, the traditional events Day with Experimental Physics, + Náboj Physics, and two camps are still organized. In 2023, internships at MFF UK for the best participants in the experimental problems of FYKOS were organized. However, lectures for high school students and Week with Applied Physics are currently not organized. {* Write about new websites, list the heads of individual events, write about expansion*} </p> @@ -419,4 +418,4 @@ </ul> </section> </div> -{/block} \ No newline at end of file +{/block} diff --git a/app/Modules/Fykos/DefaultModule/templates/About/organizers.latte b/app/Modules/Fykos/DefaultModule/templates/About/organizers.latte index 8b4d0ce8..be010a1a 100644 --- a/app/Modules/Fykos/DefaultModule/templates/About/organizers.latte +++ b/app/Modules/Fykos/DefaultModule/templates/About/organizers.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block title} {switch $lang} {case 'cs'}Organizátoři @@ -97,7 +98,7 @@ <div class="col-md-4 mb-4"> <div class="card h-100"> - <img src="{$basePath}/images/people/person{$organizer['personId']}.jpg" + <img src="{$basePath}/images/people/person{$organizer['personId']}.jpg" class="card-img-top" onerror="this.src = '/images/people/personUnknown.jpg'" alt="{$organizer['name']}"> @@ -133,4 +134,4 @@ </div> </section> </div> -{/block} \ No newline at end of file +{/block} diff --git a/app/Modules/Fykos/DefaultModule/templates/Default/default.latte b/app/Modules/Fykos/DefaultModule/templates/Default/default.latte index c1fe4451..75c7e8e5 100644 --- a/app/Modules/Fykos/DefaultModule/templates/Default/default.latte +++ b/app/Modules/Fykos/DefaultModule/templates/Default/default.latte @@ -50,7 +50,7 @@ {/switch} </a> </div> - + <div class="col-lg-5 col-md-6 mt-md-0 mt-3 header-image-container"> <div class="center-content-horizontally-md"> <img id="header-image" class="header-image" @@ -112,7 +112,7 @@ <div class="card-body news-card" style="border-left: 5px solid {$news['color']|noescape}"> <div style="display: flex; justify-content: space-between;"> <h4 class="card-title">{$news['title']}</h4> - <div><a href={$news['link']} class="btn btn-primary" style="background-color: {$news['color']|noescape}; border: 1px solid {$news['color']|noescape}">{$news['link-text']}</a></div> + <div><a href="{$news['link']}" class="btn btn-primary" style="background-color: {$news['color']|noescape}; border: 1px solid {$news['color']|noescape}">{$news['link-text']}</a></div> </div> <p class="card-text">{$news['text']|noescape}</p> </div> @@ -239,7 +239,7 @@ <a href="https://dsef.cz" target="_blank"> <div class="event dsef-color-left-border"> <div class="event-header"> - <h3><img src="/images/logos/dsef_symbol.svg" class="inline-logo"> + <h3><img src="/images/logos/dsef_symbol.svg" class="inline-logo"> {switch $lang} {case 'cs'}DSEF {default}DSEF @@ -656,7 +656,7 @@ // Access the timeline begin and end dates from the existing elements const timelineBeginElement = document.querySelector('.dummy-timeline-begin p'); const timelineEndElement = document.querySelector('.dummy-timeline-end p'); - + const timelineBegin = new Date(timelineBeginElement.innerText.trim()); const timelineEnd = new Date(timelineEndElement.innerText.trim()); @@ -676,7 +676,7 @@ } let logoSizePercentage; - + if (timelineId == "#timeline-vertical-container") { const verticalTimelineHeight = document.querySelector('#timeline-vertical').offsetHeight; const containerWidth = document.querySelector('#timeline-vertical-container').offsetWidth; @@ -729,7 +729,7 @@ if (timelineId == "#timeline-vertical-container") { // Adjust for the fact that now we have the logos as a children of an element // that also in its height contains texts - + // const verticalTimelineHeight = document.querySelector('#timeline-vertical').offsetHeight; // const timelineContainerHeight = document.querySelector('#timeline-vertical-container').offsetHeight; // const topOffset = document.querySelector('.start-timeline-text').offsetHeight; @@ -810,7 +810,7 @@ "/images/logos/4_pointer.svg", "/images/logos/5_pointer.svg", "/images/logos/6_pointer.svg"]; let images_series_h = ["/images/logos/1_pointer_h.svg", "/images/logos/2_pointer_h.svg", "/images/logos/3_pointer_h.svg", "/images/logos/4_pointer_h.svg", "/images/logos/5_pointer_h.svg", "/images/logos/6_pointer_h.svg"]; - + let hide_event_in_en = [true, true, false, false]; let lang = document.querySelector('.dummy-lang p').innerText.trim(); diff --git a/app/Modules/Fykos/DefaultModule/templates/Merch/default.latte b/app/Modules/Fykos/DefaultModule/templates/Merch/default.latte index 210a6754..2812e3cb 100644 --- a/app/Modules/Fykos/DefaultModule/templates/Merch/default.latte +++ b/app/Modules/Fykos/DefaultModule/templates/Merch/default.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block title}Merch{/block} {block main} <div class="panel color-auto"> @@ -12,10 +13,10 @@ <p> {switch $lang} {case 'cs'} - Naši činnost můžete podpořit koupí krásného FYKOSího hrnečku, trička, čepice či mikiny. Merch si můžete + Naši činnost můžete podpořit koupí krásného FYKOSího hrnečku, trička, čepice či mikiny. Merch si můžete koupit jak na různých prezenčních akcích, tak prostřednictvím objednávacího formuláře. {default} - You can support our work by buying a beautiful FYKOS mug, t-shirt, hat or hoodie. You can purchase our + You can support our work by buying a beautiful FYKOS mug, t-shirt, hat or hoodie. You can purchase our merch either at the various in-person events or through the order form. {/switch} </p> @@ -58,7 +59,7 @@ <div style="text-align: center;"> <h5><strong> {switch $lang} - {case 'cs'} 249 Kč<br> + {case 'cs'} 249 Kč<br> 11 € {default} 11 € {/switch} @@ -214,4 +215,4 @@ </div> </section> </div> -{/block} \ No newline at end of file +{/block} diff --git a/app/Modules/Fykos/DefaultModule/templates/Problems/default.latte b/app/Modules/Fykos/DefaultModule/templates/Problems/default.latte index 0c6295b8..415e3709 100644 --- a/app/Modules/Fykos/DefaultModule/templates/Problems/default.latte +++ b/app/Modules/Fykos/DefaultModule/templates/Problems/default.latte @@ -1,4 +1,5 @@ {varType App\Models\Downloader\ProblemService $problemService} +{varType string $lang} {block title}Zadání{/block} {block main} diff --git a/app/Modules/Fykos/DefaultModule/templates/SupportUs/default.cs.latte b/app/Modules/Fykos/DefaultModule/templates/SupportUs/default.cs.latte index adb3c40d..cfd57c48 100644 --- a/app/Modules/Fykos/DefaultModule/templates/SupportUs/default.cs.latte +++ b/app/Modules/Fykos/DefaultModule/templates/SupportUs/default.cs.latte @@ -12,11 +12,11 @@ <li>popularizujeme vědu</li> <li>propagujeme fyziku</li> </ul> - + </div> <div class="col-md-5 organiser"> - <img src="{$basePath}/images/merch/Slava_Elenka.JPG" class="img-fluid my-2"width = "93%" align:"right"> + <img src="{$basePath}/images/merch/Slava_Elenka.JPG" class="img-fluid my-2" style="width:93%;align:right"> </div> </div> @@ -59,4 +59,4 @@ </section> </div> -{/block} \ No newline at end of file +{/block} diff --git a/app/Modules/Fykos/DefaultModule/templates/Task/default.latte b/app/Modules/Fykos/DefaultModule/templates/Task/default.latte index a234ef4a..52ea4896 100644 --- a/app/Modules/Fykos/DefaultModule/templates/Task/default.latte +++ b/app/Modules/Fykos/DefaultModule/templates/Task/default.latte @@ -1,4 +1,4 @@ -{varType ProblemModel $problem} +{varType App\Models\Downloader\ProblemModel[] $problems} {varType string $lang} {block content} {foreach $problems as $problem} diff --git a/app/Modules/Fykos/EventsModule/CampsPresenter.php b/app/Modules/Fykos/EventsModule/CampsPresenter.php index a6b94cdd..35eb3ec5 100644 --- a/app/Modules/Fykos/EventsModule/CampsPresenter.php +++ b/app/Modules/Fykos/EventsModule/CampsPresenter.php @@ -21,7 +21,7 @@ public function inject(FKSDBDownloader $downloader): void $this->downloader = $downloader; } - public function getEventHeading($event): array + public function getEventHeading(array $event): array { if ($event['eventTypeId'] == 4) { $year = 1986 + $event['year'] + 1; @@ -53,20 +53,20 @@ public function renderDetail(): void $this->template->participants = $this->downloader->download(new ParticipantsRequest((int)$id)); } - public function getEventPhoto($event): string + public function getEventPhoto(array $event): string { if ($event['eventTypeId'] == 4) { - $event_type_str = 'sous-jaro'; + $eventType = 'sous-jaro'; } else { // $event['eventTypeId'] == 5 - $event_type_str = 'sous-podzim'; + $eventType = 'sous-podzim'; } if ($event['year'] < 10) { - $stryear = '0' . $event['year']; + $fullYear = '0' . $event['year']; } else { - $stryear = $event['year']; + $fullYear = $event['year']; } - $photosBasePath = './images/events/' . $event_type_str . '/rocnik' . $stryear . '/carousel-photos'; + $photosBasePath = './images/events/' . $eventType . '/rocnik' . $fullYear . '/carousel-photos'; $photos = glob($photosBasePath . '/*.{jpg,jpeg,png,gif}', GLOB_BRACE); if (empty($photos)) { diff --git a/app/Modules/Fykos/EventsModule/templates/Camps/default.cs.latte b/app/Modules/Fykos/EventsModule/templates/Camps/default.cs.latte index cabdd154..e0ace93b 100644 --- a/app/Modules/Fykos/EventsModule/templates/Camps/default.cs.latte +++ b/app/Modules/Fykos/EventsModule/templates/Camps/default.cs.latte @@ -1,3 +1,4 @@ +{varType string $lang} {block title}Soustředění{/block} {block main} @@ -41,7 +42,7 @@ <div class="panel color-auto"> <section class="inner-container"> <div class="row event-box"> - <div class="col-md-8 event-text-box"> + <div class="col-md-8 event-text-box"> <div class="subheader">{$event['nameNew'][$lang]} – {$event['begin']|date:'j. n. Y'} - {$event['end']|date:'j. n. Y'}</div> <h1>{$event['heading'][$lang]}</h1> <p>{$event['reportNew'][$lang]}</p> diff --git a/app/Modules/Fykos/EventsModule/templates/Camps/detail.cs.latte b/app/Modules/Fykos/EventsModule/templates/Camps/detail.cs.latte index c90dfa00..06e0c5ef 100644 --- a/app/Modules/Fykos/EventsModule/templates/Camps/detail.cs.latte +++ b/app/Modules/Fykos/EventsModule/templates/Camps/detail.cs.latte @@ -1,5 +1,7 @@ {varType array $data} {varType array $participants} +{varType string $lang} + {block title}{$data['nameNew'][$lang]}{/block} {block subtitle} {switch $data['eventTypeId']} diff --git a/app/Modules/Fykos/EventsModule/templates/Fykos/default.latte b/app/Modules/Fykos/EventsModule/templates/Fykos/default.latte index 6e48d677..9406587b 100644 --- a/app/Modules/Fykos/EventsModule/templates/Fykos/default.latte +++ b/app/Modules/Fykos/EventsModule/templates/Fykos/default.latte @@ -1,4 +1,7 @@ +{varType string $lang} + {block title}Seminář FYKOS{/block} + {block main} <div class="panel color-auto"> <section class="inner-container"> @@ -120,7 +123,7 @@ </div> </section> </div> - + <div class="panel color-auto"> <section class="inner-container"> <h1> diff --git a/app/Modules/Vyfuk/Core/BasePresenter.php b/app/Modules/Vyfuk/Core/BasePresenter.php index efcf066d..e20a310e 100644 --- a/app/Modules/Vyfuk/Core/BasePresenter.php +++ b/app/Modules/Vyfuk/Core/BasePresenter.php @@ -9,69 +9,72 @@ abstract class BasePresenter extends \App\Modules\Core\BasePresenter { + /** + * @return NavItem[] + */ protected function getNavItems(): array { $items = []; $items[] = new NavItem( - new PageTitle( 'O Nás'), + new PageTitle('O Nás'), ':default', [], [ - new NavItem(new PageTitle( 'Co je Výfuk?'), ':Default:About:default'), - new NavItem(new PageTitle( 'Historie'), ':Default:About:History'), - new NavItem(new PageTitle( 'Organizátoři'), ':Default:About:Organizers'), - new NavItem(new PageTitle( 'Podpořte nás'), ':Default:About:Sponsors'), - new NavItem(new PageTitle( 'Kontakt'), ':Default:About:Contact'), + new NavItem(new PageTitle('Co je Výfuk?'), ':Default:About:default'), + new NavItem(new PageTitle('Historie'), ':Default:About:History'), + new NavItem(new PageTitle('Organizátoři'), ':Default:About:Organizers'), + new NavItem(new PageTitle('Podpořte nás'), ':Default:About:Sponsors'), + new NavItem(new PageTitle('Kontakt'), ':Default:About:Contact'), ], ); $items[] = new NavItem( - new PageTitle( 'TODO název'), //TODO název sekce + new PageTitle('TODO název'), //TODO název sekce ':default', [], [ - new NavItem(new PageTitle( 'Pravidla'), ':Default:Section:Rules'), - new NavItem(new PageTitle( 'Jak se zapojit'), ':default'), //TODO - new NavItem(new PageTitle( 'Pro učitele'), ':Default:Section:Teachers'), - new NavItem(new PageTitle( 'Jak psát řešení'), ':default'), //TODO - new NavItem(new PageTitle( 'Rady a tipy'), ':default'), + new NavItem(new PageTitle('Pravidla'), ':Default:Section:Rules'), + new NavItem(new PageTitle('Jak se zapojit'), ':default'), //TODO + new NavItem(new PageTitle('Pro učitele'), ':Default:Section:Teachers'), + new NavItem(new PageTitle('Jak psát řešení'), ':default'), //TODO + new NavItem(new PageTitle('Rady a tipy'), ':default'), ], ); $items[] = new NavItem( - new PageTitle( 'Zadání', 'bi bi-pencil-fill'), + new PageTitle('Zadání', 'bi bi-pencil-fill'), ':Default:Problems:default' ); $items[] = new NavItem( - new PageTitle( 'Pořadí'), + new PageTitle('Pořadí'), ':Default:Results:default' ); $items[] = new NavItem( - new PageTitle( 'Akce'), + new PageTitle('Akce'), ':default', [], [ - new NavItem(new PageTitle( 'Akce'), ':Default:Events:default'), //TODO uspořádání odkazů - new NavItem(new PageTitle( 'Tábor'), ':Default:Events:camp'), - new NavItem(new PageTitle( 'Setkání'), ':Default:Events:meeting'), + new NavItem(new PageTitle('Akce'), ':Default:Events:default'), //TODO uspořádání odkazů + new NavItem(new PageTitle('Tábor'), ':Default:Events:camp'), + new NavItem(new PageTitle('Setkání'), ':Default:Events:meeting'), ], ); $items[] = new NavItem( - new PageTitle( 'Archiv'), + new PageTitle('Archiv'), ':default', [], [ - new NavItem(new PageTitle( 'Úlohy'), ':Default:Archive:default'), - new NavItem(new PageTitle( 'Výfučtení'), ':Default:Archive:serials'), + new NavItem(new PageTitle('Úlohy'), ':Default:Archive:default'), + new NavItem(new PageTitle('Výfučtení'), ':Default:Archive:serials'), ], ); $items[] = new NavItem( - new PageTitle( 'Přihlásit se'), + new PageTitle('Přihlásit se'), 'https://db.fykos.cz' ); diff --git a/app/Modules/Vyfuk/DefaultModule/templates/About/contact.latte b/app/Modules/Vyfuk/DefaultModule/templates/About/contact.latte index 510ab9d5..b8aa3db8 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/About/contact.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/About/contact.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title}Kontakt{/block} {block main} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/About/default.latte b/app/Modules/Vyfuk/DefaultModule/templates/About/default.latte index b4b29524..732394bf 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/About/default.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/About/default.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title}O Výfuku{/block} {block main} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/About/history.latte b/app/Modules/Vyfuk/DefaultModule/templates/About/history.latte index 3cf36de4..80519c18 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/About/history.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/About/history.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title}Historie Výfuku{/block} {block main} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/About/organizers.latte b/app/Modules/Vyfuk/DefaultModule/templates/About/organizers.latte index 6a15c10c..0764b6c8 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/About/organizers.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/About/organizers.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Organizátoři{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO organizátoři Výfuku<h1> + <h1 class="inner-container" style="color:red">TODO organizátoři Výfuku</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/About/sponsors.latte b/app/Modules/Vyfuk/DefaultModule/templates/About/sponsors.latte index 8b20487c..1da9a424 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/About/sponsors.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/About/sponsors.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Pro Sponzory{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO stránka pro/se sponzory Výfuku<h1> + <h1 class="inner-container" style="color:red">TODO stránka pro/se sponzory Výfuku</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Archive/default.latte b/app/Modules/Vyfuk/DefaultModule/templates/Archive/default.latte index 7a135b8c..dac1ba7d 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Archive/default.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Archive/default.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Archiv úloh{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO archiv úloh<h1> + <h1 class="inner-container" style="color:red">TODO archiv úloh</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Archive/serials.latte b/app/Modules/Vyfuk/DefaultModule/templates/Archive/serials.latte index 0b90f07f..0d2062db 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Archive/serials.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Archive/serials.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Archiv úloh{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO archiv Výfučtení<h1> + <h1 class="inner-container" style="color:red">TODO archiv Výfučtení</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Default/default.latte b/app/Modules/Vyfuk/DefaultModule/templates/Default/default.latte index cc4a219c..3f55b313 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Default/default.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Default/default.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title}Hlavní stránka{/block} {block main} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Events/calendar.latte b/app/Modules/Vyfuk/DefaultModule/templates/Events/calendar.latte index e2251ddb..80181526 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Events/calendar.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Events/calendar.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title}Kalendář{/block} {block scripts} <script src="{asset 'assets/calendar.js'}"></script> diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Events/camp.latte b/app/Modules/Vyfuk/DefaultModule/templates/Events/camp.latte index 78d42801..03c2e19b 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Events/camp.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Events/camp.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Výfučí Bingo{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO stránka o Táboru<h1> + <h1 class="inner-container" style="color:red">TODO stránka o Táboru</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Events/default.latte b/app/Modules/Vyfuk/DefaultModule/templates/Events/default.latte index e5fdde24..2605d796 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Events/default.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Events/default.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Archiv úloh{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO akce Výfuku<h1> + <h1 class="inner-container" style="color:red">TODO akce Výfuku</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Events/meeting.latte b/app/Modules/Vyfuk/DefaultModule/templates/Events/meeting.latte index c90c954c..10a6548d 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Events/meeting.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Events/meeting.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Výfučí Bingo{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO stránka o Setkání<h1> + <h1 class="inner-container" style="color:red">TODO stránka o Setkání</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Problems/bingo.latte b/app/Modules/Vyfuk/DefaultModule/templates/Problems/bingo.latte index 311e2214..954c6419 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Problems/bingo.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Problems/bingo.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Výfučí Bingo{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO stránka s Výfučím bingem<h1> + <h1 class="inner-container" style="color:red">TODO stránka s Výfučím bingem</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Problems/default.latte b/app/Modules/Vyfuk/DefaultModule/templates/Problems/default.latte index 91da470d..f5086c0c 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Problems/default.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Problems/default.latte @@ -1,10 +1,9 @@ -{varType string $lang} {block title}Zadání{/block} {block main} <div class="panel color-auto"> <div class="inner-container" > - <h1 style="color:red">TODO zadání úloh<h1> + <h1 style="color:red">TODO zadání úloh</h1> <a class="btn btn-primary my-2" n:href="Problems:Bingo">Bingo</a> </div> </div> diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Results/default.latte b/app/Modules/Vyfuk/DefaultModule/templates/Results/default.latte index c3b459f3..b367bf44 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Results/default.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Results/default.latte @@ -1,8 +1,7 @@ -{varType string $lang} {block title}Výsledky{/block} {block main} <div class="panel color-auto"> - <h1 class="inner-container" style="color:red">TODO výsledky Výfuku<h1> + <h1 class="inner-container" style="color:red">TODO výsledky Výfuku</h1> </div> {/block} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Section/rules.latte b/app/Modules/Vyfuk/DefaultModule/templates/Section/rules.latte index 5297aaac..26343c2c 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Section/rules.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Section/rules.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title}Pravidla{/block} {block main} diff --git a/app/Modules/Vyfuk/DefaultModule/templates/Section/teachers.latte b/app/Modules/Vyfuk/DefaultModule/templates/Section/teachers.latte index c4695100..70cf67ae 100644 --- a/app/Modules/Vyfuk/DefaultModule/templates/Section/teachers.latte +++ b/app/Modules/Vyfuk/DefaultModule/templates/Section/teachers.latte @@ -1,4 +1,3 @@ -{varType string $lang} {block title}Pro učitele{/block} {block main} @@ -74,8 +73,8 @@ </section> <section class="inner-container"> <h2>Časté dotazy</h2> - <h2 style='color: red'>TODO FAQ<h2> {* TODO FAQ -- lze vykrást z Folu *} + <h2 style='color: red'>TODO FAQ</h2> {* TODO FAQ -- lze vykrást z Folu *} </section> - <h1 class='inner-container' style='color: red'>TODO pdf verze souborů: Pravidla, Návratka<h1> {* TODO *} + <h1 class='inner-container' style='color: red'>TODO pdf verze souborů: Pravidla, Návratka</h1> {* TODO *} </div> {/block} diff --git a/app/Renderers/templates/formRender.latte b/app/Renderers/templates/formRender.latte index 3e14473e..6a957361 100644 --- a/app/Renderers/templates/formRender.latte +++ b/app/Renderers/templates/formRender.latte @@ -1,3 +1,4 @@ +{varType string $lang} <form method="post"> <div class="row"> {foreach $controls['special'] as $item}