Skip to content

Commit

Permalink
controllers to template parts
Browse files Browse the repository at this point in the history
  • Loading branch information
dakur committed Dec 21, 2024
1 parent cd2ff34 commit 3082930
Show file tree
Hide file tree
Showing 69 changed files with 378 additions and 709 deletions.
2 changes: 1 addition & 1 deletion UI/AboutCrossroad/AboutCrossroadController.latte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Hnutí Brontosaurus je o smysluplném dobrovolnictví a zážitcích na celý život. S tradicí přes 50 let a více jak 1500 členů každý rok sázíme stromořadí, obnovujeme mokřady, pečujeme o ptačí budky nebo renovujeme hrady a zámky. Zapojit se do Brontosaura znamená přispívat k řešení změn klimatu, pestrosti přírody, udržitelnosti nebo chátrání památek a taky poznat skvělé lidi. Přidej se k nám a zajisti radost tobě i světu kolem!
</p>

<a class="hb-mbe-4 action action--ulterior" href="{$aboutHighlightsPageLink}">
<a class="hb-mbe-4 action action--ulterior" href="/o-brontosaurovi/jak-to-u-nas-funguje">
Jak&nbsp;to u&nbsp;nás funguje?
</a>

Expand Down
28 changes: 0 additions & 28 deletions UI/AboutHighlights/AboutHighlightsController.php

This file was deleted.

3 changes: 1 addition & 2 deletions UI/Base/MenuItemDC.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace HnutiBrontosaurus\Theme\UI\Base;

use HnutiBrontosaurus\Theme\UI\AboutCrossroad\AboutCrossroadController;
use HnutiBrontosaurus\Theme\UI\AboutHighlights\AboutHighlightsController;
use HnutiBrontosaurus\Theme\UI\AboutStructure\AboutStructureController;
use HnutiBrontosaurus\Theme\UI\AboutSuccesses\AboutSuccessesController;
use HnutiBrontosaurus\Theme\UI\BaseUnitsAndClubsList\BaseUnitsAndClubsListController;
Expand Down Expand Up @@ -48,7 +47,7 @@ private static function isActive(\WP_Post $menuItemPost, ?\WP_Post $currentPost)

// about brontosaurus subpages
if ($menuItemSlug === AboutCrossroadController::PAGE_SLUG && \in_array($currentPost->post_name, [
AboutHighlightsController::PAGE_SLUG,
'jak-to-u-nas-funguje',
AboutStructureController::PAGE_SLUG,
AboutSuccessesController::PAGE_SLUG,
BaseUnitsAndClubsListController::PAGE_SLUG,
Expand Down
38 changes: 0 additions & 38 deletions UI/Contacts/ContactDC.php

This file was deleted.

50 changes: 0 additions & 50 deletions UI/Contacts/ContactsController.php

This file was deleted.

14 changes: 0 additions & 14 deletions UI/ControllerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,18 @@
use HnutiBrontosaurus\Theme\CoordinatesResolver\CoordinatesResolver;
use HnutiBrontosaurus\Theme\NotFound;
use HnutiBrontosaurus\Theme\UI\AboutCrossroad\AboutCrossroadController;
use HnutiBrontosaurus\Theme\UI\AboutHighlights\AboutHighlightsController;
use HnutiBrontosaurus\Theme\UI\AboutStructure\AboutStructureController;
use HnutiBrontosaurus\Theme\UI\AboutSuccesses\AboutSuccessesController;
use HnutiBrontosaurus\Theme\UI\Base\BaseFactory;
use HnutiBrontosaurus\Theme\UI\BaseUnitsAndClubsList\BaseUnitsAndClubsListController;
use HnutiBrontosaurus\Theme\UI\Contacts\ContactsController;
use HnutiBrontosaurus\Theme\UI\Courses\CoursesController;
use HnutiBrontosaurus\Theme\UI\English\EnglishController;
use HnutiBrontosaurus\Theme\UI\Error\ErrorController;
use HnutiBrontosaurus\Theme\UI\Event\EventController;
use HnutiBrontosaurus\Theme\UI\FirstTime\FirstTimeController;
use HnutiBrontosaurus\Theme\UI\ForChildren\ForChildrenController;
use HnutiBrontosaurus\Theme\UI\Future\FutureController;
use HnutiBrontosaurus\Theme\UI\HighSchools\HighSchoolsController;
use HnutiBrontosaurus\Theme\UI\Homepage\HomepageController;
use HnutiBrontosaurus\Theme\UI\Meetups\MeetupsController;
use HnutiBrontosaurus\Theme\UI\Preview\PreviewController;
use HnutiBrontosaurus\Theme\UI\Rentals\RentalsController;
use HnutiBrontosaurus\Theme\UI\SearchResults\SearchResultsController;
use HnutiBrontosaurus\Theme\UI\SupportOverview\SupportOverviewController;
use HnutiBrontosaurus\Theme\UI\Voluntary\VoluntaryController;
Expand Down Expand Up @@ -61,24 +55,16 @@ public function create(?\WP_Post $post, bool $isPreview): Controller
}

return match ($post->post_name) {
'kontakty' => new ContactsController($base, $this->latte),
'pronajmy' => new RentalsController($base, $this->latte),
AboutCrossroadController::PAGE_SLUG => new AboutCrossroadController($base, $this->latte),
VoluntaryController::PAGE_SLUG => new VoluntaryController($this->dateFormatHuman, $this->dateFormatRobot, $this->bisApiClient, $base, $this->latte),
CoursesController::PAGE_SLUG => new CoursesController($this->dateFormatHuman, $this->dateFormatRobot, $this->bisApiClient, $base, $this->latte),
MeetupsController::PAGE_SLUG => new MeetupsController($this->dateFormatHuman, $this->dateFormatRobot, $this->bisApiClient, $base, $this->latte),
ForChildrenController::PAGE_SLUG => new ForChildrenController($this->dateFormatHuman, $this->dateFormatRobot, $this->bisApiClient, $base, $this->latte),
'podpor-nas' => new SupportOverviewController($base, $this->latte),
AboutHighlightsController::PAGE_SLUG => new AboutHighlightsController($base, $this->latte),
AboutSuccessesController::PAGE_SLUG => new AboutSuccessesController($base, $this->latte),
'english' => new EnglishController($base, $this->latte),
'hlavni-stranka' => new HomepageController($this->dateFormatHuman, $this->dateFormatRobot, $this->bisApiClient, $base, $this->latte),
'jedu-poprve' => new FirstTimeController($base, $this->latte),
'programy-pro-stredni-skoly' => new HighSchoolsController($base, $this->latte),
FutureController::PAGE_SLUG => new FutureController($this->dateFormatHuman, $this->dateFormatRobot, $this->bisApiClient, $base, $this->latte),
AboutStructureController::PAGE_SLUG => new AboutStructureController($this->bisApiClient, $base, $this->latte, $this->coordinatesResolver),
EventController::PAGE_SLUG => new EventController($this->dateFormatHuman, $this->dateFormatRobot, $this->applicationUrlTemplate, $this->bisApiClient, $base, $this->latte),
'vysledky-vyhledavani' => new SearchResultsController($base, $this->latte),
BaseUnitsAndClubsListController::PAGE_SLUG => new BaseUnitsAndClubsListController($this->bisApiClient, $base, $this->latte),
default => new ErrorController($base, $this->latte),
};
Expand Down
27 changes: 0 additions & 27 deletions UI/English/EnglishController.php

This file was deleted.

32 changes: 0 additions & 32 deletions UI/FirstTime/FirstTimeController.php

This file was deleted.

31 changes: 0 additions & 31 deletions UI/HighSchools/HighSchoolsController.php

This file was deleted.

38 changes: 0 additions & 38 deletions UI/Rentals/RentalsController.php

This file was deleted.

2 changes: 0 additions & 2 deletions UI/Rentals/assets/dist/.gitignore

This file was deleted.

Binary file removed UI/Rentals/assets/src/images/chata-kristyna-01.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-kristyna-02.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-kristyna-03.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-kristyna-04.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-kristyna-05.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-kristyna-06.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-smrcnik-01.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-smrcnik-02.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-smrcnik-03.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-smrcnik-04.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/chata-smrcnik-05.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/svycarna-01.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/svycarna-02.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/svycarna-03.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/svycarna-04.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/svycarna-05.jpg
Binary file not shown.
Binary file removed UI/Rentals/assets/src/images/svycarna-06.jpg
Binary file not shown.
27 changes: 0 additions & 27 deletions UI/SearchResults/SearchResultsController.php

This file was deleted.

Loading

0 comments on commit 3082930

Please sign in to comment.