Skip to content

Commit

Permalink
refactoring for TYPO3 v12
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyxup committed Mar 16, 2024
1 parent 1bf2df0 commit 681fb77
Show file tree
Hide file tree
Showing 256 changed files with 4,186 additions and 20,340 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ typings/

# next.js build output
.next
.pnpm-store
1 change: 0 additions & 1 deletion Classes/ViewHelpers/.gitkeep

This file was deleted.

2 changes: 1 addition & 1 deletion Classes/ViewHelpers/PipeBreakViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function initializeArguments() {
*/
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) {
$trim = empty($arguments['trim']) || (bool)$arguments['trim'];
$parts = explode('|', $renderChildrenClosure());
$parts = explode('|', (string) $renderChildrenClosure());
return $trim ? array_map('trim', $parts) : $parts;
}
}
17 changes: 3 additions & 14 deletions Configuration/TCA/Overrides/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,10 @@
'label' => 'LLL:EXT:bdp_template/Resources/Private/Language/locallang_tca.xlf:pages.bdp_button_link',
'displayCond' => 'FIELD:is_siteroot:=:1',
'config' => [
'type' => 'input',
'renderType' => 'inputLink',
'type' => 'link',
'size' => 50,
'max' => 1024,
'eval' => 'trim',
'fieldControl' => [
'linkPopup' => [
'options' => [
'title' => 'LLL:EXT:bdp_template/Resources/Private/Language/locallang_tca.xlf:pages.bdp_button_link',
'blindLinkFields' => 'class,target,title',
'blindLinkOptions' => 'mail,folder,file,telephone',
],
],
],
'softref' => 'typolink',
'allowedTypes' => ['page', 'url', 'record'],
'appearance' => ['browserTitle' => 'LLL:EXT:bdp_template/Resources/Private/Language/locallang_tca.xlf:pages.bdp_button_link', 'allowedOptions' => ['params', 'rel']],
],
],
],
Expand Down
12 changes: 6 additions & 6 deletions Configuration/TCA/Overrides/tt_content_bdp_text-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
'renderType' => 'selectSingle',
'items' => [
[
'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imageorient.I.10',
0,
'content-beside-text-img-left'
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imageorient.I.10',
'value' => 0,
'icon' => 'content-beside-text-img-left'
],
[
'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imageorient.I.9',
1,
'content-beside-text-img-right'
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imageorient.I.9',
'value' => 1,
'icon' => 'content-beside-text-img-right'
],
],
'default' => 0,
Expand Down
14 changes: 3 additions & 11 deletions Configuration/TypoScript/constants.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#### DEPENDENCIES ####
######################
@import 'EXT:fluid_styled_content/Configuration/TypoScript/constants.typoscript'
@import 'EXT:typo3_encore/Configuration/TypoScript/constants.typoscript'

@import 'EXT:bdp_template/Configuration/TypoScript/Constants/branding.typoscript'
@import 'EXT:bdp_template/Configuration/TypoScript/Constants/contact.typoscript'
Expand Down Expand Up @@ -37,9 +36,9 @@ page {
templateRootPath = EXT:bdp_template/Resources/Private/Templates/Page/
}
meta {
description =
author =
keywords =
description =
author =
keywords =
viewport = width=device-width, initial-scale=1
robots = index,follow
apple-mobile-web-app-capable = no
Expand All @@ -64,10 +63,3 @@ config {
headerComment = Bund der Pfadfinderinnen und Pfadfinder e. V. - Arbeitskreis Öffentlichkeitsarbeit
sendCacheHeaders = 0
}

plugin.tx_typo3encore {
settings {
entrypointJsonPath = EXT:bdp_template/Resources/Public/Build/entrypoints.json
manifestJsonPath = EXT:bdp_template/Resources/Public/Build/manifest.json
}
}
9 changes: 4 additions & 5 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
######################
@import 'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript'
@import 'EXT:z7_semantilizer/Configuration/TypoScript/setup.typoscript'
@import 'EXT:typo3_encore/Configuration/TypoScript/setup.typoscript'

###################
#### Container ####
Expand Down Expand Up @@ -243,7 +242,7 @@ page {

}
includeCSS {
bdptemplate_layout = typo3_encore:pfadfinden

}
includeJSLibs {

Expand All @@ -255,7 +254,7 @@ page {

}
includeJSFooter {
bdptemplate_layout = typo3_encore:pfadfinden

}
}

Expand All @@ -281,8 +280,8 @@ config {
debug = 0
cache_period = 604800
sendCacheHeaders = {$config.sendCacheHeaders}
intTarget =
extTarget =
intTarget =
extTarget =
disablePrefixComment = 1
index_enable = 1
index_externals = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# PageTS for bdpTemplate
# PageTS for bdp_template
#
@import 'EXT:bdp_template/Configuration/TsConfig/Page/RTE.tsconfig'
@import 'EXT:bdp_template/Configuration/TsConfig/Page/TCEFORM.tsconfig'
Expand Down
4 changes: 4 additions & 0 deletions Configuration/user.tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#
# UserTS for bdp_template
#
@import 'EXT:bdp_template/Configuration/TsConfig/User/Default.tsconfig'
9 changes: 9 additions & 0 deletions Resources/Private/Layouts/Page/Default.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{namespace vac = Praetorius\ViteAssetCollector\ViewHelpers}
<f:spaceless>
<vac:asset.vite
manifest="EXT:bdp_template/Resources/Public/Build/.vite/manifest.json"
entry="Resources/Private/Source/JavaScript/Main.entry.js"
priority="1"
cssTagAttributes="{
media: 'all'
}"
/>
<div class="page">
<f:render partial="Header" arguments="{_all}"/>
<section class="page__navigation">
Expand Down
18 changes: 15 additions & 3 deletions Resources/Private/Layouts/Page/HeaderWithOneColumn.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
{namespace vac = Praetorius\ViteAssetCollector\ViewHelpers}
<f:spaceless>
<vac:asset.vite
manifest="EXT:bdp_template/Resources/Public/Build/.vite/manifest.json"
entry="Resources/Private/Source/JavaScript/Main.entry.js"
priority="1"
cssTagAttributes="{
media: 'all'
}"
/>
<div class="page">
<f:render partial="Header" arguments="{_all}" />
<section class="page__navigation">
<f:render partial="MainNavigation" arguments="{_all}" />
<f:render partial="SideNavigation" arguments="{_all}" />
</section>
<main class="page__content">
<section class="page__content__header">
<f:render section="Header" arguments="{_all}" />
</section>
{f:render(section: 'Header', arguments: _all) -> f:variable(name: 'headerContent')}
<f:if condition="{headerContent}">
<section class="page__content__header">
{headerContent -> f:format.raw()}
</section>
</f:if>
<section class="page__content__main container-bdp{f:if(condition: '{data.layout} == \'1\'', then:' container-bdp--wide')}">
<f:render section="Main" arguments="{_all}"/>
</section>
Expand Down
11 changes: 8 additions & 3 deletions Resources/Private/Partials/Address/Mode_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{namespace encore = Ssch\Typo3Encore\ViewHelpers}
<encore:renderWebpackLinkTags entryName="pfadfinden-address-list" />
<encore:renderWebpackScriptTags entryName="pfadfinden-address-list" />
{namespace vac = Praetorius\ViteAssetCollector\ViewHelpers}
<vac:asset.vite
manifest="EXT:bdp_template/Resources/Public/Build/.vite/manifest.json"
entry="Resources/Private/Source/JavaScript/AddressList.entry.js"
cssTagAttributes="{
media: 'all'
}"
/>
<div class="ce-address__list">
<!--TYPO3SEARCH_end-->
<f:if condition="{settings.hidePagination}">
Expand Down
11 changes: 8 additions & 3 deletions Resources/Private/Partials/Address/Mode_lv.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{namespace encore = Ssch\Typo3Encore\ViewHelpers}
<encore:renderWebpackLinkTags entryName="pfadfinden-address-lv" />
<encore:renderWebpackScriptTags entryName="pfadfinden-address-lv" />
{namespace vac = Praetorius\ViteAssetCollector\ViewHelpers}
<vac:asset.vite
manifest="EXT:bdp_template/Resources/Public/Build/.vite/manifest.json"
entry="Resources/Private/Source/JavaScript/AddressLv.entry.js"
cssTagAttributes="{
media: 'all'
}"
/>
<div class="ce-address__lv">
<div class="ce-address__lv__items">
<f:for each="{addresses}" as="address" iteration="iterator">
Expand Down
10 changes: 8 additions & 2 deletions Resources/Private/Partials/Calendarize/List.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:encore="http://typo3.org/ns/Ssch/Typo3Encore/ViewHelpers">
<encore:renderWebpackLinkTags entryName="pfadfinden-calendarize-list" />
xmlns:vac="http://typo3.org/ns/Praetorius/ViteAssetCollector/ViewHelpers">
<vac:asset.vite
manifest="EXT:bdp_template/Resources/Public/Build/.vite/manifest.json"
entry="Resources/Private/Source/JavaScript/CalendarizeList.entry.js"
cssTagAttributes="{
media: 'all'
}"
/>
<div class="bdp-cal__event-list">
<f:if condition="{searchMode}">
<f:render partial="Event/SearchInformation" arguments="{searchParameter: searchParameter, indices: indices}" />
Expand Down
18 changes: 12 additions & 6 deletions Resources/Private/Partials/Frontend/Header/All.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:semantilizer="http://typo3.org/ns/Zeroseven/Semantilizer/ViewHelpers" data-namespace-typo3-fluid="true">
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:semantilizer="http://typo3.org/ns/Zeroseven/Semantilizer/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{data.header_layout} != 100">
<f:if condition="{data.header} || {data.subheader} || {data.date}">
<f:spaceless>
<header>
<f:variable name="layout" value="{data.header_layout}" />
<f:variable name="position" value="{data.header_position}" />
<f:variable name="layout" value="{data.header_layout}"/>
<f:variable name="position" value="{data.header_position}"/>

<semantilizer:headline class="ce-header{f:if(condition:layout, then:'--{layout}')}{f:if(condition:position, then:' ce-header--{position}')}" edit="tt_content:{data.uid}:header_type" type="{data.header_type}">
<semantilizer:headline
class="ce-header{f:if(condition:layout, then:'--{layout}')}{f:if(condition:position, then:' ce-header--{position}')}"
edit="tt_content:{data.uid}:header_type" type="{data.header_type}">
<f:link.typolink parameter="{data.header_link}">{data.header}</f:link.typolink>
</semantilizer:headline>

<semantilizer:headline class="ce-subheader{f:if(condition:layout, then:'--{layout}')}{f:if(condition:position, then:' ce-subheader--{position}')}" content="{data.subheader}"/>
<semantilizer:headline
class="ce-subheader{f:if(condition:layout, then:'--{layout}')}{f:if(condition:position, then:' ce-subheader--{position}')}"
content="{data.subheader}"/>

<f:comment><!-- Call the "original" partial --></f:comment>
<f:render partial="Header/Date" arguments="{date: data.date, positionClass: 'ce-date{f:if(condition: position, then: \'-{position}\')}'}" />
<f:render partial="Header/Date"
arguments="{date: data.date, positionClass: 'ce-date{f:if(condition: position, then: \'-{position}\')}'}"/>
</header>
</f:spaceless>
</f:if>
Expand Down
8 changes: 4 additions & 4 deletions Resources/Private/Partials/Page/Footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{namespace encore = Ssch\Typo3Encore\ViewHelpers}
{namespace vac = Praetorius\ViteAssetCollector\ViewHelpers}
<footer class="page__footer">
<div class="page__footer__title">
{settings.branding.organisation}
Expand Down Expand Up @@ -45,19 +45,19 @@
<ul class="page__footer__content__section__nav__list">
<li class="page__footer__content__section__nav__list__item">
<span class="page__footer__content__section__nav__list__item__icon" aria-hidden="true">
<f:image src="{encore:asset(pathToFile: 'EXT:bdp_template/Resources/Public/Build/images/Icons/impressum_1.png')}" loading="lazy"/>
<f:image src="{vac:resource.vite(manifest: 'EXT:bdp_template/Resources/Public/Build/.vite/manifest.json', file: 'Resources/Private/Source/Images/Icons/impressum_1.png')}" loading="lazy"/>
</span>
<f:link.page pageUid="{settings.legalNotice}" class="page__footer__content__section__nav__list__item__link">{f:translate(key: 'footer.navigation.legalNotice', extensionName: 'bdp_template', default: 'Impressum')}</f:link.page>
</li>
<li class="page__footer__content__section__nav__list__item">
<span class="page__footer__content__section__nav__list__item__icon" aria-hidden="true">
<f:image src="{encore:asset(pathToFile: 'EXT:bdp_template/Resources/Public/Build/images/Icons/impressum_1.png')}" loading="lazy" />
<f:image src="{vac:resource.vite(manifest: 'EXT:bdp_template/Resources/Public/Build/.vite/manifest.json', file: 'Resources/Private/Source/Images/Icons/impressum_1.png')}" loading="lazy" />
</span>
<f:link.page pageUid="{settings.privacy}" class="page__footer__content__section__nav__list__item__link">{f:translate(key: 'footer.navigation.privacy', extensionName: 'bdp_template', default: 'Datenschutzerklärung')}</f:link.page>
</li>
<li class="page__footer__content__section__nav__list__item">
<span class="page__footer__content__section__nav__list__item__icon" aria-hidden="true">
<f:image src="{encore:asset(pathToFile: 'EXT:bdp_template/Resources/Public/Build/images/Icons/login_1.png')}" loading="lazy"/>
<f:image src="{vac:resource.vite(manifest: 'EXT:bdp_template/Resources/Public/Build/.vite/manifest.json', file: 'Resources/Private/Source/Images/Icons/login_1.png')}" loading="lazy"/>
</span>
<a href="/typo3" class="page__footer__content__section__nav__list__item__link" rel="nofollow">{f:translate(key: 'footer.navigation.login', extensionName: 'bdp_template', default: 'Login')}</a>
</li>
Expand Down
26 changes: 19 additions & 7 deletions Resources/Private/Partials/Page/FooterSocial.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
{namespace encore = Ssch\Typo3Encore\ViewHelpers}
{namespace vac = Praetorius\ViteAssetCollector\ViewHelpers}
<div class="page__footer__content__section__social">
<f:if condition="{settings.social.instagram.enable}">
<div class="page__footer__content__section__social__item">
<f:link.external uri="{settings.social.instagram.value}" target="_blank" rel="noopener" title="Instagram" class="page__footer__content__section__social__item__link">
<f:image src="{encore:asset(pathToFile: 'EXT:bdp_template/Resources/Public/Build/images/Icons/sc/ig.svg')}" width="50" height="50" class="page__footer__content__section__social__item__icon" alt="Instagram Icon" loading="lazy"/>
<f:link.external uri="{settings.social.instagram.value}" target="_blank" rel="noopener" title="Instagram"
class="page__footer__content__section__social__item__link">
<f:image
src="{vac:resource.vite(manifest: 'EXT:bdp_template/Resources/Public/Build/.vite/manifest.json', file: 'Resources/Private/Source/Images/Icons/sc/ig.svg')}"
width="50" height="50" class="page__footer__content__section__social__item__icon"
alt="Instagram Icon" loading="lazy"/>
</f:link.external>
</div>
</f:if>
<f:if condition="{settings.social.facebook.enable}">
<div class="page__footer__content__section__social__item">
<f:link.external uri="{settings.social.facebook.value}" target="_blank" rel="noopener" title="Facebook" class="page__footer__content__section__social__item__link">
<f:image src="{encore:asset(pathToFile: 'EXT:bdp_template/Resources/Public/Build/images/Icons/sc/fb.svg')}" width="50" height="50" class="page__footer__content__section__social__item__icon" alt="Facebook Icon" loading="lazy"/>
<f:link.external uri="{settings.social.facebook.value}" target="_blank" rel="noopener" title="Facebook"
class="page__footer__content__section__social__item__link">
<f:image
src="{vac:resource.vite(manifest: 'EXT:bdp_template/Resources/Public/Build/.vite/manifest.json', file: 'Resources/Private/Source/Images/Icons/sc/fb.svg')}"
width="50" height="50" class="page__footer__content__section__social__item__icon"
alt="Facebook Icon" loading="lazy"/>
</f:link.external>
</div>
</f:if>
<f:if condition="{settings.social.youtube.enable}">
<div class="page__footer__content__section__social__item">
<f:link.external uri="{settings.social.youtube.value}" target="_blank" rel="noopener" title="Youtube" class="page__footer__content__section__social__item__link">
<f:image src="{encore:asset(pathToFile: 'EXT:bdp_template/Resources/Public/Build/images/Icons/sc/yt.svg')}" width="70" height="50" class="page__footer__content__section__social__item__icon" alt="Youtube Icon" loading="lazy"/>
<f:link.external uri="{settings.social.youtube.value}" target="_blank" rel="noopener" title="Youtube"
class="page__footer__content__section__social__item__link">
<f:image
src="{vac:resource.vite(manifest: 'EXT:bdp_template/Resources/Public/Build/.vite/manifest.json', file: 'Resources/Private/Source/Images/Icons/sc/yt.svg')}"
width="70" height="50" class="page__footer__content__section__social__item__icon" alt="Youtube Icon"
loading="lazy"/>
</f:link.external>
</div>
</f:if>
Expand Down
Loading

0 comments on commit 681fb77

Please sign in to comment.