WIP Migrate event subsite styles
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2021 Björn Fromme <[email protected]>, dreipunktnull
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ThemeClassesViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('key', 'string', 'The theme key', false, 'ep');
|
||||
$this->registerArgument('classes', 'array', 'The classes to apply per theme key', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$themeKey = $arguments['key'];
|
||||
|
||||
if (!array_key_exists($themeKey, $arguments['classes'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $arguments['classes'][$themeKey];
|
||||
}
|
||||
}
|
||||
+2
@@ -5,4 +5,6 @@ lib.contentElement {
|
||||
templateRootPaths.20 = EXT:ep_theme/Resources/Private/Templates/FluidStyledContent
|
||||
partialRootPaths.20 = EXT:ep_theme/Resources/Private/Partials
|
||||
settings < plugin.tx_eptheme.settings
|
||||
settings.themekey = {$plugin.tx_eptheme.settings.themekey}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<html data-namespace-typo3-fluid="true" lang="en"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
|
||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers">
|
||||
|
||||
<div class="bg-winter my-2">
|
||||
<div class="bg-ep-primary-80 sbw:bg-sbw-primary-80 snz:bg-snz-primary-80 uch:bg-uch-primary-80">
|
||||
<div class="{ep:themeClasses(classes: '{ep: \'bg-ep-primary-80\', sbw: \'bg-sbw-primary-80\', snz: \'bg-snz-primary-80\', uch: \'bg-uch-primary-80\'}', key: settings.themekey)}">
|
||||
<f:if condition="{settings.themeKey} == 'ep'">
|
||||
<f:render partial="Disrupter/Outlines"
|
||||
section="Top1"
|
||||
@@ -25,7 +26,7 @@
|
||||
</f:if>
|
||||
<a href="tel:{settings.phoneNumber -> v:format.pregReplace(pattern: '/[\-\s]/', replacement: '')}"
|
||||
rel="nofollow"
|
||||
class="absolute bottom-0 left-1/2 transform -translate-x-1/2 -mb-8 rounded-full py-4 px-6 bg-ep-secondary sbw:bg-sbw-secondary uch:bg-uch-secondary flex items-center space-x-2">
|
||||
class="absolute bottom-0 left-1/2 transform -translate-x-1/2 -mb-8 rounded-full py-4 px-6 flex items-center space-x-2 {ep:themeClasses(classes: '{ep: \'bg-ep-secondary\', sbw: \'bg-sbw-secondary\', snz: \'bg-snz-secondary\', uch: \'bg-uch-secondary\'}', key: settings.themekey)}">
|
||||
<svg class="w-10 h-10 text-white">
|
||||
<use href="#icon-phone"></use>
|
||||
</svg>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<html data-namespace-typo3-fluid="true" lang="en"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
|
||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers">
|
||||
|
||||
<div class="bg-winter my-2">
|
||||
<div class="bg-ep-primary-80 sbw:bg-sbw-primary-80 snz:bg-snz-primary-80 uch:bg-uch-primary-80">
|
||||
<div class="{ep:themeClasses(classes: '{ep: \'bg-ep-primary-80\', sbw: \'bg-sbw-primary-80\', snz: \'bg-snz-primary-80\', uch: \'bg-uch-primary-80\'}', key: settings.themekey)}">
|
||||
<f:render partial="Disrupter/Outlines"
|
||||
section="Top1"
|
||||
arguments="{classes: 'hidden md:block transform -translate-y-2 {f:if(condition: \'{background} == 1 || {background} == 3\', then: \'text-ep-primary-bg\', else: \'text-white\')}'}"/>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<html data-namespace-typo3-fluid="true" lang="en"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
|
||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers">
|
||||
|
||||
<div class="bg-winter my-2">
|
||||
<div class="bg-ep-primary-80 sbw:bg-sbw-primary-80 snz:bg-snz-primary-80 uch:bg-uch-primary-80">
|
||||
<div class="{ep:themeClasses(classes: '{ep: \'bg-ep-primary-80\', sbw: \'bg-sbw-primary-80\', snz: \'bg-snz-primary-80\', uch: \'bg-uch-primary-80\'}', key: settings.themekey)}">
|
||||
<f:if condition="{settings.themeKey} == 'ep'">
|
||||
<f:render partial="Disrupter/Outlines"
|
||||
section="Top1"
|
||||
@@ -25,7 +26,7 @@
|
||||
</f:if>
|
||||
<a href="tel:{settings.phoneNumber -> v:format.pregReplace(pattern: '/[\-\s]/', replacement: '')}"
|
||||
rel="nofollow"
|
||||
class="absolute bottom-0 left-1/2 transform -translate-x-1/2 -mb-8 rounded-full py-4 px-6 bg-ep-secondary sbw:bg-sbw-secondary uch:bg-uch-secondary flex items-center space-x-2">
|
||||
class="absolute bottom-0 left-1/2 transform -translate-x-1/2 -mb-8 rounded-full py-4 px-6 flex items-center space-x-2 {ep:themeClasses(classes: '{ep: \'bg-ep-secondary\', sbw: \'bg-sbw-secondary\', snz: \'bg-snz-secondary\', uch: \'bg-uch-secondary\'}', key: settings.themekey)}">
|
||||
<svg class="w-10 h-10 text-white">
|
||||
<use href="#icon-phone"></use>
|
||||
</svg>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<html data-namespace-typo3-fluid="true" lang="en"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
|
||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers">
|
||||
|
||||
<div class="bg-winter my-2">
|
||||
<div class="bg-ep-primary-80 sbw:bg-sbw-primary-80 snz:bg-snz-primary-80 uch:bg-uch-primary-80">
|
||||
<div class="{ep:themeClasses(classes: '{ep: \'bg-ep-primary-80\', sbw: \'bg-sbw-primary-80\', snz: \'bg-snz-primary-80\', uch: \'bg-uch-primary-80\'}', key: settings.themekey)}">
|
||||
<f:render partial="Disrupter/Outlines"
|
||||
section="Top1"
|
||||
arguments="{classes: 'hidden md:block transform -translate-y-2 {f:if(condition: \'{data.tx_eptheme_background} == 1 || {data.tx_eptheme_background} == 3\', then: \'text-ep-primary-bg\', else: \'text-white\')}'}"/>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<html data-namespace-typo3-fluid="true" lang="en"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
|
||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers">
|
||||
|
||||
<div class="container lg:max-w-screen-2xl my-8">
|
||||
<div class="bg-pattern">
|
||||
<div class="pt-8 lg:py-8 sbw:bg-sbw-primary-80 snz:bg-snz-primary-80 uch:bg-uch-primary-80">
|
||||
<div class="pt-8 lg:py-8 {ep:themeClasses(classes: '{sbw: \'bg-sbw-primary-80\', snz: \'bg-snz-primary-80\', uch: \'bg-uch-primary-80\'}', key: settings.themekey)}">
|
||||
<div class="flex flex-col space-y-4 lg:space-y-0 lg:flex-row items-center">
|
||||
<div class="w-full lg:w-1/3 font-black uppercase text-white text-4xl lg:text-3xl text-center">
|
||||
{headline -> f:format.raw()}
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
<a href="{f:uri.typolink(parameter: settings.defaultHomeUid)}"
|
||||
class="block lg:pb-4"
|
||||
title="{settings.defaultTitle}">
|
||||
<img class="block h-10 lg:h-12 w-auto" src="{f:uri.image(src: settings.logoImage)}" alt="{settings.defaultTitle}">
|
||||
<img class="block w-auto {ep:themeClasses(classes: '{ep: \'h-10 lg:h-12\', sbw: \'h-14 lg:h-24\', snz: \'h-14 lg:h-24\', uch: \'h-12 lg:h-20\'}', key: settings.themekey)}"
|
||||
src="{f:uri.image(src: settings.logoImage)}"
|
||||
alt="{settings.defaultTitle}">
|
||||
</a>
|
||||
<div class="hidden lg:block">
|
||||
<f:render section="FirstLevel" arguments="{_all}"/>
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@
|
||||
<table class="min-w-full border border-gray-200 border-collapse mb-8">
|
||||
<f:for each="{categories}" as="category" key="categoryKey">
|
||||
<f:if condition="{v:variable.get(name: 'pricetable.{categoryKey}', useRawKeys: 1) -> f:count()} > 0">
|
||||
<tr class="sbw:bg-sbw-primary snz:bg-snz-primary uch:bg-uch-primary text-white">
|
||||
<tr class="text-white {ep:themeClasses(classes: '{sbw: \'bg-sbw-primary\', snz: \'bg-snz-primary\', uch: \'bg-uch-primary\'}', key: settings.themekey)}">
|
||||
<td class="px-2 py-1 font-bold border border-gray-200">
|
||||
Apartments {category}
|
||||
</td>
|
||||
@@ -54,7 +54,7 @@
|
||||
<td class="px-2 py-1 border border-gray-200">
|
||||
<f:if condition="{row.rooms.{type}.available}">
|
||||
<f:then>
|
||||
<a class="sbw:text-sbw-primary snz:text-snz-primary uch:text-uch-primary"
|
||||
<a class="{ep:themeClasses(classes: '{sbw: \'text-sbw-primary\', snz: \'text-snz-primary\', uch: \'text-uch-primary\'}', key: settings.themekey)}"
|
||||
href="{row.bookingUrl}"
|
||||
title="Jetzt buchen"
|
||||
target="_blank">
|
||||
|
||||
+5
-5
@@ -22,35 +22,35 @@
|
||||
<div class="flex items-center space-x-6">
|
||||
<f:if condition="{item.data.facebook_url}">
|
||||
<a href="{item.data.facebook_url}" target="_blank" title="{item.data.name} bei Facebook">
|
||||
<svg class="sbw:text-sbw-primary w-8 h-8">
|
||||
<svg class="w-8 h-8 {ep:themeClasses(classes: '{sbw: \'text-sbw-primary\', snz: \'text-snz-primary\', uch: \'text-uch-primary\'}', key: settings.themekey)}">
|
||||
<use href="#icon-facebook"></use>
|
||||
</svg>
|
||||
</a>
|
||||
</f:if>
|
||||
<f:if condition="{item.data.twitter_url}">
|
||||
<a href="{item.data.twitter_url}" target="_blank" title="{item.data.name} bei Twitter">
|
||||
<svg class="sbw:text-sbw-primary w-8 h-8">
|
||||
<svg class="w-8 h-8 {ep:themeClasses(classes: '{sbw: \'text-sbw-primary\', snz: \'text-snz-primary\', uch: \'text-uch-primary\'}', key: settings.themekey)}">
|
||||
<use href="#icon-twitter"></use>
|
||||
</svg>
|
||||
</a>
|
||||
</f:if>
|
||||
<f:if condition="{item.data.instagram_url}">
|
||||
<a href="{item.data.instagram_url}" target="_blank" title="{item.data.name} bei Instagram">
|
||||
<svg class="sbw:text-sbw-primary w-8 h-8">
|
||||
<svg class="w-8 h-8 {ep:themeClasses(classes: '{sbw: \'text-sbw-primary\', snz: \'text-snz-primary\', uch: \'text-uch-primary\'}', key: settings.themekey)}">
|
||||
<use href="#icon-instagram"></use>
|
||||
</svg>
|
||||
</a>
|
||||
</f:if>
|
||||
<f:if condition="{item.data.youtube_url}">
|
||||
<a href="{item.data.youtube_url}" target="_blank" title="{item.data.name} bei YouTube">
|
||||
<svg class="sbw:text-sbw-primary w-8 h-8">
|
||||
<svg class="w-8 h-8 {ep:themeClasses(classes: '{sbw: \'text-sbw-primary\', snz: \'text-snz-primary\', uch: \'text-uch-primary\'}', key: settings.themekey)}">
|
||||
<use href="#icon-youtube"></use>
|
||||
</svg>
|
||||
</a>
|
||||
</f:if>
|
||||
<f:if condition="{item.data.soundcloud_url}">
|
||||
<a href="{item.data.soundcloud_url}" target="_blank" title="{item.data.name} bei Soundcloud">
|
||||
<svg class="sbw:text-sbw-primary w-8 h-8">
|
||||
<svg class="w-8 h-8 {ep:themeClasses(classes: '{sbw: \'text-sbw-primary\', snz: \'text-snz-primary\', uch: \'text-uch-primary\'}', key: settings.themekey)}">
|
||||
<use href="#icon-soundcloud"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user