diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 254135b..2bfce87 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -91,20 +91,18 @@ jobs: -i "config/*" \ -i "CoordinatesResolver/*" \ -i "DataContainers/*" \ + -i "Filters/*" \ -i "frontend/*" \ -x "frontend/src/*" \ -i "hb-events/*" \ -x "hb-events/src/*" \ + -i "images/*" \ -i "log/*" \ -i "Rewrites/*" \ + -i "scripts/*" \ -i "template-parts/*" \ - -i "UI/*" \ - -x "UI/AboutStructure/assets/src/*" \ - -x "UI/Contacts/assets/src/*" \ - -x "UI/Event/assets/src/*" \ - -x "UI/Rentals/assets/src/*" \ -i "vendor/*" \ - -i "ApplicationUrlTemplate.php" \ + -i "webfonts/*" \ -i "Assets.php" \ -i "archive-novinky.php" \ -i "bootstrap.php" \ @@ -120,6 +118,7 @@ jobs: -i "homepage-banner.php" \ -i "index.php" \ -i "PostTypeInitializer.php" \ + -i "PropertyHandler.php" \ -i "screenshot.png" \ -i "single-novinky.php" \ -i "style.css" diff --git a/ApplicationUrlTemplate.php b/ApplicationUrlTemplate.php deleted file mode 100644 index e8b3d4d..0000000 --- a/ApplicationUrlTemplate.php +++ /dev/null @@ -1,28 +0,0 @@ -urlTemplate; - $url = str_replace('{ID}', (string) $eventId, $url); // BC - $url = str_replace('{id}', (string) $eventId, $url); - $url = str_replace('{returnUrl}', $returnUrl, $url); - return $url; - } - -} diff --git a/Assets.php b/Assets.php index dea8f4a..7d49193 100644 --- a/Assets.php +++ b/Assets.php @@ -1,4 +1,4 @@ -applicationUrlTemplate !== null) { - return $this->applicationUrlTemplate; - } - - return $this->applicationUrlTemplate = ApplicationUrlTemplate::from($this->configuration->get('bis:applicationUrlTemplate')); - } - - - private ?BaseFactory $baseFactory = null; - public function getBaseFactory(): BaseFactory - { - if ($this->baseFactory !== null) { - return $this->baseFactory; - } - - return $this->baseFactory = new BaseFactory($this->getEnableTracking()); + return $this->configuration; } @@ -97,23 +80,6 @@ public function getEnableTracking(): bool } - private ?Engine $latte = null; - public function getLatte(): Engine - { - if ($this->latte !== null) { - return $this->latte; - } - - $cachePath = __DIR__ . '/temp/cache/latte'; - self::createDirectoryIfNeeded($cachePath); - - $latte = new Engine(); - $latte->setTempDirectory($cachePath); - - return $this->latte = $latte; - } - - public function getSentryDsn(): ?string { return $this->configuration->has('sentry:dsn') && ($dsn = $this->configuration->get('sentry:dsn')) !== '' diff --git a/CoordinatesResolver/Coordinates.php b/CoordinatesResolver/Coordinates.php index eea0d65..69a0c32 100644 --- a/CoordinatesResolver/Coordinates.php +++ b/CoordinatesResolver/Coordinates.php @@ -1,4 +1,4 @@ -id = $event->getId(); $this->link = sprintf('%s/%s/%d/', // todo: use rather WP routing somehow rtrim(get_site_url(), '/'), - EventController::PAGE_SLUG, + 'akce', $event->getId(), ); - $this->title = Utils::handleNonBreakingSpaces($event->getName()); + $this->title = hb_handleNonBreakingSpaces($event->getName()); $coverPhotoPath = $event->getCoverPhotoPath(); $this->hasCoverPhoto = $coverPhotoPath !== null; diff --git a/UI/DataContainers/Events/InvitationDC.php b/DataContainers/Events/InvitationDC.php similarity index 82% rename from UI/DataContainers/Events/InvitationDC.php rename to DataContainers/Events/InvitationDC.php index 7f38da1..711f73a 100644 --- a/UI/DataContainers/Events/InvitationDC.php +++ b/DataContainers/Events/InvitationDC.php @@ -1,12 +1,11 @@ - 0; return new self( - Utils::handleNonBreakingSpaces($event->getPropagation()->getInvitationTextIntroduction()), - Utils::handleNonBreakingSpaces($event->getPropagation()->getInvitationTextPracticalInformation()), + hb_handleNonBreakingSpaces($event->getPropagation()->getInvitationTextIntroduction()), + hb_handleNonBreakingSpaces($event->getPropagation()->getInvitationTextPracticalInformation()), $accommodation !== null, - $accommodation !== null ? Utils::handleNonBreakingSpaces($accommodation) : null, + $accommodation !== null ? hb_handleNonBreakingSpaces($accommodation) : null, \count($food) > 0, \array_map(static fn(Diet $food): string => $foodLabels[$food->toScalar()], $food), $workDescription !== null, - $workDescription !== null ? Utils::handleNonBreakingSpaces($workDescription) : null, + $workDescription !== null ? hb_handleNonBreakingSpaces($workDescription) : null, $workDays !== null, $workDays, $workHoursPerDay !== null, diff --git a/UI/DataContainers/Events/InvitationPresentationDC.php b/DataContainers/Events/InvitationPresentationDC.php similarity index 74% rename from UI/DataContainers/Events/InvitationPresentationDC.php rename to DataContainers/Events/InvitationPresentationDC.php index ee07c93..2863d0e 100644 --- a/UI/DataContainers/Events/InvitationPresentationDC.php +++ b/DataContainers/Events/InvitationPresentationDC.php @@ -1,10 +1,9 @@ - 0, \array_map(fn(Image $photo): string => $photo->getMedium(), $photos), ); diff --git a/UI/DataContainers/Events/Label.php b/DataContainers/Events/Label.php similarity index 73% rename from UI/DataContainers/Events/Label.php rename to DataContainers/Events/Label.php index 8f7e8d3..035a120 100644 --- a/UI/DataContainers/Events/Label.php +++ b/DataContainers/Events/Label.php @@ -1,8 +1,8 @@ -getCoordinates(); return new self( - Utils::handleNonBreakingSpaces($place->getName()), + hb_handleNonBreakingSpaces($place->getName()), $coordinates !== null, $coordinates !== null ? $coordinates->getLatitude() . ' ' . $coordinates->getLongitude() // e.g. 49.132456 16.123456 diff --git a/UI/ForChildren/ForChildrenFiltersDC.php b/DataContainers/ForChildrenFiltersDC.php similarity index 89% rename from UI/ForChildren/ForChildrenFiltersDC.php rename to DataContainers/ForChildrenFiltersDC.php index 18dc536..c28d0c2 100644 --- a/UI/ForChildren/ForChildrenFiltersDC.php +++ b/DataContainers/ForChildrenFiltersDC.php @@ -1,9 +1,9 @@ -ID, - Utils::handleNonBreakingSpaces($post->post_title), + hb_handleNonBreakingSpaces($post->post_title), $post->post_name, DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $post->post_date), - Utils::handleNonBreakingSpaces($post->post_excerpt), - Utils::handleNonBreakingSpaces($post->post_content), + hb_handleNonBreakingSpaces($post->post_excerpt), + hb_handleNonBreakingSpaces($post->post_content), $thumbnail !== null, $thumbnail, ); diff --git a/UI/BaseUnitsAndClubsList/OrganizationalUnitDC.php b/DataContainers/OrganizationalUnitDC.php similarity index 83% rename from UI/BaseUnitsAndClubsList/OrganizationalUnitDC.php rename to DataContainers/OrganizationalUnitDC.php index 5dacaba..87b99fe 100644 --- a/UI/BaseUnitsAndClubsList/OrganizationalUnitDC.php +++ b/DataContainers/OrganizationalUnitDC.php @@ -1,9 +1,9 @@ - -
+
ID, 'pribehy-nadseni_location', true)); ?>
-
+

-
+

-
+


diff --git a/UI/PropertyHandler.php b/PropertyHandler.php similarity index 88% rename from UI/PropertyHandler.php rename to PropertyHandler.php index 14f9515..bc8a31b 100644 --- a/UI/PropertyHandler.php +++ b/PropertyHandler.php @@ -1,6 +1,6 @@ - $this->base->getLinkFor('jak-to-u-nas-funguje'), - 'aboutStructurePageLink' => $this->base->getLinkFor(AboutStructureController::PAGE_SLUG), - 'aboutSuccessesPageLink' => $this->base->getLinkFor('nase-uspechy'), - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-aboutCrossroad-references', $theme->get_template_directory_uri() . '/frontend/dist/js/references.js', [], $themeVersion); - }); - - $this->latte->render( - __DIR__ . '/AboutCrossroadController.latte', - \array_merge($this->base->getLayoutVariables('aboutcrossroad'), $params), - ); - } - -} diff --git a/UI/AboutHighlights/AboutHighlightsController.latte b/UI/AboutHighlights/AboutHighlightsController.latte deleted file mode 100644 index b98e477..0000000 --- a/UI/AboutHighlights/AboutHighlightsController.latte +++ /dev/null @@ -1,42 +0,0 @@ -{layout $layoutPath} - -{block content} -
-
-

- Jak to u nás funguje -

- -
    -
  • - Každý může jet na brontosauří akci. Nemusíš být členem, mít žádné předchozí - zkušenosti nebo znalosti. Všechno ti rádi ukážeme. -
  • - -
  • - Není důležité, jestli jsi kluk nebo holka, jaké je tvé vyznání, jestli děláš IT nebo - pracuješ v čajovně. Právě v naší různorodosti je největší síla. Důležité je mít - otevřenou mysl a chuť pomoci světu kolem nás. -
  • - -
  • - Naše akce pořádají dobrovolníci pro dobrovolníky. Společně pomáháme přírodě, - památkám i lidem a odměnou je nám dobrý pocit a čas strávený s přáteli. -
  • - -
  • - Stále se něco učíme. Ať je to stavění domků pro ježky, vedení týmu, oprava hradní - věže nebo soft skills z každé naší akce si něco odnášíme. -
  • - -
  • - Zajímáme se o svět kolem nás. S ohledem na názory a postoje druhých hledáme - řešení problémů současnosti a podporujeme zdravé snahy o odklon od konzumního způsobu života. -
  • -
- - - Chci na akci - -
-
diff --git a/UI/AboutHighlights/AboutHighlightsController.php b/UI/AboutHighlights/AboutHighlightsController.php deleted file mode 100644 index 56699ad..0000000 --- a/UI/AboutHighlights/AboutHighlightsController.php +++ /dev/null @@ -1,28 +0,0 @@ -latte->render( - __DIR__ . '/AboutHighlightsController.latte', - \array_merge($this->base->getLayoutVariables('abouthighlights')), - ); - } - -} diff --git a/UI/AboutStructure/AboutStructureController.php b/UI/AboutStructure/AboutStructureController.php deleted file mode 100644 index 906d5a1..0000000 --- a/UI/AboutStructure/AboutStructureController.php +++ /dev/null @@ -1,72 +0,0 @@ -bisApiClient->getAdministrationUnits() as $administrationUnit) { - try { - $administrationUnits[] = AdministrationUnit::from($administrationUnit, $this->coordinatesResolver); - - } catch (CannotResolveCoordinates $e) { - Debugger::log($e, ILogger::WARNING); - continue; // if can not resolve (e.g. non-existing address) just ignore this unit and continue - } - } - - } catch (ConnectionToBisFailed) { - $hasBeenUnableToLoad = true; - } - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-aboutStructure-map', $theme->get_template_directory_uri() . '/frontend/dist/js/administrativeUnitsMap.js', [], $themeVersion); - }); - - $params = [ - 'administrationUnitsInJson' => \json_encode($administrationUnits), - 'hasBeenUnableToLoad' => $hasBeenUnableToLoad, - 'baseUnitsAndClubsLink' => $this->base->getLinkFor(BaseUnitsAndClubsListController::PAGE_SLUG), - 'contactsPageLink' => $this->base->getLinkFor('kontakty'), - ]; - - $this->latte->render( - __DIR__ . '/AboutStructureController.latte', - \array_merge($this->base->getLayoutVariables('aboutstructure'), $params), - ); - } - -} diff --git a/UI/AboutSuccesses/AboutSuccessesController.latte b/UI/AboutSuccesses/AboutSuccessesController.latte deleted file mode 100644 index 80eea73..0000000 --- a/UI/AboutSuccesses/AboutSuccessesController.latte +++ /dev/null @@ -1,90 +0,0 @@ -{layout $layoutPath} -{varType ?int $displayOnLoad} - -{block content} -
-
-

- Příběhy nadšení -

- -

- Už je to přes 50 let, kdy v roce 1974 vzbudila Akce Brontosaurus obrovskou vlnu nadšení - pro pomoc přírodě a památkám. Desetitisíce lidí se díky ní pustily do sázení stromů, - oprav hradů, úklidů koryt řek, kosení chráněných luk nebo čištění studánek. - U příležitosti výročí půlstoletí Brontosaura představujeme vybrané příběhy úspěšných dobrovolnických projektů. -

- -
-
- {include story, story: $story} - {breakIf $displayOnLoad !== null && $iterator->counter === $displayOnLoad} -
- {if $displayOnLoad !== null && count($stories) > $displayOnLoad} -
- - -
- {continueIf $iterator->counter <= $displayOnLoad} - {include story, story: $story} -
-
- {/if} -
- -

- Tyto příběhy jsou jen malým dílem obrovského úsilí o zdravé životní prostředí, - respekt k přírodě a udržitelný život. Mohou nás však inspirovat k aktivitě - a přinášet naději a důvěru v budoucnost. - - Koukni na další příběhy ve videích níže nebo si je poslechni v našem - podcastu Příběhy nadšení. - Nastartujme společně Dalších 50 let - péče o přírodu, památky a lidi s Brontosaurem! -

- -
- - - -
- -
-

- Dává ti smysl, co děláme? - Adoptuj Brontosaura a podpoř naši péči přírodu a památky. -

- - Chci adoptovat Brontosaura -
-
-
- -{define story, object $story} - -
- - -
- -
-

- {$story->title} -

- -
- - {$story->location} - -
-
- -
- {$story->excerpt} -
-
-{/define} diff --git a/UI/AboutSuccesses/AboutSuccessesController.php b/UI/AboutSuccesses/AboutSuccessesController.php deleted file mode 100644 index 0bf39d6..0000000 --- a/UI/AboutSuccesses/AboutSuccessesController.php +++ /dev/null @@ -1,74 +0,0 @@ - 'pribehy-nadseni', 'numberposts' => -1]); - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-aboutsuccesses-lazy-load', $theme->get_template_directory_uri() . '/frontend/dist/js/lazyLoad.js', [], $themeVersion); - }); - - $this->latte->render( - __DIR__ . '/AboutSuccessesController.latte', - \array_merge($this->base->getLayoutVariables('aboutsuccesses'), [ - 'displayOnLoad' => $shouldListAll ? null : 3, - 'stories' => array_map(function (WP_Post $post) { - $thumbnail = get_the_post_thumbnail_url($post); - $thumbnail = $thumbnail === false ? null : $thumbnail; // convert false to null which makes more sense - - $customs = get_post_custom($post->ID); - $location = count($customs) > 0 && array_key_exists('pribehy-nadseni_location', $customs) && array_key_exists(0, $customs['pribehy-nadseni_location']) - ? $customs['pribehy-nadseni_location'][0] - : null; - - return (object) [ - 'title' => $post->post_title, - 'location' => $location, - 'excerpt' => $post->post_excerpt, - 'hasThumbnail' => $thumbnail !== null, - 'thumbnail' => $thumbnail, - 'link' => get_page_link($post), - ]; - }, $posts), - 'supportOverviewLink' => $this->base->getLinkFor('podpor-nas'), - ]), - ); - } - -} diff --git a/UI/Base/Base.latte b/UI/Base/Base.latte deleted file mode 100644 index 8248d5b..0000000 --- a/UI/Base/Base.latte +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - {block meta /}{* we need to overwrite SEO plugin social meta tags with custom in event detail *} - {wp_head()} - - {if $enableTracking} - - - - {/if} - - - - - -{if $enableTracking} - - - -{/if} - -
-
- - - -
- - {if $withCoverPhoto} -
- {/if} - -
- {block content /} -
- - - - - - -
- - diff --git a/UI/Base/Base.php b/UI/Base/Base.php deleted file mode 100644 index 74950fe..0000000 --- a/UI/Base/Base.php +++ /dev/null @@ -1,87 +0,0 @@ - $this->getLayoutPath(), - 'languageCode' => get_language_attributes(), - 'themePath' => get_template_directory_uri(), - 'themePathRelative' => str_replace(ABSPATH, '', get_template_directory_uri()), - 'enableTracking' => $this->enableTracking, - 'isOnSearchResultsPage' => $this->currentPost?->post_name === 'vysledky-vyhledavani', - 'searchResultsPageLink' => $this->getLinkFor('vysledky-vyhledavani'), - 'isOnEnglishPage' => $this->currentPost?->post_name === 'english', - 'homePageLink' => get_home_url(), - 'englishPageLink' => $this->getLinkFor('english'), - 'headerNavigationMenuItems' => $this->getMenuItemsFor('header'), - 'isOnFutureEventsPage' => $this->currentPost?->post_name === 'co-se-chysta', - 'futureEventsPageLink' => $this->getLinkFor('co-se-chysta'), - 'withCoverPhoto' => ! in_array($pageClassSelector, $noCoverPhotoIn, true), - 'pageClassSelector' => $pageClassSelector, - 'isOnPartnersPage' => $this->currentPost?->post_name === 'nasi-partneri', - 'partnersPageLink' => $this->getLinkFor('nasi-partneri'), - 'footerLeftNavigationMenuItems' => $this->getMenuItemsFor('footer-left'), - 'footerCenterNavigationMenuItems' => $this->getMenuItemsFor('footer-center'), - 'footerRightNavigationMenuItems' => $this->getMenuItemsFor('footer-right'), - - 'coursesPageLink' => $this->getLinkFor('kurzy-a-prednasky'), - 'voluntaryPageLink' => $this->getLinkFor('dobrovolnicke-akce'), - 'meetupsPageLink' => $this->getLinkFor('setkavani-a-kluby'), - 'supportOverviewPageLink' => $this->getLinkFor('podpor-nas'), - 'forChildrenPageLink' => $this->getLinkFor('pro-deti'), - ]; - } - - /** - * @param string $themeLocation - * @return MenuItemDC[] - */ - private function getMenuItemsFor(string $themeLocation): array - { - $theme_locations = get_nav_menu_locations(); - $menu = get_term($theme_locations[$themeLocation], 'nav_menu'); - $items = wp_get_nav_menu_items($menu); - if ($items === false) { - return []; - } - - return \array_map( - fn(\WP_Post $post): MenuItemDC => MenuItemDC::fromPost($post, $this->currentPost), - $items - ); - } - - // todo: extract rather to LinkEvaluator service - public function getLinkFor(string $slug): string - { - $posts = get_posts(['name' => $slug, 'post_type' => 'page', 'posts_per_page' => 1]); - $post = \reset($posts); - if ($post === false) { - throw new \RuntimeException("$slug does not exist"); - } - - return get_permalink($post->ID); - } - -} diff --git a/UI/Base/BaseFactory.php b/UI/Base/BaseFactory.php deleted file mode 100644 index 0a7ab16..0000000 --- a/UI/Base/BaseFactory.php +++ /dev/null @@ -1,17 +0,0 @@ -enableTracking, $currentPost); - } - -} diff --git a/UI/Base/MenuItemDC.php b/UI/Base/MenuItemDC.php deleted file mode 100644 index 6754cd6..0000000 --- a/UI/Base/MenuItemDC.php +++ /dev/null @@ -1,61 +0,0 @@ -title, - $menuItemPost->url, - self::isActive($menuItemPost, $currentPost), - $menuItemPost->type === 'custom', - ); - } - - private static function isActive(\WP_Post $menuItemPost, ?\WP_Post $currentPost): bool - { - $menuItemSlug = \basename($menuItemPost->url); // source: https://wordpress.stackexchange.com/questions/249069/how-can-i-get-the-page-url-slug-when-post-name-returns-an-id - - if ($currentPost === null) { - return false; - } - - if ($menuItemSlug === $currentPost->post_name) { - return true; - } - - // about brontosaurus subpages - if ($menuItemSlug === AboutCrossroadController::PAGE_SLUG && \in_array($currentPost->post_name, [ - AboutHighlightsController::PAGE_SLUG, - AboutStructureController::PAGE_SLUG, - AboutSuccessesController::PAGE_SLUG, - BaseUnitsAndClubsListController::PAGE_SLUG, - ])) { - return true; - } - - return false; - } -} diff --git a/UI/BaseUnitsAndClubsList/BaseUnitsAndClubsListController.php b/UI/BaseUnitsAndClubsList/BaseUnitsAndClubsListController.php deleted file mode 100644 index 965802c..0000000 --- a/UI/BaseUnitsAndClubsList/BaseUnitsAndClubsListController.php +++ /dev/null @@ -1,60 +0,0 @@ -bisApiClient->getAdministrationUnits(); - - // filter only base units and clubs - $units = \array_filter( - $units, - static fn(AdministrationUnit $unit): bool - => $unit->isBaseUnit() || $unit->isClub() - ); - - // transfer DTOs to DCs - $units = \array_map( - static fn(AdministrationUnit $unit): OrganizationalUnitDC - => OrganizationalUnitDC::fromDTO($unit), - $units, - ); - - } catch (ConnectionToBisFailed) { - $hasBeenUnableToLoad = true; - } - - $params = [ - 'hasBeenUnableToLoad' => $hasBeenUnableToLoad, - 'units' => $units, - ]; - - $this->latte->render( - __DIR__ . '/BaseUnitsController.latte', - \array_merge($this->base->getLayoutVariables('baseunits'), $params), - ); - } - -} diff --git a/UI/BaseUnitsAndClubsList/BaseUnitsController.latte b/UI/BaseUnitsAndClubsList/BaseUnitsController.latte deleted file mode 100644 index 03e79cf..0000000 --- a/UI/BaseUnitsAndClubsList/BaseUnitsController.latte +++ /dev/null @@ -1,38 +0,0 @@ -{layout $layoutPath} - -{block content} -
-
-

- Seznam základních článků a klubů -

- - {if $hasBeenUnableToLoad} -
- Promiňte, zrovna nám vypadl systém, kde máme uloženy všechny informace o základních článcích. - Zkuste to prosím za chvilku znovu. -
- - {else} - - {/if} -
-
diff --git a/UI/Contacts/ContactDC.php b/UI/Contacts/ContactDC.php deleted file mode 100644 index f1a6752..0000000 --- a/UI/Contacts/ContactDC.php +++ /dev/null @@ -1,38 +0,0 @@ - -

- Kontakty na Hnutí Brontosaurus -

- -
-
-

- Lidé z ústředí Hnutí Brontosaurus se spolu s dobrovolníky starají o chod organizace - a zázemí jednotlivých programů. Seznam se s námi a kontaktuj nás. -

- -

- V různých městech také působí: články, klubyregionální centra. -

-
- -
-

- Ústředí Hnutí Brontosaurus -

- -
- - -
-
-

- Kontaktní adresa -

- - - Hvězdová 10, Brno, 602 00 - -
- -
-

- Telefon -

- - - -
- mimo úřední hodiny: - -
-
- - -
- -
-

- Kdy jsme v kanceláři - -
(úřední hodiny)
-

- -
- Aktuálně stěhujeme naši kancelář na novou lokalitu, její adresa a otevírací hodiny budou brzy zveřejněny. - V případě potřeby osobního jednání nás kontaktujte na uvedených telefonech. -
-
-
- -
- IČ: 0040 8328
- Zápis je provedený v obchodním registru - pod sp. zn. L 346 vedený u Krajského soudu v Brně. -
- -
- ID datové schránky: h7id376
- transparentní účet: 2100070590/2010
- transparentní účet pro příjem darů – Adopce brontosaura: 2600217667/2010 -
-
- -
-

- Naši lidé -

- -
-
- -
- -
-
- {$contact->name} -
- {$contact->role} -
- -
- {$contact->about} -
- - {if count($contact->emailAddresses) > 0} -
- {$emailAddress} - {sep}
{/sep} -
- {/if} -
-
-
-
- diff --git a/UI/Contacts/ContactsController.php b/UI/Contacts/ContactsController.php deleted file mode 100644 index 5525ad5..0000000 --- a/UI/Contacts/ContactsController.php +++ /dev/null @@ -1,50 +0,0 @@ - 'contacts', 'numberposts' => -1]); - - $params = [ - 'aboutStructurePageLink' => $this->base->getLinkFor(AboutStructureController::PAGE_SLUG), - 'contacts' => \array_map(function (\WP_Post $post) { - $thumbnail = get_the_post_thumbnail_url($post); - $thumbnail = $thumbnail === false ? null : $thumbnail; // convert false to null which makes more sense - - $emailAddresses = \explode("\n", get_post_meta($post->ID, 'contacts_email', single: true)); - if ($emailAddresses === false || $emailAddresses[0] === '') { - $emailAddresses = []; - } - - return ContactDC::from( - $post->post_title, - $thumbnail !== null, - $thumbnail, - get_post_meta($post->ID, 'contacts_role', single: true), - get_post_meta($post->ID, 'contacts_about', single: true), - $emailAddresses, - ); - }, $posts), - ]; - - $this->latte->render( - __DIR__ . '/ContactsController.latte', - \array_merge($this->base->getLayoutVariables('contacts'), $params), - ); - } - -} diff --git a/UI/Controller.php b/UI/Controller.php deleted file mode 100644 index e1d6fb3..0000000 --- a/UI/Controller.php +++ /dev/null @@ -1,11 +0,0 @@ -latte); - } - - /* - * This is basically router. - */ - public function create(?\WP_Post $post, bool $isPreview): Controller - { - $base = $this->baseFactory->create($post); - - if ($isPreview) { - return new PreviewController($base, $this->latte, $post); - } - - if ($post === null || $post->post_type !== 'page') { - throw new NotFound(); - } - - 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), - }; - } - - public function create404(): ErrorController - { - $base = $this->baseFactory->create(null); - return new ErrorController($base, $this->latte); - } - -} diff --git a/UI/Courses/CoursesController.latte b/UI/Courses/CoursesController.latte deleted file mode 100644 index 951c551..0000000 --- a/UI/Courses/CoursesController.latte +++ /dev/null @@ -1,162 +0,0 @@ -{layout $layoutPath} - -{block content} -
-

- Vzdělávací kurzy a přednášky -

- -

- Seznam akcí -

- -
isAnySelected} data-hb-expandable-expanded="1"{/if}> - - - -
- -

- 👉 Na této stránce je přehled aktuálně vypsaných kurzů. Pro více informací či další kurzy - klikni zde. -

- - {include '../components/eventList.latte', eventCollection => $eventCollection} -
- - - diff --git a/UI/Courses/CoursesController.php b/UI/Courses/CoursesController.php deleted file mode 100644 index ddf431f..0000000 --- a/UI/Courses/CoursesController.php +++ /dev/null @@ -1,65 +0,0 @@ -bisApiClient->getEvents($params); - $eventCollection = new EventCollectionDC($events, $this->dateFormatHuman, $this->dateFormatRobot); - - } catch (ConnectionToBisFailed) { - $eventCollection = EventCollectionDC::unableToLoad($this->dateFormatHuman, $this->dateFormatRobot); - - } - - $filters = CoursesFiltersDC::from(self::FILTER_KEY, $selectedFilter); - - $params = [ - 'filters' => $filters, - 'eventCollection' => $eventCollection, - 'highSchoolPageLink' => $this->base->getLinkFor('programy-pro-stredni-skoly'), - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-courses-lazy-load', $theme->get_template_directory_uri() . '/frontend/dist/js/lazyLoad.js', [], $themeVersion); - }); - - $this->latte->render( - __DIR__ . '/CoursesController.latte', - \array_merge($this->base->getLayoutVariables('courses'), $params), - ); - } - -} diff --git a/UI/English/EnglishController.php b/UI/English/EnglishController.php deleted file mode 100644 index aa1472d..0000000 --- a/UI/English/EnglishController.php +++ /dev/null @@ -1,27 +0,0 @@ -latte->render( - __DIR__ . '/EnglishController.latte', - \array_merge($this->base->getLayoutVariables('english')), - ); - } - -} diff --git a/UI/Error/ErrorController.404.latte b/UI/Error/ErrorController.404.latte deleted file mode 100644 index 29a7ab5..0000000 --- a/UI/Error/ErrorController.404.latte +++ /dev/null @@ -1,39 +0,0 @@ -{layout $layoutPath} - -{block content} -
-

- Jejda… -

- -

- Stránku, kterou chceš zobrazit, bohužel nikde nemůžeme najít. -

- -

Co teď?

- -
    -
  • - Podívej se nahoru do navigačního menu, jestli tam nenajdeš správnou cestu k hledané informaci. -
  • - -
  • - Můžeš přejít na hlavní stránku a zkusit potřebnou informaci najít odtud. -
  • - -
  • - Interní brontosauří informace hledej v Mozku. -
  • - -
  • - Pokud nikde neuspěješ, můžeš nám napsat na web@brontosaurus.cz a pořešíme to. -
  • -
- -

Zavedl tě sem zbloudilý odkaz?

- -

- To, že tato stránka neexistuje, může být i nedopatření. Pokud si myslíš, že tomu tak je, napiš nám na e-mail web@brontosaurus.cz a my to prověříme. -

-
- diff --git a/UI/Error/ErrorController.php b/UI/Error/ErrorController.php deleted file mode 100644 index 7086a9c..0000000 --- a/UI/Error/ErrorController.php +++ /dev/null @@ -1,25 +0,0 @@ -latte->render( - __DIR__ . '/ErrorController.404.latte', - $this->base->getLayoutVariables('error404'), - ); - } - -} diff --git a/UI/Event/EventController.latte b/UI/Event/EventController.latte deleted file mode 100644 index 9f0724d..0000000 --- a/UI/Event/EventController.latte +++ /dev/null @@ -1,333 +0,0 @@ -{varType HnutiBrontosaurus\Theme\UI\DataContainers\Events\EventDC $event} -{varType string $alternativeForFullEventLink} -{layout $layoutPath} - -{block meta} -{if $event} - - - -{* @todo: set escaping filter *} - - - - - -{* @todo: set escaping filter *} - -{/if} -{/block} - -{define local application, HnutiBrontosaurus\Theme\UI\DataContainers\Events\EventDC $event} -{if $event->isRegistrationRequired} - - Chci jet - -{else} -

- Na tuto akci není třeba se hlásit, stačí přijít. 😉 -

-{/if} -{/define} - -{block content} -
-
- {if $hasBeenUnableToLoad} -
- Promiňte, zrovna nám vypadl systém, kde máme uloženy všechny informace o plánovaných akcích. - Zkuste to prosím za chvilku znovu. -
- {else} -

- {$event->title} -

- -
- - {$tag} - -
- -
-
- {if $event->hasCoverPhoto} - - - - {else} -
- {/if} - -
- {include '../components/eventLabels.latte', labels: $event->labels} -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Datum - - -
- Místo - - - {$event->place->name} - -
- Věk - - {if $event->age->isInterval} - {$event->age->from}–{$event->age->until} let - {elseif $event->age->isFromListed} - od {$event->age->from} - {if $event->age->from === 1}roku{else}let{/if} - {elseif $event->age->isUntilListed} - do {$event->age->until} let - {/if} -
- Začátek akce - - -
- Cena - - {if $event->isPaid} - {$event->price} - {else} - - bez poplatku - - {/if} -
- Kontaktní osoba - - {if $event->contact->isPersonListed}{$event->contact->person}
{/if} - {if $event->contact->isPhoneListed}{$event->contact->phone|formatPhoneNumber}
{/if} - {$event->contact->email} -
- Web akce: - - - {$event->relatedWebsite|renderWebsiteUserFriendly} - -
- -
- Akce je vhodná i pro ty, co s námi - jedou poprvé. -
-
-
- - - - -
-

- Co na nás čeká -

- -

- {$event->invitation->introduction|noescape}{* @todo: set escaping filter *} -

-
- - -
-

- Co, kde a jak -

- -

- {$event->invitation->organizationalInformation|noescape}{* @todo: set escaping filter *} -

- -
    -
  • - Ubytování: {$event->invitation->accommodation} -
  • - -
  • - Strava: - {foreach $event->invitation->food as $food}{$food}{sep}, {/sep}{/foreach} -
  • -
-
- - -
-

- Dobrovolnická pomoc -

- -

- {$event->invitation->workDescription|noescape}{* @todo: set escaping filter *} -

- - {var $areDays = $event->invitation->areWorkDaysListed} - {var $areHours = $event->invitation->areWorkHoursPerDayListed} -
- Na akci budeme pracovat - {if $areDays} - {$event->invitation->workDays|formatDayCount}{if $areHours}, každý den zhruba {$event->invitation->workHoursPerDay|formatHourCount}.{else}.{/if} - {else} - přibližně {$event->invitation->workHoursPerDay|formatHourCount} denně. - {/if} -
-
- - -
-
-

- Malá ochutnávka -

- -

- {$event->invitation->presentation->text|noescape}{* @todo: set escaping filter *} -

-
- - -
- - -
-

- Organizační tým -

- -

- {if $event->areOrganizersListed}Těší se na tebe {$event->organizers}.
{/if} - Pořádá {$event->organizerUnit} -

-
- - -
-

- Kontakt -

- -
- {if $event->contact->isPersonListed}Kontaktní osoba: {$event->contact->person}
{/if} - E-mail: {$event->contact->email}
- {if $event->contact->isPhoneListed}Telefon: {$event->contact->phone|formatPhoneNumber}{/if} - - {if $event->hasRelatedWebsite} -
- Webová stránka: odkaz - {/if} -
-
- - - {/if} -
-
- - diff --git a/UI/Event/EventController.php b/UI/Event/EventController.php deleted file mode 100644 index 6d986e7..0000000 --- a/UI/Event/EventController.php +++ /dev/null @@ -1,140 +0,0 @@ -event = $this->bisApiClient->getEvent($eventId); - $eventDC = new EventDC($this->event, $this->dateFormatHuman, $this->dateFormatRobot); - - // add event name to title tag (source https://stackoverflow.com/a/62410632/3668474) - add_filter( - 'document_title_parts', - fn(array $title) => array_merge($title, ['title' => $this->event->getName()]), - ); - - } catch (EventNotFound) { - throw new NotFound(); - - } catch (ConnectionToBisFailed) { - $hasBeenUnableToLoad = true; - $eventDC = null; - } - - $params = [ - 'event' => $eventDC, - 'alternativeForFullEventLink' => $this->base->getLinkFor(FutureController::PAGE_SLUG), - 'hasBeenUnableToLoad' => $hasBeenUnableToLoad, - 'firstTimePageLink' => $this->base->getLinkFor('jedu-poprve'), - 'aboutCrossroadPageLink' => $this->base->getLinkFor('o-brontosaurovi'), - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-detail', $theme->get_template_directory_uri() . '/UI/Event/assets/dist/js/index.js', [], $themeVersion); - wp_enqueue_script('brontosaurus-detail-lightbox', $theme->get_template_directory_uri() . '/frontend/dist/js/lightbox.js', [], $themeVersion); - }); - - $this->registerFilters(); - $this->latte->render( - __DIR__ . '/EventController.latte', - array_merge($this->base->getLayoutVariables('detail'), $params), - ); - } - - - private static function fixRankMathTags(): void - { - // remove generated meta data on this page, see https://support.rankmath.com/ticket/is-there-anyway-to-disable-or-remove-specific-meta-from-posts/ - // https://rankmath.com/kb/filters-hooks-api-developer/#change-the-title - add_filter('rank_math/frontend/title', static fn($title) => null); - // https://rankmath.com/kb/filters-hooks-api-developer/#remove-opengraph-tags - add_action('rank_math/head', function () { - remove_all_actions('rank_math/opengraph/facebook'); - remove_all_actions('rank_math/opengraph/twitter'); - }); - } - - - private function registerFilters(): void - { - $this->latte->addFilter('renderWebsiteUserFriendly', static function (string $website): string { - $hostname = parse_url($website, PHP_URL_HOST); - $hostname = $hostname !== null ? $hostname : $website; // in case of passing "a.b.cz" to parse_url(), it fails to parse it for some reason, so just skip it - - if (Strings::startsWith($hostname, 'www.')) { - $hostname = str_replace('www.', '', $hostname); - } - - return $hostname; - }); - - $this->latte->addFilter('resolveRegistrationLink', fn(EventDC $event): string => - $this->applicationUrlTemplate->for($event->id, $event->link)); - - $this->latte->addFilter('formatDayCount', static fn(int $days): string => - match($days) { - 1 => sprintf('%d den', $days), - 2,3,4 => sprintf('%d dny', $days), - default => sprintf('%d dní', $days), - }); - - $this->latte->addFilter('formatHourCount', static fn(int $hours): string => - match($hours) { - 1 => sprintf('%d hodinu', $hours), - 2,3,4 => sprintf('%d hodiny', $hours), - default => sprintf('%d hodin', $hours), - }); - } - -} diff --git a/UI/Event/assets/dist/.gitignore b/UI/Event/assets/dist/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/UI/Event/assets/dist/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/UI/Event/assets/src/scripts/handleFlashMessage.ts b/UI/Event/assets/src/scripts/handleFlashMessage.ts deleted file mode 100644 index b5d6e8a..0000000 --- a/UI/Event/assets/src/scripts/handleFlashMessage.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default (document: Document) => { - let flashMessageElement = document.querySelector('.detail__flashMessage'); - if (flashMessageElement === null) { - return; - } - - let closeButtonElement = flashMessageElement.querySelector('.detail__flashMessage-closeButton'); - if (closeButtonElement === null) { - return; - } - - closeButtonElement.addEventListener('click', () => { - flashMessageElement!.classList.add('detail__flashMessage--hidden'); // definitely is there - }); -} diff --git a/UI/Event/assets/src/scripts/index.ts b/UI/Event/assets/src/scripts/index.ts deleted file mode 100644 index b0c8ef4..0000000 --- a/UI/Event/assets/src/scripts/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import handleflashMessage from './handleFlashMessage'; - -document.addEventListener('DOMContentLoaded', () => { - handleflashMessage(document); -}); diff --git a/UI/FirstTime/FirstTimeController.php b/UI/FirstTime/FirstTimeController.php deleted file mode 100644 index b4646ab..0000000 --- a/UI/FirstTime/FirstTimeController.php +++ /dev/null @@ -1,32 +0,0 @@ - VoluntaryController::FILTER_KEY, - ]; - - $this->latte->render( - __DIR__ . '/FirstTimeController.latte', - \array_merge($this->base->getLayoutVariables('firsttime'), $params), - ); - } - -} diff --git a/UI/ForChildren/ForChildrenController.latte b/UI/ForChildren/ForChildrenController.latte deleted file mode 100644 index 74fb33d..0000000 --- a/UI/ForChildren/ForChildrenController.latte +++ /dev/null @@ -1,161 +0,0 @@ -{layout $layoutPath} - -{block content} -
-

- Akce pro děti i rodiče -

- - - -

- Akce pro děti a rodiče s dětmi -

- -
isAnySelected} data-hb-expandable-expanded="1"{/if}> - - - -
- - {include '../components/eventList.latte', eventCollection => $eventCollection} -
- - diff --git a/UI/ForChildren/ForChildrenController.php b/UI/ForChildren/ForChildrenController.php deleted file mode 100644 index 718d63b..0000000 --- a/UI/ForChildren/ForChildrenController.php +++ /dev/null @@ -1,66 +0,0 @@ -bisApiClient->getEvents($params); - $eventCollection = new EventCollectionDC($events, $this->dateFormatHuman, $this->dateFormatRobot); - - } catch (ConnectionToBisFailed) { - $eventCollection = EventCollectionDC::unableToLoad($this->dateFormatHuman, $this->dateFormatRobot); - - } - - $filters = ForChildrenFiltersDC::from(self::FILTER_KEY, $selectedFilter); - - $params = [ - 'filters' => $filters, - 'eventCollection' => $eventCollection, - 'aboutStructurePageLink' => $this->base->getLinkFor(AboutStructureController::PAGE_SLUG), - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-forChildren-lazy-load', $theme->get_template_directory_uri() . '/frontend/dist/js/lazyLoad.js', [], $themeVersion); - }); - - $this->latte->render( - __DIR__ . '/ForChildrenController.latte', - \array_merge($this->base->getLayoutVariables('forchildren'), $params), - ); - } - -} diff --git a/UI/Future/FutureController.latte b/UI/Future/FutureController.latte deleted file mode 100644 index 6ffea23..0000000 --- a/UI/Future/FutureController.latte +++ /dev/null @@ -1,26 +0,0 @@ -{layout $layoutPath} - -{block content} -
-

- Co se děje u Brontosaurů? -

- - - {if $hasBeenUnableToLoad} -
- Promiňte, zrovna nám vypadl systém, kde máme uloženy všechny informace o plánovaných akcích. - Zkuste to prosím za chvilku znovu. -
- {else} -
-

- {$month->monthNumber|convertMonthNumberToName} -

- -
- {include '../components/eventList.latte', eventCollection => $month->events, inFutureView => TRUE} -
-
- {/if} -
diff --git a/UI/Future/FutureController.php b/UI/Future/FutureController.php deleted file mode 100644 index 6c5473b..0000000 --- a/UI/Future/FutureController.php +++ /dev/null @@ -1,112 +0,0 @@ -orderByStartDate(); - $params->setPeriod(Period::FUTURE_ONLY()); - - $hasBeenUnableToLoad = false; - - try { - $events = $this->bisApiClient->getEvents($params); - - // categorize events by month - $months = []; - $currentMonthWrapperDC = null; - $lastMonth = null; - - foreach ($events as $event) { - $monthNumber = $event->getStartDate()->getMonth(); - if ($lastMonth === null || $lastMonth !== $monthNumber) { - if ($currentMonthWrapperDC !== null) { - $months[] = $currentMonthWrapperDC; - } - - $currentMonthWrapperDC = new MonthWrapperDC($monthNumber); - } - - \assert($currentMonthWrapperDC instanceof MonthWrapperDC); - $currentMonthWrapperDC->addEvent($event, $this->dateFormatHuman, $this->dateFormatRobot); - - $lastMonth = $monthNumber; - } - if ($currentMonthWrapperDC !== null) { - $months[] = $currentMonthWrapperDC; - } - - } catch (ConnectionToBisFailed) { - $months = []; - $hasBeenUnableToLoad = true; - } - - $params = [ - 'months' => $months, - 'hasBeenUnableToLoad' => $hasBeenUnableToLoad, - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-future-lazy-load', $theme->get_template_directory_uri() . '/frontend/dist/js/lazyLoad.js', [], $themeVersion); - }); - - self::registerConvertMonthNumberToNameLatteFilter($this->latte); - $this->latte->render( - __DIR__ . '/FutureController.latte', - \array_merge($this->base->getLayoutVariables('future'), $params), - ); - } - - private static function registerConvertMonthNumberToNameLatteFilter(Engine $latte): void - { - $latte->addFilter('convertMonthNumberToName', function (int $monthNumber) { - $monthNames = [ - 1 => 'leden', - 'únor', - 'březen', - 'duben', - 'květen', - 'červen', - 'červenec', - 'srpen', - 'září', - 'říjen', - 'listopad', - 'prosinec', - ]; - - if ( ! \array_key_exists($monthNumber, $monthNames)) { - throw new \Exception('Month #' . $monthNumber . ' does not exist.'); - } - - return $monthNames[$monthNumber]; - }); - } - -} diff --git a/UI/HighSchools/HighSchoolsController.php b/UI/HighSchools/HighSchoolsController.php deleted file mode 100644 index 1b4b75c..0000000 --- a/UI/HighSchools/HighSchoolsController.php +++ /dev/null @@ -1,31 +0,0 @@ - get_template_directory_uri() . '/UI/Contacts/assets/dist/images', - ]; - - $this->latte->render( - __DIR__ . '/HighSchoolsController.latte', - \array_merge($this->base->getLayoutVariables('highschool'), $params), - ); - } - -} diff --git a/UI/Homepage/HomepageController.latte b/UI/Homepage/HomepageController.latte deleted file mode 100644 index 4a23168..0000000 --- a/UI/Homepage/HomepageController.latte +++ /dev/null @@ -1,66 +0,0 @@ -{layout $layoutPath} - -{block content} -
- {if $banner !== null} - {var $tag = $banner->link !== null ? 'a' : 'div'} - <{$tag} class="hb-block-banner hb-mbs-2 hb-mbe-5" {if $banner->link !== null}href="{$banner->link}" rel="noopener"{/if} style="--hb-block-banner-background-url: url({$banner->image|noescape})"> -
-
-
{$banner->heading}
-
{$banner->subheading}
- více info - -
-
- - {/if} - -

- Dobrovolnické a zážitkové akce -

- -

- Pojeď na víkendovou nebo prázdninovou akci vstříc novým zážitkům a přátelstvím. - Vyraz s námi pomáhat přírodě a památkám u nás i v zahraničí. -

- - - - -
- - - diff --git a/UI/Homepage/HomepageController.php b/UI/Homepage/HomepageController.php deleted file mode 100644 index 679d944..0000000 --- a/UI/Homepage/HomepageController.php +++ /dev/null @@ -1,98 +0,0 @@ -setPeriod(Period::FUTURE_ONLY()) - ->setLimit(6) // we need three, but because of post-filtering, we need to load more - ->orderByStartDate(); - $events = $this->bisApiClient->getEvents($params); - - // post-filter: leave out full events - $events = array_filter( - $events, - static fn(Event $event) => ! $event->getRegistration()->getIsEventFull(), - ); - - // keep only first three - $events = array_slice($events, offset: 0, length: 3, preserve_keys: false); - - $eventCollection = new EventCollectionDC($events, $this->dateFormatHuman, $this->dateFormatRobot); - - } catch (ConnectionToBisFailed) { - $eventCollection = EventCollectionDC::unableToLoad($this->dateFormatHuman, $this->dateFormatRobot); - } - - $params = [ - 'banner' => self::banner(), - 'aboutCrossroadPageLink' => $this->base->getLinkFor('o-brontosaurovi'), - 'eventCollection' => $eventCollection, - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-homepage-lazy-load', $theme->get_template_directory_uri() . '/frontend/dist/js/lazyLoad.js', [], $themeVersion); - wp_enqueue_script('brontosaurus-homepage-references', $theme->get_template_directory_uri() . '/frontend/dist/js/references.js', [], $themeVersion); - }); - - $this->latte->render( - __DIR__ . '/HomepageController.latte', - \array_merge($this->base->getLayoutVariables('home'), $params), - ); - } - - private static function banner(): ?\stdCLass - { - $heading = get_option('homepage-banner_heading'); - $subheading = get_option('homepage-banner_subheading'); - $image = get_option('homepage-banner_image'); - $link = get_option('homepage-banner_link'); - - if ($image === '') { - return null; - } - - return (object) [ - 'heading' => $heading, - 'subheading' => $subheading ?: null, - 'image' => $image, - 'link' => $link ?: null, - ]; - } - -} diff --git a/UI/Meetups/MeetupsController.latte b/UI/Meetups/MeetupsController.latte deleted file mode 100644 index 1fd58a8..0000000 --- a/UI/Meetups/MeetupsController.latte +++ /dev/null @@ -1,57 +0,0 @@ -{layout $layoutPath} - -{block content} -
-

- Setkávejte se s přáteli -

- -

- Seznam akcí -

- - {include '../components/eventList.latte', eventCollection => $eventCollection} -
- - - diff --git a/UI/Meetups/MeetupsController.php b/UI/Meetups/MeetupsController.php deleted file mode 100644 index 6c9d3f2..0000000 --- a/UI/Meetups/MeetupsController.php +++ /dev/null @@ -1,61 +0,0 @@ -bisApiClient->getEvents($params); - $eventCollection = new EventCollectionDC($events, $this->dateFormatHuman, $this->dateFormatRobot); - - } catch (ConnectionToBisFailed) { - $eventCollection = EventCollectionDC::unableToLoad($this->dateFormatHuman, $this->dateFormatRobot); - - } - - $params = [ - 'eventCollection' => $eventCollection, - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-meetups-lazy-load', $theme->get_template_directory_uri() . '/frontend/dist/js/lazyLoad.js', [], $themeVersion); - }); - - $this->latte->render( - __DIR__ . '/MeetupsController.latte', - \array_merge($this->base->getLayoutVariables('meetups'), $params), - ); - } - -} diff --git a/UI/Preview/PreviewController.latte b/UI/Preview/PreviewController.latte deleted file mode 100644 index 5cd3f76..0000000 --- a/UI/Preview/PreviewController.latte +++ /dev/null @@ -1,8 +0,0 @@ -{layout $layoutPath} - -{block content} -
-

{$title}

- - {$content|noescape} -
diff --git a/UI/Preview/PreviewController.php b/UI/Preview/PreviewController.php deleted file mode 100644 index 576ccbd..0000000 --- a/UI/Preview/PreviewController.php +++ /dev/null @@ -1,31 +0,0 @@ - $this->post->post_title, - 'content' => $this->post->post_content, - ]; - - $this->latte->render( - __DIR__ . '/PreviewController.latte', - \array_merge($this->base->getLayoutVariables('preview'), $params), - ); - } -} diff --git a/UI/Rentals/RentalsController.latte b/UI/Rentals/RentalsController.latte deleted file mode 100644 index 5ff981d..0000000 --- a/UI/Rentals/RentalsController.latte +++ /dev/null @@ -1,552 +0,0 @@ -{layout $layoutPath} - -{block content} -
-
-

- Pronájmy -

- -

- Hledáš netradiční ubytování pro svoji organizaci, společnost, oddíl, rodinu či někoho jiného? - Nabízíme pronájem některé z našich chat v krásných lokalitách a konferenční místnost v centru Brna. -

- - - -
-

- Konferenční místnost Hnutí Brontosaurus -

- - - Hvězdová 306/10, 602 00 Brno - - -

- Komerčním i neziskovým organizacím nabízíme naši zasedací místnost. - Je vhodná i pro větší skupiny do 20 lidí. - Sousedí s vybavenou kuchyňkou a sociálním zařízením. - Příjemné prostory se nachází ve zrekonstruované části budovy. -

- -
-

- Vybavení -

- -

- Nabízíme magnetický flipchart, bezdrátové připojení k internetu - i zapůjčení prezentační techniky (notebook, dataprojektor). -

-
- -
-

- Ceník pronájmu -

- - - - - - - - - - - - - - - - - - - - - - - - - -
- Do 2 hodin - - 400 Kč -
- Každá další hodina - - 80 Kč -
- Celodenní pronájem - - 800 Kč -
- Víkendový pronájem - - 1 500 Kč{* intentionally missing nbsp between number and `Kč` as it is better to break line in that place than in the middle of `Kč` *} -
- - Ostatní dle dohody. -
- -
-

- Zapůjčení příslušenství -

- - - - - - - - - - - - - - - - - - - -
- Data­projektor - - 100 Kč/hod, 600 Kč za den -
- Notebook - - 70 Kč/hod, 400 Kč za den -
- Data­projektor + notebook - - 150 Kč/hod, 800 Kč za den -
- - Neziskovým organizacím poskytujeme slevu až 50 % z ceny. -
- -
-

- Fotogalerie -

- - -
- -
-

- Místo -

- - Hvězdová 306/10,
- 602 00, Brno
- - Ukázat na mapě - -
- -
-

- Kontakt -

- -
- Veronika Vlačuhová
- telefon: 734 392 735
- email: hnuti@brontosaurus.cz -
-
-
- -
-

- Ekologické volnočasové centrum Švýcárna -

- - - Josefovská 459, 679 04 Adamov - - -

- Objekt bývalého hutního hostince a železitých lázní v alpském stylu nedávno prošel rekonstrukcí. - Stojí v Josefském údolí v Moravském krasu přibližně 3 kilometry východně od Adamova - poblíž pozůstatků komplexu bývalé železářské huti. -

- -
-

- Ubytovací kapacita -

- -
    -
  • - přízemí: restaurace s možností stravování pro 45 lidí -
  • - -
  • - první patro: větší místnost s minimálně 6 lůžky, společenská místnost, toaleta, koupelna s masážní vanou -
  • - -
  • - podkroví: 5 pokojů po 3 lůžkách (s možností přistýlky) a 2 pokoje po 2 lůžkách -
  • -
-
- -
-

- Ceník -

- -

- Informace o aktuálních cenách - nalezneš zde. -

-
- -
-

- Fotogalerie -

- - -
- -
-

- Místo -

- - Josefovská 459,
- 679 04, Adamov
- - Ukázat na mapě - -
- -
-

- Kontakt -

- -
- Robert Kubáň
- telefon: 603 375 481
- email: modry.kamen@centrum.cz
- web: pronajmy.svycarna.eu - -
-
-
- -
-

- Horská chata Smrčník -

- - - Lipová-lázně 327, 790 61 Lipová-lázně - - -

- Nabízíme ubytování v klasické dřevěné horské chatě pro akce s dětmi a mládeží i pro všechny, kteří hledají nenáročné turistické ubytování. - K budově lze přijet autem, vlaková a autobusová zastávka je vzdálena 1,5 km. Smrčník leží na rozhraní Jeseníků a Rychlebských hor ve výšce - 740 metrů nad mořem uprostřed jesenických lesů – 2 km od obce Lipová-lázně a 5 km od Lázní Jeseník. Proto poskytuje ideální podmínky - pro celoroční rekreaci, turistiku, lyžování a další aktivity. -

- -
-

- Ubytovací kapacita -

- -
    -
  • - celková kapacita 45 lůžek -
  • - -
  • - chatka pod Smrčníkem 9 lůžek ve 3 pokojích -
  • - -
  • - chata Smrčník 37 lůžek v 9 pokojích a společenská místnost s krbem a klubovnou -
  • -
-
- -
-

- Ceník -

- -

- Informace o aktuálních cenách - nalezneš zde. -

-
- -
-

- Fotogalerie -

- - -
- -
-

- Místo -

- - Lipová-lázně 327
- 790 61, Lipová-lázně
- - Ukázat na mapě - -
- -
-

- Kontakt -

- -
- Petr Prágl
- telefon: 724 448 884
- email: smrcnik@seznam.cz
- web: smrcnik.rychleby.cz -
-
-
- -
-

- Chata Kristýna v Bílých Karpatech -

- - - 696 74 Javorník nad Veličkou - - -

- Přednostně nabízíme ubytování dětským a mládežnickým organizacím, ale rádi ubytujeme i samostané skupiny dospělých - či studentů se zájmem o pobyt v přírodě. Budova stojí v Chráněné krajinné oblasti Bílé Karpaty nedaleko obce - Javorník nad Veličkou ve Filipovském údolí. Dojdeš k ní po 5 km po zelené turistické značce z Javorníku nad Veličkou, - kam jezdí autobus i vlak. -

- -
-

- Ubytovací kapacita -

- -
    -
  • - celková kapacita 25 lůžek (nutný vlastní spacák) -
  • - -
  • - kuchyňka, společenská místnost s krbovými kamny, dvě společné ložnice a hala s posezením -
  • - -
  • - sprcha (s teplou vodou), umývárna a suché WC mimo chatu -
  • - -
  • - venkovní zastřešené posezení, ohniště a suché WC -
  • -
-
- -
-

- Ceník -

- -

- Informace o aktuálních cenách - nalezneš zde. -

-
- -
-

- Fotogalerie -

- - -
- -
-

- Místo -

- - U rozcestníku Lišcí bouda
- 696 74, Javorník nad Veličkou
- - Ukázat na mapě - -
- -
-

- Kontakt -

- -
- František Novotný
- telefon: 603 833 902
- email: chata.kristyna@seznam.cz
- web: podluzi.brontosaurus.cz -
-
-
-
-
diff --git a/UI/Rentals/RentalsController.php b/UI/Rentals/RentalsController.php deleted file mode 100644 index 4325b7a..0000000 --- a/UI/Rentals/RentalsController.php +++ /dev/null @@ -1,38 +0,0 @@ - get_template_directory_uri() . '/UI/Rentals/assets/dist/images', - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-rentals-lightbox', $theme->get_template_directory_uri() . '/frontend/dist/js/lightbox.js', [], $themeVersion); - }); - - $this->latte->render( - __DIR__ . '/RentalsController.latte', - \array_merge($this->base->getLayoutVariables('rentals'), $params), - ); - } - -} diff --git a/UI/Rentals/assets/dist/.gitignore b/UI/Rentals/assets/dist/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/UI/Rentals/assets/dist/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/UI/Rentals/assets/src/images/chata-kristyna-01.jpg b/UI/Rentals/assets/src/images/chata-kristyna-01.jpg deleted file mode 100644 index 786b1a6..0000000 Binary files a/UI/Rentals/assets/src/images/chata-kristyna-01.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-kristyna-02.jpg b/UI/Rentals/assets/src/images/chata-kristyna-02.jpg deleted file mode 100644 index 1890508..0000000 Binary files a/UI/Rentals/assets/src/images/chata-kristyna-02.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-kristyna-03.jpg b/UI/Rentals/assets/src/images/chata-kristyna-03.jpg deleted file mode 100644 index bf3a159..0000000 Binary files a/UI/Rentals/assets/src/images/chata-kristyna-03.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-kristyna-04.jpg b/UI/Rentals/assets/src/images/chata-kristyna-04.jpg deleted file mode 100644 index 3639463..0000000 Binary files a/UI/Rentals/assets/src/images/chata-kristyna-04.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-kristyna-05.jpg b/UI/Rentals/assets/src/images/chata-kristyna-05.jpg deleted file mode 100644 index 247d05b..0000000 Binary files a/UI/Rentals/assets/src/images/chata-kristyna-05.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-kristyna-06.jpg b/UI/Rentals/assets/src/images/chata-kristyna-06.jpg deleted file mode 100644 index d7480bb..0000000 Binary files a/UI/Rentals/assets/src/images/chata-kristyna-06.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-smrcnik-01.jpg b/UI/Rentals/assets/src/images/chata-smrcnik-01.jpg deleted file mode 100644 index d8e2c32..0000000 Binary files a/UI/Rentals/assets/src/images/chata-smrcnik-01.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-smrcnik-02.jpg b/UI/Rentals/assets/src/images/chata-smrcnik-02.jpg deleted file mode 100644 index a88c9ae..0000000 Binary files a/UI/Rentals/assets/src/images/chata-smrcnik-02.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-smrcnik-03.jpg b/UI/Rentals/assets/src/images/chata-smrcnik-03.jpg deleted file mode 100644 index bd05b06..0000000 Binary files a/UI/Rentals/assets/src/images/chata-smrcnik-03.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-smrcnik-04.jpg b/UI/Rentals/assets/src/images/chata-smrcnik-04.jpg deleted file mode 100644 index 29ef15c..0000000 Binary files a/UI/Rentals/assets/src/images/chata-smrcnik-04.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/chata-smrcnik-05.jpg b/UI/Rentals/assets/src/images/chata-smrcnik-05.jpg deleted file mode 100644 index 55dab80..0000000 Binary files a/UI/Rentals/assets/src/images/chata-smrcnik-05.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/konferencni-mistnost-hb-01.jpg b/UI/Rentals/assets/src/images/konferencni-mistnost-hb-01.jpg deleted file mode 100644 index f459544..0000000 Binary files a/UI/Rentals/assets/src/images/konferencni-mistnost-hb-01.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/konferencni-mistnost-hb-02.jpg b/UI/Rentals/assets/src/images/konferencni-mistnost-hb-02.jpg deleted file mode 100644 index cfdf3fc..0000000 Binary files a/UI/Rentals/assets/src/images/konferencni-mistnost-hb-02.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/svycarna-01.jpg b/UI/Rentals/assets/src/images/svycarna-01.jpg deleted file mode 100644 index 93478d3..0000000 Binary files a/UI/Rentals/assets/src/images/svycarna-01.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/svycarna-02.jpg b/UI/Rentals/assets/src/images/svycarna-02.jpg deleted file mode 100644 index 1439eb5..0000000 Binary files a/UI/Rentals/assets/src/images/svycarna-02.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/svycarna-03.jpg b/UI/Rentals/assets/src/images/svycarna-03.jpg deleted file mode 100644 index 5ca819f..0000000 Binary files a/UI/Rentals/assets/src/images/svycarna-03.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/svycarna-04.jpg b/UI/Rentals/assets/src/images/svycarna-04.jpg deleted file mode 100644 index d83d644..0000000 Binary files a/UI/Rentals/assets/src/images/svycarna-04.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/svycarna-05.jpg b/UI/Rentals/assets/src/images/svycarna-05.jpg deleted file mode 100644 index 3d9b880..0000000 Binary files a/UI/Rentals/assets/src/images/svycarna-05.jpg and /dev/null differ diff --git a/UI/Rentals/assets/src/images/svycarna-06.jpg b/UI/Rentals/assets/src/images/svycarna-06.jpg deleted file mode 100644 index d278af4..0000000 Binary files a/UI/Rentals/assets/src/images/svycarna-06.jpg and /dev/null differ diff --git a/UI/SearchResults/SearchResultsController.php b/UI/SearchResults/SearchResultsController.php deleted file mode 100644 index 9ad340d..0000000 --- a/UI/SearchResults/SearchResultsController.php +++ /dev/null @@ -1,27 +0,0 @@ -latte->render( - __DIR__ . '/SearchResultsController.latte', - \array_merge($this->base->getLayoutVariables('searchresults'), $params), - ); - } - -} diff --git a/UI/SupportOverview/SupportOverviewController.latte b/UI/SupportOverview/SupportOverviewController.latte deleted file mode 100644 index 937d66e..0000000 --- a/UI/SupportOverview/SupportOverviewController.latte +++ /dev/null @@ -1,160 +0,0 @@ -{layout $layoutPath} - -{block content} -
-
-

- Adoptuj Brontosaura - a nech za sebou viditelnou stopu! -

- -
- Vůně ohně, kytara a sladký spánek ve spacáku - po dni naplněném kamarádstvím a péčí o přírodu. - To bychom přáli zažít každému. -
- -

- Už padesát let zapojujeme mladé lidi do dobrovolnických činností - a pečujeme s nimi o přírodu a památky. Přispíváme k řešení - ztráty pestrosti přírody, dopadů sucha a změn počasí, či chátrání památek. - Necháváme za sebou vysázená stromořadí, opravené hrady, obnovené mokřady. - Pojď do toho s námi! -

-
- -
- -
- - - -
-
-
-
-
- {$item->title} -
- -

{$text}

-
- -
- -
- - -
-
-
- -
- - chci darovat jednorázově -
- -
- -
-

- Co dokážeme s tvou podporou za jeden rok? -

- -
    -
  • postaráme se o 1 500 ptačích budek a vysadíme a opečujeme stovky stromů
  • -
  • umožníme 2 200 mladým lidem pomáhat přírodním a historickým památkám
  • -
  • odpracujeme 120 000 dobrovolnických hodin a pomůžeme na 90 místech
  • -
  • uspořádáme na 650 akcí pro přírodu, památky a lidi
  • -
-
- -
- -
-

- Příběhy 50 let brontosauřího nadšení -

- -

- Již 50 let pomáháme přírodě, památkám a lidem. Koukni na Příběhy nadšení a zjisti, proč našim členům, - organizátorům a dárcům dává Brontosaurus smysl a dlouhodobě ho podporují. -

- - - - - zobrazit další - -
- -
- -
-

- Proč adoptuji Brontosaura? -

- -
- - - -
    -
  • -
    -
    - {$item->name} -
    - -
    - {$item->role} -
    -
    - -
    {$item->quotation}
    -
  • -
-
-
- -
- -
-
-
- Podpoř brontosauří tradici i v dalších 50 letech! Děkujeme. -
- - - Chci podpořit Brontosaura - -
-
-
diff --git a/UI/SupportOverview/SupportOverviewController.php b/UI/SupportOverview/SupportOverviewController.php deleted file mode 100644 index d0cf366..0000000 --- a/UI/SupportOverview/SupportOverviewController.php +++ /dev/null @@ -1,174 +0,0 @@ -get('Version'); - wp_enqueue_script('brontosaurus-supportOverview-references', $theme->get_template_directory_uri() . '/frontend/dist/js/references.js', [], $themeVersion); - }); - - $params = [ - 'whatWeDo' => self::whatWeDo(), - 'aboutSuccessesLink' => $this->base->getLinkFor(AboutSuccessesController::PAGE_SLUG) . "?" . AboutSuccessesController::PARAM_ALL, - 'stories' => self::stories(), - 'references' => self::references(), - ]; - - $this->latte->render( - __DIR__ . '/SupportOverviewController.latte', - \array_merge($this->base->getLayoutVariables('supportoverview'), $params), - ); - } - - /** @return array */ - private static function whatWeDo(): array - { - return [ - (object) [ - 'title' => 'Za živou krajinu', - 'text' => [ - 'Chceme, aby naše krajina čelící suchu a ztrátě pestrosti byla zdravá a odolala změnám klimatu.', - 'Sázíme stromořadí, oživujeme polní krajinu, staráme se o mokřady, budujeme lužní park Krče. Chceme s dobrovolníky a dobrovolnicemi obnovit další místa po celé ČR. Podpoř nás v tom.', - ], - 'image' => self::imagePathFor('adopce-krajina'), - 'price' => 2000, - ], - (object) [ - 'title' => 'Pro památky', - 'text' => [ - 'Pečujeme o desítky historických památek tvořících naše kulturní dědictví, například o hrad Lukov. Probouzíme o ně zájem u mladých lidí i veřejnosti.', - 'Chceme v tom pokračovat a opravovat i méně známé památky u nás i u krajanů v Banátu. Podpoř nás, ať můžeme pomáhat na dalších lokalitách.', - ], - 'image' => self::imagePathFor('adopce-pamatky'), - 'price' => 1000, - ], - (object) [ - 'title' => 'Chráníme vše živé', - 'text' => [ - 'Ohroženy jsou nejen chráněné druhy rostlin a živočichů, ale ubývá i těch donedávna hojných. Chceme, aby příroda zůstala pestrá i bohatá.', - 'Budujeme úkryty, vyvěšujeme budky i netopýrníky, vysazujeme květnaté louky, staráme se o migrující žáby. Podpoř nás při tvorbě prostředí plného ptačího zpěvu a hmyzího bzukotu.', - ], - 'image' => self::imagePathFor('adopce-zivot'), - 'price' => 600, - ], - (object) [ - 'title' => 'Práce na chráněných územích', - 'text' => [ - 'Česká republika oplývá vzácnými přírodními lokalitami, které je třeba chránit pro budoucí generace.', - 'Snažíme se přispět k jejich zachování. Péčí o orchidejové louky, udržováním stepních společenstev či bojem s invazními druhy. Podpoř zapojení dalších mladých lidí do těchto aktivit!', - ], - 'image' => self::imagePathFor('adopce-uzemi'), - 'price' => 200, - ], - (object) [ - 'title' => 'Pro další generace', - 'text' => [ - 'Mladí lidé pociťují obavy z budoucnosti a často nevidí, jak něco změnit. Otevíráme jim cestu do komunit přátel se kterými mnohé zmůžou.', - 'Na výukových programech v přírodě jim ukazujeme, jak mohou životní prostředí chránit. Podpoř aktivity pro mládež, která se chce podílet na naší budoucnosti.', - ], - 'image' => self::imagePathFor('adopce-generace'), - 'price' => 100, - ], - ]; - } - - /** - * @return array - */ - private static function stories(): array - { - return [ - (object) [ - 'title' => 'Spolu po tornádu', - 'text' => 'Po tornádu se nám podařilo obnovit stovky dalších stromů a zeleně. Navíc jsme opravili zničenou dětskou klubovnu v Mikulčicíc nově vylepšenou o ekologická opatření.', - 'image' => 'https://brontosaurus.cz/wp-content/uploads/2024/01/IMGP2396-scaled.jpg', - 'link' => 'https://brontosaurus.cz/pribehy-nadseni/spolu-po-tornadu/', - ], - (object) [ - 'title' => 'Malé Česko v Banátu – přátelství skrze pomoc', - 'text' => 'Brontosauři ve zdejších obcích s významnou českou komunitou pravidelně čistí veřejná prostranství, opravují památky, pečují o přírodu a rozvíjejí šetrnou turistiku skrze mapování turistických tras.', - 'image' => 'https://brontosaurus.cz/wp-content/uploads/2024/01/rumunsko-mala.jpg', - 'link' => 'https://brontosaurus.cz/pribehy-nadseni/male-cesko-v-banatu/', - ], - (object) [ - 'title' => 'Kudlačena, aneb stále jsme to nevzdali', - 'text' => 'Brontosauři kolem péče o Kudlačenu zformovali základní článek Kolovrátek, se kterým se dlouhodobě věnují pravidelnému kosení a hrabání pro zachování pestrosti krajiny a ochranu vzácných druhů.', - 'image' => 'https://brontosaurus.cz/wp-content/uploads/2023/09/kudlacena-14-scaled.jpg', - 'link' => 'https://brontosaurus.cz/pribehy-nadseni/kudlacena/', - ], - ]; - } - - - /** @return array */ - private static function references(): array - { - return [ - (object) [ - 'name' => 'Zdeněk Frélich', - 'role' => 'poradce pro oblast životního prostředí', - 'quotation' => 'Adoptoval jsem Brontosaura, protože chci, aby byl nezávislý.', - 'image' => self::imagePathFor('supportOverview-supporters-frelich'), - ], - (object) [ - 'name' => 'Zuzana „Zula“ Brzobohatá', - 'role' => 'bývalá europoslankyně', - 'quotation' => 'Vracím brontosaurům to, co mi dali: umět se postavit čelem k věcem, organizovat akce pro druhé a vidět svět jinýma očima.', - 'image' => self::imagePathFor('supportOverview-supporters-brzobohata'), - ], - (object) [ - 'name' => 'Martin Perlík', - 'role' => 'stavební inženýr a projektant', - 'quotation' => 'Hodně let jsem organizoval brontosauří akce. Teď už jsem z Brontosaura vyrostl a nastal čas, aby se snažili mladší. Adopce Brontosaura je pro mne příležitost, jak s nimi udržet kontakt.', - 'image' => self::imagePathFor('supportOverview-supporters-perlik'), - ], - (object) [ - 'name' => 'Pepa Hladký', - 'role' => 'cestovatel, vodák a organizátor akcí', - 'quotation' => 'Když jsem se stal organizátorem brontosauřích táborů a víkendovek, uvědomil jsem si, kolik je za tím tvrdé dřiny. Proto jej chci podporovat.', - 'image' => self::imagePathFor('supportOverview-supporters-hladky'), - ], - (object) [ - 'name' => 'Tibor Vansa', - 'role' => 'předseda Pirátů na Praze 4', - 'quotation' => 'Brontíci mi dali šanci zapadnout a zároveň být sám sebou, potkat lidi s podobnými ideály. Chtěl bych, aby tuhle partu mohli zažít i mladší generace.', - 'image' => self::imagePathFor('supportOverview-supporters-vansa'), - ], - (object) [ - 'name' => 'Roman Zemánek', - 'role' => 'ředitel domu dětí a mládeže Strážnice', - 'quotation' => 'Brontosaurus je moje srdeční záležitost, ale i rozum mi říká, že co je dobré a má smysl pro lidi a přírodu, si zaslouží moji podporu.', - 'image' => self::imagePathFor('supportOverview-supporters-zemanek'), - ], - ]; - } - - private static function imagePathFor(string $imageName): string - { - $theme = wp_get_theme(); - return sprintf('%s/frontend/dist/images/%s.jpg', $theme->get_template_directory_uri(), $imageName); - } - -} diff --git a/UI/Utils.php b/UI/Utils.php deleted file mode 100644 index e5f67b0..0000000 --- a/UI/Utils.php +++ /dev/null @@ -1,47 +0,0 @@ -addFilter('formatPhoneNumber', function (string $phoneNumber): string - { - // todo use brick/phone instead? - switch (\mb_strlen($phoneNumber)) { - case 9: // 123456789 - return \sprintf('%s %s %s', \mb_substr($phoneNumber, 0, 3), \mb_substr($phoneNumber, 3, 3), \mb_substr($phoneNumber, 6, 3)); - case 11: // 123 456 789 - return $phoneNumber; - case 13: // +420123456789 - return \sprintf('%s %s %s %s', \mb_substr($phoneNumber, 0, 4), \mb_substr($phoneNumber, 4, 3), \mb_substr($phoneNumber, 7, 3), \mb_substr($phoneNumber, 10, 3)); - case 16: // +420 123 456 789 - return $phoneNumber; - case 14: // 00420123456789 - return \sprintf('+%s %s %s %s', \mb_substr($phoneNumber, 2, 3), \mb_substr($phoneNumber, 5, 3), \mb_substr($phoneNumber, 8, 3), \mb_substr($phoneNumber, 11, 3)); - case 17: // 00420 123 456 789 - case 18: // 00 420 123 456 789 - return \str_replace(['00 ', '00'], '+', $phoneNumber); - } - - return $phoneNumber; // fallback any other format - }); - } - - - /** - * Inspired with https://zlml.cz/vlna-na-webu - * @param string $input - * @return string - */ - public static function handleNonBreakingSpaces(string $input): string - { - return \preg_replace('/(\s)([ksvzaiou])\s/i', "$1$2\xc2\xa0", $input); //   === \xc2\xa0 - } - -} diff --git a/UI/Voluntary/VoluntaryController.latte b/UI/Voluntary/VoluntaryController.latte deleted file mode 100644 index 5bd07ba..0000000 --- a/UI/Voluntary/VoluntaryController.latte +++ /dev/null @@ -1,225 +0,0 @@ -{layout $layoutPath} - -{block content} -
-

- Zážitkové a dobrovolnické akce -

- -

- Seznam akcí -

- -
isAnySelected} data-hb-expandable-expanded="1"{/if}> - - - -
- - {include '../components/eventList.latte', eventCollection => $eventCollection} -
- - - diff --git a/UI/Voluntary/VoluntaryController.php b/UI/Voluntary/VoluntaryController.php deleted file mode 100644 index af3ded2..0000000 --- a/UI/Voluntary/VoluntaryController.php +++ /dev/null @@ -1,93 +0,0 @@ -bisApiClient->getEvents($params); - - } catch (ConnectionToBisFailed) { - $eventCollection = EventCollectionDC::unableToLoad($this->dateFormatHuman, $this->dateFormatRobot); - } - - if ($eventCollection === null) { - // in case of one-day events, we need to do post-filtering because BIS doesn't distinct on domain level - if ($selectedFilter === VoluntaryFilters::FILTER_ONE_DAY_EVENTS) { - $events = $this->postFilter($events, $selectedFilter); - } - - $eventCollection = new EventCollectionDC($events, $this->dateFormatHuman, $this->dateFormatRobot); - } - - $filters = VoluntaryFiltersDC::from(self::FILTER_KEY, $selectedFilter); - - $params = [ - 'filters' => $filters, - 'eventCollection' => $eventCollection, - 'firstTimePageLink' => $this->base->getLinkFor('jedu-poprve'), - ]; - - add_action('wp_enqueue_scripts', function () { - $theme = wp_get_theme(); - $themeVersion = $theme->get('Version'); - wp_enqueue_script('brontosaurus-voluntary-lazy-load', $theme->get_template_directory_uri() . '/frontend/dist/js/lazyLoad.js', [], $themeVersion); - }); - - $this->latte->render( - __DIR__ . '/VoluntaryController.latte', - \array_merge($this->base->getLayoutVariables('voluntary'), $params), - ); - } - - /** - * @param Event[] $events - * @return Event[] - */ - private function postFilter(array $events, string $selectedFilter): array - { - $filteredEvents = []; - - foreach ($events as $event) { - if ($selectedFilter === VoluntaryFilters::FILTER_ONE_DAY_EVENTS && $event->getDuration() === 1) { - $filteredEvents[] = $event; - } - } - - return $filteredEvents; - } - -} diff --git a/UI/components/administrativeUnitsMap.latte b/UI/components/administrativeUnitsMap.latte deleted file mode 100644 index 8719090..0000000 --- a/UI/components/administrativeUnitsMap.latte +++ /dev/null @@ -1,52 +0,0 @@ -
- {if $hasBeenUnableToLoad} -
- Promiňte, zrovna nám vypadl systém, kde máme uloženy všechny informace o našich článcích. - Zkuste to prosím za chvilku znovu. -
- {else} - - -
- {/if} -
diff --git a/UI/components/event.latte b/UI/components/event.latte deleted file mode 100644 index f7e055d..0000000 --- a/UI/components/event.latte +++ /dev/null @@ -1,47 +0,0 @@ -{varType HnutiBrontosaurus\Theme\UI\DataContainers\Events\EventDC $event} -{varType bool $smaller}{* optional *} - -{var $smaller = isset($smaller) && $smaller} - -
- - - -
- {include '../components/eventLabels.latte', labels: $event->labels} -
-
- -
- plně obsazeno -
- -
-

- {$event->title} -

- -
- - {$tag} - -
- -
- - - - {$event->place->name} - -
-
- -

- {var $charsCount = $smaller ? 60 : 200} - {$event->invitation->introduction|stripHtml|truncate:$charsCount|breaklines} -

-
diff --git a/UI/components/eventLabels.latte b/UI/components/eventLabels.latte deleted file mode 100644 index fcf58fc..0000000 --- a/UI/components/eventLabels.latte +++ /dev/null @@ -1,11 +0,0 @@ -{varType HnutiBrontosaurus\Theme\UI\DataContainers\Events\Label[] $labels} - -
-
- {$label->label} -
-
diff --git a/UI/components/eventList.latte b/UI/components/eventList.latte deleted file mode 100644 index 1f903fe..0000000 --- a/UI/components/eventList.latte +++ /dev/null @@ -1,42 +0,0 @@ -{varType HnutiBrontosaurus\Theme\UI\DataContainers\Events\EventCollectionDC $eventCollection} -{varType bool $inFutureView}{* optional; future view has an exception from standard rendering because it does not show "load more" button and thus it renders all events at once *} -{varType bool $smaller}{* optional *} - -{var $smaller = isset($smaller) && $smaller} -
- {if $eventCollection->hasAny} - {var $eventsDisplayedOnLoad = 9} - -
- {include './event.latte', event => $event} - - {ifset $inFutureView}{else} - {breakIf $iterator->counter === $eventsDisplayedOnLoad} - {/ifset} -
- - {ifset $inFutureView}{else}{if $eventCollection->count > $eventsDisplayedOnLoad} -
- - -
- {continueIf $iterator->counter <= $eventsDisplayedOnLoad} - {include './event.latte', event => $event, smaller => $smaller} -
-
- {/if}{/ifset} - - {else} -
- {if $eventCollection->hasBeenUnableToLoad} - Promiňte, zrovna nám vypadl systém, kde máme uloženy všechny informace o plánovaných akcích. - Zkuste to prosím za chvilku znovu. - {else} - Zrovna tu žádné akce nemáme, ale zkus to později… - {/if} -
- - {/if} -
diff --git a/UI/components/references.latte b/UI/components/references.latte deleted file mode 100644 index ee8cf78..0000000 --- a/UI/components/references.latte +++ /dev/null @@ -1,74 +0,0 @@ - diff --git a/UI/components/related.latte b/UI/components/related.latte deleted file mode 100644 index 7c5f486..0000000 --- a/UI/components/related.latte +++ /dev/null @@ -1,156 +0,0 @@ - diff --git a/archive-novinky.php b/archive-novinky.php index 1176ed1..665bc41 100644 --- a/archive-novinky.php +++ b/archive-novinky.php @@ -1,4 +1,4 @@ -getDateFormatForHuman(); -?> -
-
+?>
+

- Co je nového + Co je nového

-
    + - Děkujeme za podporu všem našim partnerům. + Děkujeme za podporu všem našim partnerům. -
    +
getBisClient(); +$hb_dateFormatForHuman = $hb_container->getDateFormatForHuman(); +$hb_dateFormatForRobot = $hb_container->getDateFormatForRobot(); +$hb_applicationUrlTemplate = $hb_container->getConfiguration()->get('bis:applicationUrlTemplate'); + +function hb_formatPhoneNumber(string $phoneNumber): string +{ + // todo use brick/phone instead? + switch (\mb_strlen($phoneNumber)) { + case 9: // 123456789 + return \sprintf('%s %s %s', \mb_substr($phoneNumber, 0, 3), \mb_substr($phoneNumber, 3, 3), \mb_substr($phoneNumber, 6, 3)); + case 11: // 123 456 789 + return $phoneNumber; + case 13: // +420123456789 + return \sprintf('%s %s %s %s', \mb_substr($phoneNumber, 0, 4), \mb_substr($phoneNumber, 4, 3), \mb_substr($phoneNumber, 7, 3), \mb_substr($phoneNumber, 10, 3)); + case 16: // +420 123 456 789 + return $phoneNumber; + case 14: // 00420123456789 + return \sprintf('+%s %s %s %s', \mb_substr($phoneNumber, 2, 3), \mb_substr($phoneNumber, 5, 3), \mb_substr($phoneNumber, 8, 3), \mb_substr($phoneNumber, 11, 3)); + case 17: // 00420 123 456 789 + case 18: // 00 420 123 456 789 + return \str_replace(['00 ', '00'], '+', $phoneNumber); + } + + return $phoneNumber; // fallback any other format +} + +function hb_renderWebsiteUserFriendly(string $website): string { + $hostname = parse_url($website, PHP_URL_HOST); + $hostname = $hostname !== null ? $hostname : $website; // in case of passing "a.b.cz" to parse_url(), it fails to parse it for some reason, so just skip it + + if (Strings::startsWith($hostname, 'www.')) { + $hostname = str_replace('www.', '', $hostname); + } + + return $hostname; +} + +function hb_formatDayCount(int $days): string { + return match($days) { + 1 => sprintf('%d den', $days), + 2,3,4 => sprintf('%d dny', $days), + default => sprintf('%d dní', $days), + }; +} + +function hb_formatHourCount(int $hours): string { + return match($hours) { + 1 => sprintf('%d hodinu', $hours), + 2,3,4 => sprintf('%d hodiny', $hours), + default => sprintf('%d hodin', $hours), + }; +} + +$eventId = (int) get_query_var('eventId'); + +// fix rank math tags +// remove generated meta data on this page, see https://support.rankmath.com/ticket/is-there-anyway-to-disable-or-remove-specific-meta-from-posts/ +// https://rankmath.com/kb/filters-hooks-api-developer/#change-the-title +add_filter('rank_math/frontend/title', static fn($title) => null); +// https://rankmath.com/kb/filters-hooks-api-developer/#remove-opengraph-tags +add_action('rank_math/head', function () { + remove_all_actions('rank_math/opengraph/facebook'); + remove_all_actions('rank_math/opengraph/twitter'); +}); + +try { + $hasBeenUnableToLoad = false; + $event = $hb_bisApiClient->getEvent($eventId); + $eventDC = new EventDC($event, $hb_dateFormatForHuman, $hb_dateFormatForRobot); + + // add event name to title tag (source https://stackoverflow.com/a/62410632/3668474) + add_filter( + 'document_title_parts', + fn(array $title) => array_merge($title, ['title' => $event->getName()]), + ); + +} catch (EventNotFound) { + throw new NotFound(); + +} catch (ConnectionToBisFailed) { + $hasBeenUnableToLoad = true; + $eventDC = null; +} + +$event = $eventDC; + +?> + + + + + + + + + +hasCoverPhoto): ?> + + + + + +hasCoverPhoto): ?> + + + + + +id, $url); // BC + $url = str_replace('{id}', (string) $event->id, $url); + $url = str_replace('{returnUrl}', $event->link, $url); +?> +isRegistrationRequired): ?> + + Chci jet + + +

+ Na tuto akci není třeba se hlásit, stačí přijít. 😉 +

+ + + + +
+
+ +
+ Promiňte, zrovna nám vypadl systém, kde máme uloženy všechny informace o plánovaných akcích. + Zkuste to prosím za chvilku znovu. +
+ +

+ title ?> +

+ + tags): ?> +
+ tags as $tag): ?> + + + + +
+ + +
+
+ hasCoverPhoto): ?> + + + + +
+ + +
+ labels) ?> +
+
+ +
+ + + + + + + + + + + + + + age->isListed): ?> + + + + + + + + hasTimeStart): ?> + + + + + + + + + + + + + + + + + + + + hasRelatedWebsite): ?> + + + + + + +
+ Datum + + +
+ Místo + + place->areCoordinatesListed): ?> + place->name ?> + place->areCoordinatesListed): ?> +
+ Věk + + age->isInterval): ?> + age->from ?>–age->until ?> let + age->isFromListed): ?> + od age->from ?> + age->from === 1): ?>rokulet + age->isUntilListed): ?> + do age->until ?> let + +
+ Začátek akce + + +
+ Cena + + isPaid): ?> + price ?> + + bez poplatku + +
+ Kontaktní osoba + + contact->isPersonListed): ?>contact->person ?>
+ contact->isPhoneListed): ?>contact->phone) ?>
+ contact->email ?> +
+ Web akce: + + + relatedWebsite) ?> + +
+ + isForFirstTimeAttendees): ?> +
+ Akce je vhodná i pro ty, co s námi + jedou poprvé. +
+ +
+
+ +
+
+ isPast): ?> +

+ Tato akce již proběhla.
+ Buď se vrať se zpět, nebo se podívej co se chystá. +

+ + isFull): ?> +

+ Tato akce už má bohužel plno.
+ Buď se vrať se zpět, nebo se podívej co se chystá. +

+ + + + +
+
+ + + invitation->introduction): ?> +
+

+ Co na nás čeká +

+ +

+ invitation->introduction ?> +

+
+ + + + invitation->organizationalInformation): ?> +
+

+ Co, kde a jak +

+ +

+ invitation->organizationalInformation ?> +

+ + invitation->isAccommodationListed || $event->invitation->isFoodListed): ?> +
    + invitation->isAccommodationListed): ?> +
  • Ubytování: invitation->accommodation ?>
  • + + + invitation->isFoodListed): ?> +
  • + Strava: + invitation->food) ?> +
  • + +
+ +
+ + + + invitation->isWorkDescriptionListed): ?> +
+

+ Dobrovolnická pomoc +

+ +

+ invitation->workDescription ?> +

+ + invitation->areWorkDaysListed; + $areHours = $event->invitation->areWorkHoursPerDayListed; + if ($areDays || $areHours): + ?> +
+ Na akci budeme pracovat + + invitation->workDays) ?>, každý den zhruba invitation->workHoursPerDay) ?>. + + přibližně invitation->workHoursPerDay) ?> denně. + +
+ +
+ + + + invitation->hasPresentation): ?> +
+
+

+ Malá ochutnávka +

+ + invitation->presentation->hasText): ?> +

+ invitation->presentation->text ?> +

+ +
+ + invitation->presentation->hasAnyPhotos): ?> +
    + invitation->presentation->photos as $photo): ?> +
  • + + + +
  • + +
+ +
+ + + +
+

+ Organizační tým +

+ +

+ areOrganizersListed): ?>Těší se na tebe organizers ?>.
+ Pořádá organizerUnit ?> +

+
+ + +
+

+ Kontakt +

+ +
+ contact->isPersonListed): ?>Kontaktní osoba: contact->person ?>
+ E-mail: contact->email ?>
+ contact->isPhoneListed): ?>Telefon: contact->phone) ?> + + hasRelatedWebsite): ?> +
+ Webová stránka: odkaz + +
+
+ + isPast && ! $event->isFull): ?> +
+
+ +
+
+ + +
+
+ + + + \ No newline at end of file diff --git a/template-parts/content/content-co-se-chysta.php b/template-parts/content/content-co-se-chysta.php new file mode 100644 index 0000000..bf3429f --- /dev/null +++ b/template-parts/content/content-co-se-chysta.php @@ -0,0 +1,107 @@ +getBisClient(); +$hb_dateFormatHuman = $hb_container->getDateFormatForHuman(); +$hb_dateFormatRobot = $hb_container->getDateFormatForRobot(); + +function hb_convertMonthNumberToName(int $monthNumber): string +{ + $monthNames = [ + 1 => 'leden', + 'únor', + 'březen', + 'duben', + 'květen', + 'červen', + 'červenec', + 'srpen', + 'září', + 'říjen', + 'listopad', + 'prosinec', + ]; + + if ( ! array_key_exists($monthNumber, $monthNames)) { + throw new Exception('Month #' . $monthNumber . ' does not exist.'); + } + + return $monthNames[$monthNumber]; +} + +$params = new EventParameters(); +$params->orderByStartDate(); +$params->setPeriod(Period::FUTURE_ONLY()); + +$hasBeenUnableToLoad = false; + +try { + $events = $hb_bisApiClient->getEvents($params); + + // categorize events by month + $months = []; + $currentMonthWrapperDC = null; + $lastMonth = null; + + foreach ($events as $event) { + $monthNumber = $event->getStartDate()->getMonth(); + if ($lastMonth === null || $lastMonth !== $monthNumber) { + if ($currentMonthWrapperDC !== null) { + $months[] = $currentMonthWrapperDC; + } + + $currentMonthWrapperDC = new MonthWrapperDC($monthNumber); + } + + \assert($currentMonthWrapperDC instanceof MonthWrapperDC); + $currentMonthWrapperDC->addEvent($event, $hb_dateFormatHuman, $hb_dateFormatRobot); + + $lastMonth = $monthNumber; + } + if ($currentMonthWrapperDC !== null) { + $months[] = $currentMonthWrapperDC; + } + +} catch (ConnectionToBisFailed) { + $months = []; + $hasBeenUnableToLoad = true; +} + +?>
+

+ Co se děje u Brontosaurů? +

+ + + +
+ Promiňte, zrovna nám vypadl systém, kde máme uloženy všechny informace o plánovaných akcích. + Zkuste to prosím za chvilku znovu. +
+ +
+ +

+ monthNumber) ?> +

+ +
+ events, inFutureView: true) ?> +
+ +
+ +
diff --git a/template-parts/content/content-dobrovolnicke-akce.php b/template-parts/content/content-dobrovolnicke-akce.php new file mode 100644 index 0000000..b672f4e --- /dev/null +++ b/template-parts/content/content-dobrovolnicke-akce.php @@ -0,0 +1,270 @@ +getBisClient(); +$hb_dateFormatHuman = $hb_container->getDateFormatForHuman(); +$hb_dateFormatRobot = $hb_container->getDateFormatForRobot(); + +/** + * @param Event[] $events + * @return Event[] + */ +function hb_postFilter(array $events, string $selectedFilter): array +{ + $filteredEvents = []; + + foreach ($events as $event) { + if ($selectedFilter === VoluntaryFilters::FILTER_ONE_DAY_EVENTS && $event->getDuration() === 1) { + $filteredEvents[] = $event; + } + } + + return $filteredEvents; +} + +// todo: use some WP way of obtaining param +$selectedFilter = filter_input( INPUT_GET, 'jen' ) ?? null; +$selectedFilter = $selectedFilter !== null && $selectedFilter !== '' ? htmlspecialchars($selectedFilter) : null; + +$params = new EventParameters(); +VoluntaryFilters::apply($selectedFilter, $params); + +$eventCollection = null; +$events = []; +try { + $events = $hb_bisApiClient->getEvents($params); + +} catch (ConnectionToBisFailed) { + $eventCollection = EventCollectionDC::unableToLoad($hb_dateFormatHuman, $hb_dateFormatRobot); +} + +if ($eventCollection === null) { + // in case of one-day events, we need to do post-filtering because BIS doesn't distinct on domain level + if ($selectedFilter === VoluntaryFilters::FILTER_ONE_DAY_EVENTS) { + $events = hb_postFilter($events, $selectedFilter); + } + + $eventCollection = new EventCollectionDC($events, $hb_dateFormatHuman, $hb_dateFormatRobot); +} + +$filters = VoluntaryFiltersDC::from('jen', $selectedFilter); + +?>
+

+ Zážitkové a dobrovolnické akce +

+ +

+ Seznam akcí +

+ +
isAnySelected): ?> data-hb-expandable-expanded="1"> + + + +
+ + +
+ + + diff --git a/UI/English/EnglishController.latte b/template-parts/content/content-english.php similarity index 52% rename from UI/English/EnglishController.latte rename to template-parts/content/content-english.php index 72c3509..5909fc1 100644 --- a/UI/English/EnglishController.latte +++ b/template-parts/content/content-english.php @@ -1,25 +1,28 @@ -{layout $layoutPath} + -{block content}

About Brontosaurus

-

- Hnutí Brontosaurus is a group of mostly young people under 26 years old, who care about the world they - live in. Therefore we combine meaningful volunteering for nature, historical sites - and people with unconventional experiences and fun. We are independent and open to new - ideas. Thousands of volunteers set out each year to mow orchid meadows, plant trees, repair - castles, or build a school in the Himalayas, to name just a few of the activities. +

+ Hnutí Brontosaurus is a group of mostly young people under 26 years old, who care about the world they + live in. Therefore we combine meaningful volunteering for nature, historical sites + and people with unconventional experiences and fun. We are independent and open to new + ideas. Thousands of volunteers set out each year to mow orchid meadows, plant trees, repair + castles, or build a school in the Himalayas, to name just a few of the activities.

-

+

Let's help nature, monuments and people together!

-
-
+
- Promiň, zrovna nám vypadl systém, kde máme uloženy všechny informace o příležitostech. - Zkus to prosím za chvilku znovu. + Promiň, zrovna nám vypadl systém, kde máme uloženy všechny informace o příležitostech. + Zkus to prosím za chvilku znovu.
- +
- Zrovna tu žádné příležitosti nejsou, zkus to později. + Zrovna tu žádné příležitosti nejsou, zkus to později.
- $numberOfOpportunitiesToDisplayOnLoad): ?> + $numberOfOpportunitiesToDisplayOnLoad): ?>
@@ -201,9 +186,9 @@

Zapoj se do Brontosaura

-
- -
+
+ +

Chci organizovat akce

@@ -221,8 +206,8 @@
- -
+ +

Chci spolupracovat

@@ -239,8 +224,8 @@
- -
+ +

Chci se stát členem

@@ -255,8 +240,8 @@
- - -
-

Chceš se zapojit? Ozvi se nám!

+
+

Chceš se zapojit? Ozvi se nám!

- render(__DIR__ . '/../../UI/components/administrativeUnitsMap.latte', $params); ?> +
@@ -308,11 +293,11 @@