Compare commits
22
Commits
f005272242
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49547ecda3 | ||
|
|
eb096bd8b5 | ||
|
|
b3541b21fb | ||
|
|
93ed5c6962 | ||
|
|
942724fdd1 | ||
|
|
e52f7dcff8 | ||
|
|
30e531497d | ||
|
|
2cb37e760a | ||
|
|
3ff3251419 | ||
|
|
abcd39107b | ||
|
|
599e3c7ee2 | ||
|
|
6ff308015a | ||
|
|
6e0479bf22 | ||
|
|
fb8fddf669 | ||
|
|
f745c7b683 | ||
|
|
9b3550ec40 | ||
|
|
d9943619f6 | ||
|
|
e33b57c9f1 | ||
|
|
dc594efee1 | ||
|
|
432d8da350 | ||
|
|
5b338eeab6 | ||
|
|
05ceae5100 |
+2
-1
@@ -26,8 +26,9 @@ timezone: Europe/Berlin
|
|||||||
composer_version: "2"
|
composer_version: "2"
|
||||||
web_environment:
|
web_environment:
|
||||||
- TYPO3_CONTEXT=Development
|
- TYPO3_CONTEXT=Development
|
||||||
nodejs_version: "18"
|
nodejs_version: "24"
|
||||||
corepack_enable: false
|
corepack_enable: false
|
||||||
|
omit_containers: [ddev-ssh-agent]
|
||||||
|
|
||||||
# Key features of DDEV's config.yaml:
|
# Key features of DDEV's config.yaml:
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
# http://download.redis.io/redis-stable/redis.conf
|
# http://download.redis.io/redis-stable/redis.conf
|
||||||
# http://download.redis.io/redis-stable/sentinel.conf
|
# http://download.redis.io/redis-stable/sentinel.conf
|
||||||
|
|
||||||
maxmemory 2048mb
|
maxmemory 128mb
|
||||||
maxmemory-policy allkeys-lfu
|
maxmemory-policy allkeys-lru
|
||||||
|
|
||||||
# to disable Redis persistence, remove ddev-generated from this file,
|
# to disable Redis persistence, remove ddev-generated from this file,
|
||||||
# and uncomment the two lines below:
|
# and uncomment the two lines below:
|
||||||
|
|||||||
-3284
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
|
"ext-redis": "*",
|
||||||
"ext-simplexml": "*",
|
"ext-simplexml": "*",
|
||||||
"b13/container": "^1.3",
|
"b13/container": "^1.3",
|
||||||
"blueways/bw-captcha": "^3.1",
|
"blueways/bw-captcha": "^3.1",
|
||||||
|
|||||||
Generated
+11
-9
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "e3a433b77a2142f116e57b54c4172ffa",
|
"content-hash": "38fb94ebf504e8413d37c94f929e4b47",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "b13/container",
|
"name": "b13/container",
|
||||||
@@ -1817,21 +1817,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/oauth2-client",
|
"name": "league/oauth2-client",
|
||||||
"version": "2.9.0",
|
"version": "2.9.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/oauth2-client.git",
|
"url": "https://github.com/thephpleague/oauth2-client.git",
|
||||||
"reference": "26e8c5da4f3d78cede7021e09b1330a0fc093d5e"
|
"reference": "8cedfef9d01a8d1fd2ecfabb41734b17592c4b71"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/26e8c5da4f3d78cede7021e09b1330a0fc093d5e",
|
"url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/8cedfef9d01a8d1fd2ecfabb41734b17592c4b71",
|
||||||
"reference": "26e8c5da4f3d78cede7021e09b1330a0fc093d5e",
|
"reference": "8cedfef9d01a8d1fd2ecfabb41734b17592c4b71",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
|
"guzzlehttp/guzzle": "^6.5.8 || ^7.8.2 || ^8.0",
|
||||||
|
"guzzlehttp/psr7": "^1.9.1 || ^2.6.3 || ^3.0",
|
||||||
"php": "^7.1 || >=8.0.0 <8.6.0"
|
"php": "^7.1 || >=8.0.0 <8.6.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
@@ -1876,9 +1877,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/thephpleague/oauth2-client/issues",
|
"issues": "https://github.com/thephpleague/oauth2-client/issues",
|
||||||
"source": "https://github.com/thephpleague/oauth2-client/tree/2.9.0"
|
"source": "https://github.com/thephpleague/oauth2-client/tree/2.9.1"
|
||||||
},
|
},
|
||||||
"time": "2025-11-25T22:17:17+00:00"
|
"time": "2026-09-16T13:14:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/period",
|
"name": "league/period",
|
||||||
@@ -9647,11 +9648,12 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
|
"ext-redis": "*",
|
||||||
"ext-simplexml": "*"
|
"ext-simplexml": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": {},
|
"platform-dev": {},
|
||||||
"platform-overrides": {
|
"platform-overrides": {
|
||||||
"php": "7.4.13"
|
"php": "7.4.33"
|
||||||
},
|
},
|
||||||
"plugin-api-version": "2.9.0"
|
"plugin-api-version": "2.9.0"
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-12
@@ -63,41 +63,39 @@ host('prod')
|
|||||||
->setForwardAgent(true)
|
->setForwardAgent(true)
|
||||||
->setSshMultiplexing(true)
|
->setSshMultiplexing(true)
|
||||||
->setDeployPath('/usr/home/eptypo3/public_html/{{application}}')
|
->setDeployPath('/usr/home/eptypo3/public_html/{{application}}')
|
||||||
->set('buspronet_path', '/usr/home/eptypo3/public_html/kuschick/buspronet/buspronet')
|
|
||||||
->set('bin/php', '/usr/bin/php74')
|
->set('bin/php', '/usr/bin/php74')
|
||||||
->set('http_user', 'eptypo3')
|
->set('http_user', 'eptypo3')
|
||||||
->set('writable_mode', 'chmod')
|
->set('writable_mode', 'chmod')
|
||||||
->set('bin/composer', '/usr/bin/composer')
|
|
||||||
->set('composer_options', '--prefer-dist --no-progress --no-interaction --optimize-autoloader')
|
|
||||||
->set('rsync_src', __DIR__)
|
->set('rsync_src', __DIR__)
|
||||||
->set('rsync', $rsyncOptions)
|
->set('rsync', $rsyncOptions)
|
||||||
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{current_path}}/public/ --web-url=https://www.ep-reisen.de')
|
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{current_path}}/{{typo3_webroot}}/ --web-url=https://www.ep-reisen.de')
|
||||||
;
|
;
|
||||||
|
|
||||||
task('deploy', [
|
task('deploy', [
|
||||||
'deploy:info',
|
'deploy:info',
|
||||||
|
// Build locally first, so a failing build aborts before the server is touched at all.
|
||||||
|
'deploy:assets:build',
|
||||||
'deploy:setup',
|
'deploy:setup',
|
||||||
'deploy:lock',
|
'deploy:lock',
|
||||||
'deploy:release',
|
'deploy:release',
|
||||||
'deploy:assets:build',
|
|
||||||
'rsync',
|
'rsync',
|
||||||
'deploy:shared',
|
'deploy:shared',
|
||||||
'deploy:writable',
|
'deploy:writable',
|
||||||
|
// The schema has to exist before the new code starts serving traffic.
|
||||||
'typo3:database:migrate',
|
'typo3:database:migrate',
|
||||||
'typo3:language:update',
|
'typo3:language:update',
|
||||||
|
// deploy:publish == deploy:symlink, deploy:unlock, deploy:cleanup, deploy:success
|
||||||
'deploy:publish',
|
'deploy:publish',
|
||||||
'cachetool:clear:opcache',
|
|
||||||
'typo3:cache:flush',
|
|
||||||
'deploy:buspronet:symlink',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
task('deploy:buspronet:symlink', function () {
|
// Caches belong to the release that goes live, so they are cleared after the symlink flip. Hooking
|
||||||
run('ln -s {{buspronet_path}} {{release_or_current_path}}/public/buchung');
|
// into deploy:symlink rather than appending to the list above keeps them inside deploy:publish, ahead
|
||||||
});
|
// of deploy:unlock and deploy:success - a failing cache task must not follow a declared success.
|
||||||
|
after('deploy:symlink', 'cachetool:clear:opcache');
|
||||||
|
after('deploy:symlink', 'typo3:cache:flush');
|
||||||
|
|
||||||
task ('deploy:assets:build', function () {
|
task ('deploy:assets:build', function () {
|
||||||
runLocally('ddev exec npm ci');
|
runLocally('ddev exec npm ci');
|
||||||
runLocally('ddev exec npm rebuild node-sass');
|
|
||||||
runLocally('ddev exec npm run build');
|
runLocally('ddev exec npm run build');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Generated
+1415
-1608
File diff suppressed because it is too large
Load Diff
+9
-23
@@ -1,62 +1,48 @@
|
|||||||
{
|
{
|
||||||
"name": "eptheme",
|
"name": "eptheme",
|
||||||
"description": "EP Reisen TYPO3 website package",
|
|
||||||
"version": "3.0.0",
|
|
||||||
"author": "Björn Fromme, [email protected]",
|
|
||||||
"license": "proprietary",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "./node_modules/.bin/encore dev --watch",
|
"dev": "./node_modules/.bin/encore dev --watch",
|
||||||
"build": "NODE_ENV=production ./node_modules/.bin/encore production"
|
"build": "NODE_ENV=production ./node_modules/.bin/encore production"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=20.19.0"
|
||||||
},
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"defaults"
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hotwired/stimulus": "^3.2.1",
|
"@hotwired/stimulus": "^3.2.1",
|
||||||
"@hotwired/stimulus-webpack-helpers": "^1.0.1",
|
"@hotwired/stimulus-webpack-helpers": "^1.0.1",
|
||||||
"@iframe-resizer/parent": "^5.3.2",
|
"@iframe-resizer/parent": "^5.3.2",
|
||||||
"@splidejs/splide": "^2.4.21",
|
"@splidejs/splide": "^2.4.21",
|
||||||
"axios": "^1.6.2",
|
|
||||||
"cooltipz-css": "^1.6.8",
|
"cooltipz-css": "^1.6.8",
|
||||||
"dayjs": "^1.10.6",
|
"dayjs": "^1.10.6",
|
||||||
"es6-slide-up-down": "^1.0.0",
|
|
||||||
"flatpickr": "^4.6.9",
|
"flatpickr": "^4.6.9",
|
||||||
"glightbox": "^3.0.9",
|
"glightbox": "^3.0.9",
|
||||||
"htmx.org": "^1.9.12",
|
"htmx.org": "^1.9.12",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"lazysizes": "^5.3.2",
|
|
||||||
"leaflet": "^1.7.1",
|
"leaflet": "^1.7.1",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"picturefill": "^3.0.3",
|
|
||||||
"slick-carousel": "^1.8.1",
|
"slick-carousel": "^1.8.1",
|
||||||
"sticky-js": "^1.3.0",
|
"sticky-js": "^1.3.0",
|
||||||
"stimulus-use": "^0.52.0",
|
"stimulus-use": "^0.52.0",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
"vue-router": "^3.5.2",
|
"vue-session": "^1.0.0"
|
||||||
"vue-session": "^1.0.0",
|
|
||||||
"vuex": "^3.6.2",
|
|
||||||
"whatwg-fetch": "^3.6.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
|
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
||||||
"@babel/preset-env": "^7.16.0",
|
"@babel/preset-env": "^7.16.0",
|
||||||
"@symfony/webpack-encore": "^2.1.0",
|
"@symfony/webpack-encore": "^4.7.0",
|
||||||
"@tailwindcss/aspect-ratio": "^0.4.0",
|
"@tailwindcss/aspect-ratio": "^0.4.0",
|
||||||
"@tailwindcss/forms": "^0.5.2",
|
"@tailwindcss/forms": "^0.5.2",
|
||||||
"autoprefixer": "^10.4.8",
|
"autoprefixer": "^10.4.8",
|
||||||
"core-js": "^3.22.5",
|
|
||||||
"document-register-element": "^1.14.10",
|
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"postcss": "^8.4.16",
|
"postcss": "^8.4.16",
|
||||||
"postcss-loader": "^6.2.1",
|
"postcss-loader": "^8.2.1",
|
||||||
"sass": "^1.53.0",
|
"sass": "^1.53.0",
|
||||||
"sass-loader": "^12.6.0",
|
"sass-loader": "^14.2.1",
|
||||||
"sass-mq": "^6.0.0",
|
"sass-mq": "^7.0.1",
|
||||||
"smoothscroll-polyfill": "^0.4.4",
|
|
||||||
"tailwindcss": "^3.1.8",
|
"tailwindcss": "^3.1.8",
|
||||||
"tailwindcss-alt": "^3.0.0",
|
"tailwindcss-alt": "^3.0.0",
|
||||||
"vue-custom-element": "^3.3.0",
|
|
||||||
"vue-loader": "^15.11.1",
|
"vue-loader": "^15.11.1",
|
||||||
"vue-template-compiler": "^2.6.14"
|
"vue-template-compiler": "^2.6.14"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,24 +47,49 @@ if (getenv('IS_DDEV_PROJECT') == 'true') {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages'] = [
|
// Fail fast instead of blocking indefinitely when redis is unreachable.
|
||||||
|
$redisOptions['connectionTimeout'] = 2;
|
||||||
|
|
||||||
|
// Note: the cache identifiers must stay unprefixed ('pages', not 'cache_pages'). These
|
||||||
|
// assignments replace the definitions from LocalConfiguration.php wholesale, so 'groups'
|
||||||
|
// and the compression/lifetime options have to be repeated here.
|
||||||
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages'] = [
|
||||||
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
||||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
||||||
'options' => $redisOptions + ['database' => 0],
|
'options' => $redisOptions + [
|
||||||
|
'database' => 0,
|
||||||
|
'compression' => true,
|
||||||
|
],
|
||||||
|
'groups' => ['pages'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash'] = [
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['hash'] = [
|
||||||
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
||||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
||||||
'options' => $redisOptions + ['database' => 1],
|
'options' => $redisOptions + [
|
||||||
|
'database' => 1,
|
||||||
|
],
|
||||||
|
'groups' => ['pages'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_rootline'] = [
|
// Own database: RedisBackend::flush() issues FLUSHDB and the keys carry no per-cache
|
||||||
|
// prefix, so two caches sharing a database flush each other.
|
||||||
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['rootline'] = [
|
||||||
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
||||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
||||||
'options' => $redisOptions + ['database' => 1],
|
'options' => $redisOptions + [
|
||||||
|
'database' => 2,
|
||||||
|
'compression' => true,
|
||||||
|
'defaultLifetime' => 2592000,
|
||||||
|
],
|
||||||
|
'groups' => ['pages'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Assets are served through the bunny.net CDN, which gzip/brotli-compresses at the edge.
|
||||||
|
// Pre-gzipped .gzip twins are served with Content-Encoding: gzip and cannot be processed
|
||||||
|
// by the CDN, so stop generating them. mod_deflate still compresses direct origin hits.
|
||||||
|
$GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 0;
|
||||||
|
|
||||||
// suppress php deprecation warnings flooding typo3 logs
|
// suppress php deprecation warnings flooding typo3 logs
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] =
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] =
|
||||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] & ~E_DEPRECATED & ~E_USER_DEPRECATED;
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] & ~E_DEPRECATED & ~E_USER_DEPRECATED;
|
||||||
|
|||||||
@@ -4,9 +4,6 @@ import Vue from 'vue'
|
|||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import VueSession from 'vue-session'
|
import VueSession from 'vue-session'
|
||||||
|
|
||||||
import 'lazysizes';
|
|
||||||
import 'lazysizes/plugins/attrchange/ls.attrchange';
|
|
||||||
|
|
||||||
const slick = require('slick-carousel');
|
const slick = require('slick-carousel');
|
||||||
const Sticky = require('sticky-js');
|
const Sticky = require('sticky-js');
|
||||||
const $window = $(window);
|
const $window = $(window);
|
||||||
|
|||||||
+17
-10
@@ -38,9 +38,9 @@
|
|||||||
<div class="card card--no-form offerlist-item__card">
|
<div class="card card--no-form offerlist-item__card">
|
||||||
<div class="card__inner">
|
<div class="card__inner">
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(max-width: 512px)" :data-srcset="offer.teaserImageMobile + ' 500w'"/>
|
<source media="(max-width: 512px)" :srcset="offer.teaserImageMobile"/>
|
||||||
<img class="card__image scale lazyload" data-sizes="auto"
|
<img class="card__image scale"
|
||||||
:data-src="offer.teaserImage" alt="">
|
:src="offer.teaserImage" alt="" loading="lazy">
|
||||||
</picture>
|
</picture>
|
||||||
<div class="card__caption">
|
<div class="card__caption">
|
||||||
<span class="card__subtitle" v-html="offer.name"></span>
|
<span class="card__subtitle" v-html="offer.name"></span>
|
||||||
@@ -55,7 +55,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from 'axios';
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -82,13 +81,21 @@
|
|||||||
load() {
|
load() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
sessionStorage.setItem('filterSettings', JSON.stringify(this.filterSettings));
|
sessionStorage.setItem('filterSettings', JSON.stringify(this.filterSettings));
|
||||||
axios({
|
fetch(this.endpointUri, {
|
||||||
url: this.endpointUri,
|
method: 'POST',
|
||||||
method: 'post',
|
credentials: 'same-origin',
|
||||||
data: $.param({'tx_epevents_ajax[filterSettings]': this.filterSettings})
|
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
|
||||||
|
body: $.param({'tx_epevents_ajax[filterSettings]': this.filterSettings})
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.offers = response.data.offers;
|
// fetch only rejects on network errors, so surface HTTP errors here
|
||||||
this.filterOptions = response.data.filterOptions;
|
// to keep the previous behaviour of falling through to .catch()
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(response.statusText);
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
}).then(data => {
|
||||||
|
this.offers = data.offers;
|
||||||
|
this.filterOptions = data.filterOptions;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
@@ -27,15 +30,15 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
line-height: 130%;
|
line-height: 130%;
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge__outline {
|
.badge__outline {
|
||||||
@include sectionFills(0.15);
|
@include mixins.sectionFills(0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge__inner {
|
.badge__inner {
|
||||||
@include sectionFills();
|
@include mixins.sectionFills();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@use "mixins";
|
||||||
|
|
||||||
.banner {
|
.banner {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
@@ -8,7 +10,7 @@
|
|||||||
min-height: 300px;
|
min-height: 300px;
|
||||||
padding: 48px 0;
|
padding: 48px 0;
|
||||||
color: white;
|
color: white;
|
||||||
@include sectionBackgrounds(0.8);
|
@include mixins.sectionBackgrounds(0.8);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
@use "fonts";
|
||||||
|
@use "mixins";
|
||||||
|
@use "variables";
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-family: $font-main, Sans-Serif;
|
font-family: fonts.$font-main, Sans-Serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,13 +47,13 @@ html {
|
|||||||
height: auto;
|
height: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.navtoggle__icon {
|
.navtoggle__icon {
|
||||||
fill: $color-font-main;
|
fill: colors.$color-font-main;
|
||||||
transition: all 0.25s ease-in-out;
|
transition: all 0.25s ease-in-out;
|
||||||
|
|
||||||
.mobilenav--open & {
|
.mobilenav--open & {
|
||||||
@@ -62,7 +68,7 @@ html {
|
|||||||
right: 2%;
|
right: 2%;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,12 +82,12 @@ a {
|
|||||||
&.anchor {
|
&.anchor {
|
||||||
display: block;
|
display: block;
|
||||||
height: 0;
|
height: 0;
|
||||||
padding-top: $header-height-mobile;
|
padding-top: variables.$header-height-mobile;
|
||||||
margin-top: -$header-height-mobile;
|
margin-top: -(variables.$header-height-mobile);
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
padding-top: $header-height-desktop;
|
padding-top: variables.$header-height-desktop;
|
||||||
margin-top: -$header-height-desktop;
|
margin-top: -(variables.$header-height-desktop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,7 +132,7 @@ ul {
|
|||||||
left: 0;
|
left: 0;
|
||||||
content: "\25CF";
|
content: "\25CF";
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
@include sectionColoursFromParent();
|
@include mixins.sectionColoursFromParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,8 +150,8 @@ p {
|
|||||||
hr {
|
hr {
|
||||||
max-width: 25%;
|
max-width: 25%;
|
||||||
margin: 32px auto 32px 0;
|
margin: 32px auto 32px 0;
|
||||||
color: $color-ruler;
|
color: colors.$color-ruler;
|
||||||
background-color: $color-ruler;
|
background-color: colors.$color-ruler;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@@ -161,7 +167,7 @@ h3,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.headline {
|
.headline {
|
||||||
@include sectionColoursFromParent();
|
@include mixins.sectionColoursFromParent();
|
||||||
|
|
||||||
&--icon {
|
&--icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -186,7 +192,7 @@ h1,
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
padding-bottom: 18px;
|
padding-bottom: 18px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
padding-bottom: 24px;
|
padding-bottom: 24px;
|
||||||
}
|
}
|
||||||
@@ -200,11 +206,11 @@ h1,
|
|||||||
display: block;
|
display: block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 120%;
|
line-height: 120%;
|
||||||
color: $color-brand-primary;
|
color: colors.$color-brand-primary;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
@include sectionColoursFromParent();
|
@include mixins.sectionColoursFromParent();
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +227,7 @@ h2,
|
|||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
padding-bottom: 24px;
|
padding-bottom: 24px;
|
||||||
}
|
}
|
||||||
@@ -231,7 +237,7 @@ h3 {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
@@ -243,7 +249,7 @@ h3 {
|
|||||||
height: auto;
|
height: auto;
|
||||||
padding-right: 16px;
|
padding-right: 16px;
|
||||||
|
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
width: 96px;
|
width: 96px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@@ -13,7 +16,7 @@
|
|||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background-color: $color-brand-secondary;
|
background-color: colors.$color-brand-secondary;
|
||||||
border: none;
|
border: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
@@ -23,18 +26,18 @@
|
|||||||
|
|
||||||
.box__content {
|
.box__content {
|
||||||
padding: 32px 16px;
|
padding: 32px 16px;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box__form {
|
.box__form {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
fill: $color-brand-primary;
|
fill: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--top {
|
&--top {
|
||||||
@@ -52,7 +55,7 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
|
|
||||||
@@ -66,7 +69,7 @@
|
|||||||
.box__nav {
|
.box__nav {
|
||||||
margin-top: -32px;
|
margin-top: -32px;
|
||||||
padding-bottom: 32px;
|
padding-bottom: 32px;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box__nav__item {
|
.box__nav__item {
|
||||||
@@ -78,7 +81,7 @@
|
|||||||
|
|
||||||
&--active,
|
&--active,
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: $color-brand-light;
|
background-color: colors.$color-brand-light;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
|
||||||
.brands {
|
.brands {
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
border-top: 1px solid $color-divider;
|
border-top: 1px solid colors.$color-divider;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -9,7 +12,7 @@
|
|||||||
.brands__item {
|
.brands__item {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
$mq-breakpoints: (
|
@use "variables";
|
||||||
mobile: $viewport-width-mobile,
|
|
||||||
tablet: $viewport-width-tablet,
|
|
||||||
desktop: $viewport-width-desktop
|
|
||||||
);
|
|
||||||
|
|
||||||
@import "~sass-mq";
|
@forward "sass-mq" with (
|
||||||
|
$breakpoints: (
|
||||||
|
mobile: variables.$viewport-width-mobile,
|
||||||
|
tablet: variables.$viewport-width-tablet,
|
||||||
|
desktop: variables.$viewport-width-desktop
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
@@ -5,7 +9,7 @@
|
|||||||
|
|
||||||
&--default {
|
&--default {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 4px 16px;
|
padding: 4px 16px;
|
||||||
}
|
}
|
||||||
@@ -13,7 +17,7 @@
|
|||||||
&--page-header {
|
&--page-header {
|
||||||
display: block;
|
display: block;
|
||||||
min-width: 186px;
|
min-width: 186px;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
padding: 0 32px 0 24px;
|
padding: 0 32px 0 24px;
|
||||||
@@ -26,14 +30,14 @@
|
|||||||
display: block;
|
display: block;
|
||||||
min-width: 220px;
|
min-width: 220px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
@include sectionBackgroundsFromParent();
|
@include mixins.sectionBackgroundsFromParent();
|
||||||
color: white;
|
color: white;
|
||||||
line-height: 48px;
|
line-height: 48px;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
box-shadow: 8px 8px 8px rgba(black, 0.2);
|
box-shadow: 8px 8px 8px rgba(black, 0.2);
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
@@ -43,7 +47,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,7 +60,7 @@
|
|||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: white;
|
background: white;
|
||||||
color: $color-font-main;
|
color: colors.$color-font-main;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--icon {
|
&--icon {
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
color: white;
|
color: white;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
&:not(.card--no-form) {
|
&:not(.card--no-form) {
|
||||||
padding-bottom: 48px;
|
padding-bottom: 48px;
|
||||||
}
|
}
|
||||||
@@ -20,12 +23,12 @@
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
color: white;
|
color: white;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
@include sectionBackgrounds(0.75);
|
@include mixins.sectionBackgrounds(0.75);
|
||||||
transition: background-color 0.25s ease-in-out;
|
transition: background-color 0.25s ease-in-out;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
.card:hover & {
|
.card:hover & {
|
||||||
@include sectionBackgrounds();
|
@include mixins.sectionBackgrounds();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,7 +36,7 @@
|
|||||||
.card__form {
|
.card__form {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
display: block;
|
display: block;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.25s ease-in-out;
|
transition: opacity 0.25s ease-in-out;
|
||||||
@@ -50,7 +53,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
polygon {
|
polygon {
|
||||||
@include sectionFills();
|
@include mixins.sectionFills();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
|
@use "colors";
|
||||||
|
@use "mixins";
|
||||||
|
@use "variables";
|
||||||
|
|
||||||
.carousel {
|
.carousel {
|
||||||
|
|
||||||
&--background {
|
&--background {
|
||||||
background-color: $color-background;
|
background-color: colors.$color-background;
|
||||||
padding-bottom: 48px;
|
padding-bottom: 48px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include sectionBackgrounds(0.25);
|
@include mixins.sectionBackgrounds(0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel__outer {
|
.carousel__outer {
|
||||||
@include container($viewport-width-max);
|
@include mixins.container(variables.$viewport-width-max);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel__inner {
|
.carousel__inner {
|
||||||
@include container($content-width-max);
|
@include mixins.container(variables.$content-width-max);
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel__item {
|
.carousel__item {
|
||||||
@@ -36,7 +40,7 @@
|
|||||||
height: 32px;
|
height: 32px;
|
||||||
|
|
||||||
fill: white;
|
fill: white;
|
||||||
@include sectionColoursFromParent;
|
@include mixins.sectionColoursFromParent;
|
||||||
|
|
||||||
&--prev {
|
&--prev {
|
||||||
left: -5px;
|
left: -5px;
|
||||||
@@ -59,7 +63,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.testimonials & {
|
.testimonials & {
|
||||||
fill: $color-brand-primary;
|
fill: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
@use "sass:color";
|
||||||
|
|
||||||
//$color-brand-primary: #0084d4;
|
//$color-brand-primary: #0084d4;
|
||||||
$color-brand-primary: #19a0d2;
|
$color-brand-primary: #19a0d2;
|
||||||
$color-brand-secondary: #1e314b;
|
$color-brand-secondary: #1e314b;
|
||||||
$color-brand-light: #8CCFE8;
|
$color-brand-light: #8CCFE8;
|
||||||
$color-background: lighten(#dbdee2, 5%);
|
$color-background: color.adjust(#dbdee2, $lightness: 5%);
|
||||||
|
|
||||||
$color-font-main: #1e314b;
|
$color-font-main: #1e314b;
|
||||||
$color-divider: rgba($color-background, 0.8);
|
$color-divider: rgba($color-background, 0.8);
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
|
||||||
.configurator {
|
.configurator {
|
||||||
background: url(../images/bg_configurator.jpg) no-repeat top left;
|
background: url(../images/bg_configurator.jpg) no-repeat top left;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
@@ -39,7 +42,7 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: rgba($color-brand-secondary, 0.85);
|
background-color: rgba(colors.$color-brand-secondary, 0.85);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +54,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -83,11 +86,11 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,12 +101,12 @@
|
|||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@@ -113,11 +116,11 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding-right: 40px;
|
padding-right: 40px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,11 +134,11 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -151,13 +154,13 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
font-family: "fontello";
|
font-family: "fontello";
|
||||||
|
|
||||||
&.closed {
|
&.closed {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: $color-brand-primary;
|
color: colors.$color-brand-primary;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: '\e800';
|
content: '\e800';
|
||||||
@@ -204,7 +207,7 @@
|
|||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
|
||||||
.active & {
|
.active & {
|
||||||
@@ -212,7 +215,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
|
|
||||||
.active & {
|
.active & {
|
||||||
@@ -240,10 +243,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.selected &:after {
|
.selected &:after {
|
||||||
background-color: rgba($color-brand-secondary, 0.75);
|
background-color: rgba(colors.$color-brand-secondary, 0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
&:hover:after {
|
&:hover:after {
|
||||||
content: "";
|
content: "";
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -251,7 +254,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: rgba($color-brand-primary, 0.5);
|
background-color: rgba(colors.$color-brand-primary, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,12 +263,12 @@
|
|||||||
background-position: center 32px;
|
background-position: center 32px;
|
||||||
background-size: 96px;
|
background-size: 96px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
background-position: center 16px;
|
background-position: center 16px;
|
||||||
background-size: 128px;
|
background-size: 128px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
background-position: center 8px;
|
background-position: center 8px;
|
||||||
background-size: 96px;
|
background-size: 96px;
|
||||||
}
|
}
|
||||||
@@ -382,7 +385,7 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -391,7 +394,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 66.6666%;
|
width: 66.6666%;
|
||||||
padding-right: 32px;
|
padding-right: 32px;
|
||||||
}
|
}
|
||||||
@@ -401,7 +404,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 33.3333%;
|
width: 33.3333%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,7 +459,7 @@
|
|||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: $color-brand-primary;
|
color: colors.$color-brand-primary;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
font-family: 'fontello';
|
font-family: 'fontello';
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// .headline* live in _base.scss; @extend needs that module loaded explicitly.
|
||||||
|
@use "base";
|
||||||
|
|
||||||
.cookiefirst {
|
.cookiefirst {
|
||||||
h2 {
|
h2 {
|
||||||
@extend .headline;
|
@extend .headline;
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.form {
|
.form {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
&:not(&--horizontal) {
|
&:not(&--horizontal) {
|
||||||
max-width: 75%;
|
max-width: 75%;
|
||||||
}
|
}
|
||||||
@@ -16,7 +20,7 @@
|
|||||||
|
|
||||||
&--horizontal {
|
&--horizontal {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -42,7 +46,7 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background-color: $color-brand-light;
|
background-color: colors.$color-brand-light;
|
||||||
color: white;
|
color: white;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
@@ -50,7 +54,7 @@
|
|||||||
&--mobile {
|
&--mobile {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,7 +62,7 @@
|
|||||||
&--tablet {
|
&--tablet {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: tablet, $until: desktop) {
|
@include breakpoints.mq($from: tablet, $until: desktop) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,7 +70,7 @@
|
|||||||
&--desktop {
|
&--desktop {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,7 +83,7 @@
|
|||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 33.3333%;
|
width: 33.3333%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,20 +92,20 @@
|
|||||||
.form__item__error {
|
.form__item__error {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
color: $color-formerror;
|
color: colors.$color-formerror;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form__field {
|
.form__field {
|
||||||
@include nooutline;
|
@include mixins.nooutline;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: $color-brand-light;
|
background-color: colors.$color-brand-light;
|
||||||
|
|
||||||
.form--box & {
|
.form--box & {
|
||||||
background-color: $color-brand-light;
|
background-color: colors.$color-brand-light;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,10 +118,10 @@
|
|||||||
display: block;
|
display: block;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,7 +131,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.has-errors & {
|
.has-errors & {
|
||||||
border: 1px solid $color-formerror;
|
border: 1px solid colors.$color-formerror;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +162,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: $color-brand-secondary;
|
background-color: colors.$color-brand-secondary;
|
||||||
border: none;
|
border: none;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -166,7 +170,7 @@
|
|||||||
padding: 8px 32px;
|
padding: 8px 32px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -189,10 +193,10 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: rgba($color-divider, 0.75);
|
background-color: rgba(colors.$color-divider, 0.75);
|
||||||
|
|
||||||
.form--box & {
|
.form--box & {
|
||||||
background-color: rgba($color-brand-primary, 0.75);
|
background-color: rgba(colors.$color-brand-primary, 0.75);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
|
||||||
.helpernav {
|
.helpernav {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -24,7 +27,7 @@
|
|||||||
z-index: 10;
|
z-index: 10;
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
padding: 16px 32px;
|
padding: 16px 32px;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.helpernav__item {
|
.helpernav__item {
|
||||||
@@ -32,7 +35,7 @@
|
|||||||
&:hover:not(.helpernav__item--disabled) {
|
&:hover:not(.helpernav__item--disabled) {
|
||||||
|
|
||||||
& > .helpernav__link {
|
& > .helpernav__link {
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .helpernav__subnav {
|
& > .helpernav__subnav {
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
@use "mixins";
|
||||||
|
@use "variables";
|
||||||
|
|
||||||
.herounit {
|
.herounit {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: $viewport-width-max;
|
max-width: variables.$viewport-width-max;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
&--indent {
|
&--indent {
|
||||||
max-width: $content-width-max - 16px;
|
max-width: variables.$content-width-max - 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,22 +21,22 @@
|
|||||||
|
|
||||||
height: 240px;
|
height: 240px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
height: 384px;
|
height: 384px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
height: 420px;
|
height: 420px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.herounit--large & {
|
.herounit--large & {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
height: 480px;
|
height: 480px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
height: 700px;
|
height: 700px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,7 +44,7 @@
|
|||||||
.herounit--indent & {
|
.herounit--indent & {
|
||||||
height: 320px;
|
height: 320px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
height: 480px;
|
height: 480px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,7 +53,7 @@
|
|||||||
.herounit__mask {
|
.herounit__mask {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -67,9 +72,9 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
background-color: rgba($color-brand-secondary, 0.2);
|
background-color: rgba(colors.$color-brand-secondary, 0.2);
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
padding: 64px 16px 0 96px;
|
padding: 64px 16px 0 96px;
|
||||||
max-width: 45%;
|
max-width: 45%;
|
||||||
@@ -83,7 +88,7 @@
|
|||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
line-height: 95%;
|
line-height: 95%;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
font-size: 48px;
|
font-size: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,10 +106,10 @@
|
|||||||
span {
|
span {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: $color-brand-primary;
|
color: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
font-size: 56px;
|
font-size: 56px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,7 +125,7 @@
|
|||||||
color: white;
|
color: white;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,12 +133,12 @@
|
|||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
padding-bottom: 48px;
|
padding-bottom: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
padding-bottom: 96px;
|
padding-bottom: 96px;
|
||||||
}
|
}
|
||||||
@@ -146,7 +151,7 @@
|
|||||||
line-height: 120%;
|
line-height: 120%;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,7 +159,7 @@
|
|||||||
.herounit__icon {
|
.herounit__icon {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
@@ -173,11 +178,11 @@
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
top: 85%;
|
top: 85%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
@@ -190,34 +195,34 @@
|
|||||||
height: 48px;
|
height: 48px;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > polygon {
|
& > polygon {
|
||||||
fill: $color-brand-primary;
|
fill: colors.$color-brand-primary;
|
||||||
@include sectionFills();
|
@include mixins.sectionFills();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#gradient__from {
|
#gradient__from {
|
||||||
stop-color: $color-brand-secondary;
|
stop-color: colors.$color-brand-secondary;
|
||||||
}
|
}
|
||||||
|
|
||||||
#gradient__to {
|
#gradient__to {
|
||||||
.section-default & {
|
.section-default & {
|
||||||
stop-color: $color-brand-primary;
|
stop-color: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
.section-incentives & {
|
.section-incentives & {
|
||||||
stop-color: $color-incentives;
|
stop-color: colors.$color-incentives;
|
||||||
}
|
}
|
||||||
.section-teambuilding & {
|
.section-teambuilding & {
|
||||||
stop-color: $color-teambuilding;
|
stop-color: colors.$color-teambuilding;
|
||||||
}
|
}
|
||||||
.secolor-meeting & {
|
.secolor-meeting & {
|
||||||
stop-color: $color-meetings;
|
stop-color: colors.$color-meetings;
|
||||||
}
|
}
|
||||||
.secolor-events & {
|
.secolor-events & {
|
||||||
stop-color: $color-events;
|
stop-color: colors.$color-events;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
|
||||||
.iconbar {
|
.iconbar {
|
||||||
@apply hidden lg:block fixed z-100 top-[30vh] right-0 overflow-hidden;
|
@apply hidden lg:block fixed z-100 top-[30vh] right-0 overflow-hidden;
|
||||||
}
|
}
|
||||||
.iconbar {
|
.iconbar {
|
||||||
display: none;
|
display: none;
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -20,7 +23,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: $color-brand-light;
|
background-color: colors.$color-brand-light;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -30,7 +33,7 @@
|
|||||||
|
|
||||||
.iconbar__icon {
|
.iconbar__icon {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.iconnav {
|
.iconnav {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -21,7 +24,7 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,5 +39,5 @@
|
|||||||
.iconnav__label {
|
.iconnav__label {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
@include sectionColours();
|
@include mixins.sectionColours();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding-top: 96px;
|
padding-top: 96px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
padding-top: 140px;
|
padding-top: 140px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +13,7 @@ main {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
padding-bottom: 32px;
|
padding-bottom: 32px;
|
||||||
@include clearfix();
|
@include mixins.clearfix();
|
||||||
|
|
||||||
&.nopad {
|
&.nopad {
|
||||||
&--bottom {
|
&--bottom {
|
||||||
@@ -23,18 +26,18 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content__title {
|
.content__title {
|
||||||
@include container();
|
@include mixins.container();
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content__inner {
|
.content__inner {
|
||||||
@include container();
|
@include mixins.container();
|
||||||
|
|
||||||
.content--has-sidebar & {
|
.content--has-sidebar & {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,40 +48,40 @@ main {
|
|||||||
padding: 0 0 32px;
|
padding: 0 0 32px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content__plain {
|
.content__plain {
|
||||||
@include clearfix();
|
@include mixins.clearfix();
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
padding-right: 96px;
|
padding-right: 96px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content__background {
|
.content__background {
|
||||||
@include clearfix();
|
@include mixins.clearfix();
|
||||||
@include sectionBackgrounds(0.15);
|
@include mixins.sectionBackgrounds(0.15);
|
||||||
padding: 24px 48px 24px 32px;
|
padding: 24px 48px 24px 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content__float {
|
.content__float {
|
||||||
@include clearfix();
|
@include mixins.clearfix();
|
||||||
}
|
}
|
||||||
|
|
||||||
.content__sidebar {
|
.content__sidebar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 32px 0;
|
padding: 32px 0;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
flex: 0 0 320px;
|
flex: 0 0 320px;
|
||||||
padding: 0 0 0 32px;
|
padding: 0 0 0 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content__form {
|
.content__form {
|
||||||
@include sectionFills(0.15);
|
@include mixins.sectionFills(0.15);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
display: block;
|
display: block;
|
||||||
@@ -93,7 +96,7 @@ main {
|
|||||||
|
|
||||||
.desktop-only {
|
.desktop-only {
|
||||||
display: none;
|
display: none;
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
@use "sass:math";
|
@use "sass:math";
|
||||||
|
@use "variables" as *;
|
||||||
|
@use "colors" as *;
|
||||||
|
|
||||||
@mixin clearfix {
|
@mixin clearfix {
|
||||||
&::after {
|
&::after {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
|
||||||
.mobilenav {
|
.mobilenav {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
@@ -7,10 +10,10 @@
|
|||||||
height: 0;
|
height: 0;
|
||||||
padding-top: 96px;
|
padding-top: 96px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: rgba($color-brand-secondary, 0.9);
|
background: rgba(colors.$color-brand-secondary, 0.9);
|
||||||
transition: height 0.25s ease-in-out;
|
transition: height 0.25s ease-in-out;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
|
||||||
.news-entry {
|
.news-entry {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
@@ -13,7 +15,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +24,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,7 +41,7 @@
|
|||||||
.news-entry__teaser {
|
.news-entry__teaser {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
padding-left: 24px;
|
padding-left: 24px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
|
||||||
.offerlist {
|
.offerlist {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -13,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.offerlist__teasers {
|
.offerlist__teasers {
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
@@ -24,13 +26,13 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
display: block;
|
display: block;
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 33.3333%;
|
width: 33.3333%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,30 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
@use "mixins";
|
||||||
|
@use "variables";
|
||||||
|
|
||||||
.page-footer {
|
.page-footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: linear-gradient(to right, $color-brand-secondary, $color-brand-primary);
|
background: linear-gradient(to right, colors.$color-brand-secondary, colors.$color-brand-primary);
|
||||||
color: white;
|
color: white;
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
|
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
padding-top: 48px;
|
padding-top: 48px;
|
||||||
padding-bottom: 48px;
|
padding-bottom: 48px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-footer__inner {
|
.page-footer__inner {
|
||||||
@include container($content-width-max);
|
@include mixins.container(variables.$content-width-max);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-bottom: 1px solid white;
|
border-bottom: 1px solid white;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
padding-bottom: 48px;
|
padding-bottom: 48px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,14 +38,14 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--hide-mobile {
|
&--hide-mobile {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,14 +65,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.page-footer__bottom {
|
.page-footer__bottom {
|
||||||
@include container($content-width-max);
|
@include mixins.container(variables.$content-width-max);
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
@@ -76,7 +81,7 @@
|
|||||||
.page-footer__bottom__column {
|
.page-footer__bottom__column {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 33.3333%;
|
width: 33.3333%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,7 +91,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +111,7 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,7 +120,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
@@ -138,7 +143,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -5,28 +9,28 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
background: white;
|
background: white;
|
||||||
box-shadow: 0 2px 2px rgba($color-background, 0.5);
|
box-shadow: 0 2px 2px rgba(colors.$color-background, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header__bar {
|
.page-header__bar {
|
||||||
background: linear-gradient(to right, $color-brand-primary 50%, $color-brand-secondary);
|
background: linear-gradient(to right, colors.$color-brand-primary 50%, colors.$color-brand-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header__bar__main {
|
.page-header__bar__main {
|
||||||
@include container();
|
@include mixins.container();
|
||||||
color: white;
|
color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header__bar__search {
|
.page-header__bar__search {
|
||||||
display: none;
|
display: none;
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
@@ -37,7 +41,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
@@ -53,14 +57,14 @@
|
|||||||
.page-header__bar__divider {
|
.page-header__bar__divider {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 12px 8px;
|
padding: 12px 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header__main {
|
.page-header__main {
|
||||||
@include container();
|
@include mixins.container();
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
display: -ms-flexbox;
|
display: -ms-flexbox;
|
||||||
@@ -68,11 +72,11 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
-ms-flex-align: center;
|
-ms-flex-align: center;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
padding: 32px 16px 24px;
|
padding: 32px 16px 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
-ms-flex-align: end;
|
-ms-flex-align: end;
|
||||||
@@ -98,7 +102,7 @@
|
|||||||
.page-header__sitenav {
|
.page-header__sitenav {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +110,7 @@
|
|||||||
.page-header__button {
|
.page-header__button {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
min-width: 220px;
|
min-width: 220px;
|
||||||
@@ -128,6 +132,6 @@
|
|||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
& > polygon {
|
& > polygon {
|
||||||
fill: $color-brand-primary;
|
fill: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@use "colors";
|
||||||
|
|
||||||
.paginator {
|
.paginator {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -10,7 +12,7 @@
|
|||||||
|
|
||||||
.paginator__item {
|
.paginator__item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -19,8 +21,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--current {
|
&--current {
|
||||||
border: 1px solid $color-brand-primary;
|
border: 1px solid colors.$color-brand-primary;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
color: $color-brand-primary;
|
color: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,27 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.searchresult {}
|
.searchresult {}
|
||||||
|
|
||||||
.searchresult__info {
|
.searchresult__info {
|
||||||
@include container();
|
@include mixins.container();
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchresult-item {
|
.searchresult-item {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
display: block;
|
display: block;
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchresult-item__card {
|
.searchresult-item__card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
width: 240px;
|
width: 240px;
|
||||||
}
|
}
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 33.3333%;
|
width: 33.3333%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,8 +30,8 @@
|
|||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
color: white;
|
color: white;
|
||||||
@include sectionBackgrounds();
|
@include mixins.sectionBackgrounds();
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.sitenav {
|
.sitenav {
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
padding-right: 64px;
|
padding-right: 64px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,7 +28,7 @@
|
|||||||
&--active,
|
&--active,
|
||||||
&:hover {
|
&:hover {
|
||||||
border-bottom: 3px solid;
|
border-bottom: 3px solid;
|
||||||
@include sectionColours();
|
@include mixins.sectionColours();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
|
||||||
.slider {}
|
.slider {}
|
||||||
|
|
||||||
.slider__arrow {
|
.slider__arrow {
|
||||||
@@ -38,7 +40,7 @@
|
|||||||
top: 30%;
|
top: 30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.statement {
|
.statement {
|
||||||
@include container();
|
@include mixins.container();
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
padding-bottom: 48px;
|
padding-bottom: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.statement__inner {
|
.statement__inner {
|
||||||
@include sectionBackgrounds();
|
@include mixins.sectionBackgrounds();
|
||||||
box-shadow: 0 5px 10px rgba(black, 0.2);
|
box-shadow: 0 5px 10px rgba(black, 0.2);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 48px;
|
padding-top: 48px;
|
||||||
@@ -18,7 +21,7 @@
|
|||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
line-height: 105%;
|
line-height: 105%;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 48px;
|
font-size: 48px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
|
||||||
.team {
|
.team {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -12,11 +15,11 @@
|
|||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
padding: 0 16px 64px;
|
padding: 0 16px 64px;
|
||||||
|
|
||||||
@include mq($until: desktop) {
|
@include breakpoints.mq($until: desktop) {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
@@ -57,10 +60,10 @@
|
|||||||
|
|
||||||
.team__position {
|
.team__position {
|
||||||
display: block;
|
display: block;
|
||||||
color: $color-brand-primary;
|
color: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
.team__contact__link {
|
.team__contact__link {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: $color-brand-primary;
|
color: colors.$color-brand-primary;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.teasers {
|
.teasers {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@include sectionBackgrounds(0.15);
|
@include mixins.sectionBackgrounds(0.15);
|
||||||
margin: 0 -16px 0;
|
margin: 0 -16px 0;
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,15 +22,15 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($until: tablet) {
|
@include breakpoints.mq($until: tablet) {
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 33.3333%;
|
width: 33.3333%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,12 +43,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.teaser__caption {
|
.teaser__caption {
|
||||||
@include sectionBackgroundsFromParent();
|
@include mixins.sectionBackgroundsFromParent();
|
||||||
padding: 16px 16px 0;
|
padding: 16px 16px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.teaser__form {
|
.teaser__form {
|
||||||
@include sectionFills();
|
@include mixins.sectionFills();
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
|
||||||
.testimonial {
|
.testimonial {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 32px;
|
padding: 0 32px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
border-right: 1px solid $color-divider;
|
border-right: 1px solid colors.$color-divider;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: desktop) {
|
@include breakpoints.mq($from: desktop) {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
@use "breakpoints";
|
||||||
|
@use "colors";
|
||||||
|
@use "mixins";
|
||||||
|
|
||||||
.tiles {
|
.tiles {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
@@ -15,7 +19,7 @@
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
@@ -26,12 +30,12 @@
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
|
||||||
@include mq($from: mobile) {
|
@include breakpoints.mq($from: mobile) {
|
||||||
min-height: 250px;
|
min-height: 250px;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
padding: 32px 32px 0;
|
padding: 32px 32px 0;
|
||||||
min-height: 375px;
|
min-height: 375px;
|
||||||
}
|
}
|
||||||
@@ -42,33 +46,33 @@
|
|||||||
color: white;
|
color: white;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tile__caption__inner {
|
.tile__caption__inner {
|
||||||
@include sectionBackgrounds(0.75);
|
@include mixins.sectionBackgrounds(0.75);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 24px 0;
|
padding: 24px 0;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
padding: 32px 0;
|
padding: 32px 0;
|
||||||
|
|
||||||
.tile:hover .section-incentives & {
|
.tile:hover .section-incentives & {
|
||||||
background-color: $color-incentives;
|
background-color: colors.$color-incentives;
|
||||||
}
|
}
|
||||||
.tile:hover .section-teambuilding & {
|
.tile:hover .section-teambuilding & {
|
||||||
background-color: $color-teambuilding;
|
background-color: colors.$color-teambuilding;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tile:hover .section-meetings & {
|
.tile:hover .section-meetings & {
|
||||||
background-color: $color-meetings;
|
background-color: colors.$color-meetings;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tile:hover .section-events & {
|
.tile:hover .section-events & {
|
||||||
background-color: $color-events;
|
background-color: colors.$color-events;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,7 +81,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
padding: 16px 32px 0;
|
padding: 16px 32px 0;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
.tile:hover & {
|
.tile:hover & {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -91,10 +95,10 @@
|
|||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
|
|
||||||
polygon {
|
polygon {
|
||||||
@include sectionFills();
|
@include mixins.sectionFills();
|
||||||
}
|
}
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
.tile:hover & {
|
.tile:hover & {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -114,7 +118,7 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
min-height: 54px;
|
min-height: 54px;
|
||||||
|
|
||||||
@include mq($from: tablet) {
|
@include breakpoints.mq($from: tablet) {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
@use "mixins";
|
||||||
|
|
||||||
.video {
|
.video {
|
||||||
@include container();
|
@include mixins.container();
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
padding-bottom: 32px;
|
padding-bottom: 32px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +1,39 @@
|
|||||||
@import "variables";
|
@use "variables";
|
||||||
@import "mixins";
|
@use "mixins";
|
||||||
@import "breakpoints";
|
@use "breakpoints";
|
||||||
|
|
||||||
@import "colors";
|
@use "colors";
|
||||||
@import "fonts";
|
@use "fonts";
|
||||||
|
|
||||||
@import "base";
|
@use "base";
|
||||||
@import "buttons";
|
@use "buttons";
|
||||||
@import "page-header";
|
@use "page-header";
|
||||||
@import "page-footer";
|
@use "page-footer";
|
||||||
@import "layout";
|
@use "layout";
|
||||||
@import "sitenav";
|
@use "sitenav";
|
||||||
@import "helpernav";
|
@use "helpernav";
|
||||||
@import "mobilenav";
|
@use "mobilenav";
|
||||||
@import "herounit";
|
@use "herounit";
|
||||||
@import "carousel";
|
@use "carousel";
|
||||||
@import "slider";
|
@use "slider";
|
||||||
@import "configurator";
|
@use "configurator";
|
||||||
@import "statement";
|
@use "statement";
|
||||||
@import "testimonial";
|
@use "testimonial";
|
||||||
@import "brands";
|
@use "brands";
|
||||||
@import "iconbar";
|
@use "iconbar";
|
||||||
@import "tiles";
|
@use "tiles";
|
||||||
@import "card";
|
@use "card";
|
||||||
@import "box";
|
@use "box";
|
||||||
@import "banner";
|
@use "banner";
|
||||||
@import "iconnav";
|
@use "iconnav";
|
||||||
@import "forms";
|
@use "forms";
|
||||||
@import "teasers";
|
@use "teasers";
|
||||||
@import "badge";
|
@use "badge";
|
||||||
@import "team";
|
@use "team";
|
||||||
@import "search";
|
@use "search";
|
||||||
@import "offerlist";
|
@use "offerlist";
|
||||||
@import "paginator";
|
@use "paginator";
|
||||||
@import "news";
|
@use "news";
|
||||||
@import "datepicker";
|
@use "datepicker";
|
||||||
@import "cookiefirst";
|
@use "cookiefirst";
|
||||||
@import "video";
|
@use "video";
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
@import "mixins";
|
@use "mixins";
|
||||||
@import "colors";
|
@use "colors";
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Cairo';
|
font-family: 'Cairo';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url('../fonts/cairo-v2-latin-ext_latin-regular.eot'); /* IE9 Compat Modes */
|
|
||||||
src: local('Cairo'), local('Cairo-Regular'),
|
src: local('Cairo'), local('Cairo-Regular'),
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
url('../fonts/cairo-v2-latin-ext_latin-regular.woff2') format('woff2'),
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
url('../fonts/cairo-v2-latin-ext_latin-regular.woff') format('woff');
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-regular.woff') format('woff'), /* Modern Browsers */
|
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-regular.svg#Cairo') format('svg'); /* Legacy iOS */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -20,13 +16,9 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url('../fonts/cairo-v2-latin-ext_latin-700.eot'); /* IE9 Compat Modes */
|
|
||||||
src: local('Cairo Bold'), local('Cairo-Bold'),
|
src: local('Cairo Bold'), local('Cairo-Bold'),
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
url('../fonts/cairo-v2-latin-ext_latin-700.woff2') format('woff2'),
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-700.woff2') format('woff2'), /* Super Modern Browsers */
|
url('../fonts/cairo-v2-latin-ext_latin-700.woff') format('woff');
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-700.woff') format('woff'), /* Modern Browsers */
|
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
|
|
||||||
url('../fonts/cairo-v2-latin-ext_latin-700.svg#Cairo') format('svg'); /* Legacy iOS */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$font-main: 'Cairo';
|
$font-main: 'Cairo';
|
||||||
@@ -34,12 +26,8 @@ $font-main: 'Cairo';
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'fontello';
|
font-family: 'fontello';
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url('../fonts/fontello.eot?39986861');
|
src: url('../fonts/fontello.woff2?39986861') format('woff2'),
|
||||||
src: url('../fonts/fontello.eot?39986861#iefix') format('embedded-opentype'),
|
url('../fonts/fontello.woff?39986861') format('woff');
|
||||||
url('../fonts/fontello.woff2?39986861') format('woff2'),
|
|
||||||
url('../fonts/fontello.woff?39986861') format('woff'),
|
|
||||||
url('../fonts/fontello.ttf?39986861') format('truetype'),
|
|
||||||
url('../fonts/fontello.svg?39986861#fontello') format('svg');
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
@@ -123,7 +111,7 @@ ul {
|
|||||||
left: 0;
|
left: 0;
|
||||||
content: "\25CF";
|
content: "\25CF";
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
@include sectionColoursFromParent();
|
@include mixins.sectionColoursFromParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,8 +129,8 @@ p {
|
|||||||
hr {
|
hr {
|
||||||
max-width: 25%;
|
max-width: 25%;
|
||||||
margin: 32px auto 32px 0;
|
margin: 32px auto 32px 0;
|
||||||
color: $color-ruler;
|
color: colors.$color-ruler;
|
||||||
background-color: $color-ruler;
|
background-color: colors.$color-ruler;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@@ -158,7 +146,7 @@ h3,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.headline {
|
.headline {
|
||||||
@include sectionColoursFromParent();
|
@include mixins.sectionColoursFromParent();
|
||||||
|
|
||||||
&--icon {
|
&--icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -192,9 +180,9 @@ h1,
|
|||||||
display: block;
|
display: block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 120%;
|
line-height: 120%;
|
||||||
color: $color-brand-primary;
|
color: colors.$color-brand-primary;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
@include sectionColoursFromParent();
|
@include mixins.sectionColoursFromParent();
|
||||||
|
|
||||||
&--box {
|
&--box {
|
||||||
color: white;
|
color: white;
|
||||||
@@ -229,7 +217,7 @@ h3 {
|
|||||||
|
|
||||||
&--default {
|
&--default {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 4px 16px;
|
padding: 4px 16px;
|
||||||
}
|
}
|
||||||
@@ -237,7 +225,7 @@ h3 {
|
|||||||
&--page-header {
|
&--page-header {
|
||||||
display: block;
|
display: block;
|
||||||
min-width: 186px;
|
min-width: 186px;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
padding: 0 32px 0 24px;
|
padding: 0 32px 0 24px;
|
||||||
@@ -250,8 +238,8 @@ h3 {
|
|||||||
display: block;
|
display: block;
|
||||||
min-width: 220px;
|
min-width: 220px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
@include sectionBackgroundsFromParent();
|
@include mixins.sectionBackgroundsFromParent();
|
||||||
color: white;
|
color: white;
|
||||||
line-height: 48px;
|
line-height: 48px;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -271,7 +259,7 @@ h3 {
|
|||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: white;
|
background: white;
|
||||||
color: $color-font-main;
|
color: colors.$color-font-main;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +268,7 @@ h3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--icon {
|
&--icon {
|
||||||
background-color: $color-brand-primary;
|
background-color: colors.$color-brand-primary;
|
||||||
color: white;
|
color: white;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|||||||
@@ -87,12 +87,16 @@ class SearchController extends ActionController
|
|||||||
|
|
||||||
public function initializeSearchresultAction()
|
public function initializeSearchresultAction()
|
||||||
{
|
{
|
||||||
// Process encoded filtersettings from static search result
|
// Process encoded filtersettings from static search result.
|
||||||
|
// Explicit filter settings win: they carry the visitor's current selection,
|
||||||
|
// whereas a stale 'f' riding along on a link would silently replace it.
|
||||||
$encodedFilterSettings = GeneralUtility::_GET('f');
|
$encodedFilterSettings = GeneralUtility::_GET('f');
|
||||||
if ($encodedFilterSettings) {
|
if ($encodedFilterSettings && !$this->request->hasArgument('filterSettings')) {
|
||||||
$filterSettingsEncoder = new FilterSettingsEncoder();
|
$filterSettingsEncoder = new FilterSettingsEncoder();
|
||||||
$filterSettings = $filterSettingsEncoder->decode($encodedFilterSettings);
|
$filterSettings = $filterSettingsEncoder->decode($encodedFilterSettings);
|
||||||
$this->request->setArgument('filterSettings', $filterSettings);
|
if (count($filterSettings) > 0) {
|
||||||
|
$this->request->setArgument('filterSettings', $filterSettings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$forcedConceptUids = GeneralUtility::intExplode(',', $this->settings['forcedConceptUids'], true);
|
$forcedConceptUids = GeneralUtility::intExplode(',', $this->settings['forcedConceptUids'], true);
|
||||||
$this->processFilterSettingsArgument($forcedConceptUids);
|
$this->processFilterSettingsArgument($forcedConceptUids);
|
||||||
|
|||||||
@@ -30,12 +30,17 @@ namespace EP\EpProducts\Domain\Model;
|
|||||||
class Room
|
class Room
|
||||||
{
|
{
|
||||||
|
|
||||||
|
const ROOM_TYPE_UNCLASSIFIED = 0;
|
||||||
const ROOM_TYPE_FOR_ONE = 1;
|
const ROOM_TYPE_FOR_ONE = 1;
|
||||||
const ROOM_TYPE_FOR_TWO = 2;
|
const ROOM_TYPE_FOR_TWO = 2;
|
||||||
const ROOM_TYPE_FOR_THREE = 3;
|
const ROOM_TYPE_FOR_THREE = 3;
|
||||||
const ROOM_TYPE_FOR_FOUR = 4;
|
const ROOM_TYPE_FOR_FOUR = 4;
|
||||||
const ROOM_TYPE_WITH_OTHERS = 5;
|
const ROOM_TYPE_FOR_FIVE = 5;
|
||||||
const ROOM_TYPE_OTHER = 6;
|
const ROOM_TYPE_FOR_SIX = 6;
|
||||||
|
const ROOM_TYPE_FOR_SEVEN = 7;
|
||||||
|
const ROOM_TYPE_FOR_EIGHT = 8;
|
||||||
|
const ROOM_TYPE_FOR_NINE_PLUS = 9;
|
||||||
|
const ROOM_TYPE_WITH_OTHERS = 10;
|
||||||
|
|
||||||
const ROOM_STATUS_AVAILABLE = 1;
|
const ROOM_STATUS_AVAILABLE = 1;
|
||||||
const ROOM_STATUS_ON_REQUEST = 2;
|
const ROOM_STATUS_ON_REQUEST = 2;
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace EP\EpProducts\Domain\Model;
|
|
||||||
|
|
||||||
/***************************************************************
|
|
||||||
*
|
|
||||||
* Copyright notice
|
|
||||||
*
|
|
||||||
* (c) 2016 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!
|
|
||||||
***************************************************************/
|
|
||||||
|
|
||||||
class RoomMapping extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $code = '';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
protected $type = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getCode()
|
|
||||||
{
|
|
||||||
return $this->code;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $code
|
|
||||||
*/
|
|
||||||
public function setCode($code)
|
|
||||||
{
|
|
||||||
$this->code = $code;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getType()
|
|
||||||
{
|
|
||||||
return $this->type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $type
|
|
||||||
*/
|
|
||||||
public function setType($type)
|
|
||||||
{
|
|
||||||
$this->type = $type;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -76,9 +76,11 @@ class ProductRepository extends AbstractRepository
|
|||||||
'date.services_included as servicesIncluded', 'date.skipass_included as skiPassIncluded',
|
'date.services_included as servicesIncluded', 'date.skipass_included as skiPassIncluded',
|
||||||
'date.bus_available as busAvailable', 'date.new as new',
|
'date.bus_available as busAvailable', 'date.new as new',
|
||||||
'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
|
'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
|
||||||
'date.pseudo_price as pseudoPrice', 'date.hide_booking_button as hideBookingButton',
|
'date.pseudo_price as pseudoPrice', 'date.hide_booking_button as hideBookingButton'
|
||||||
'room.type as roomType'
|
|
||||||
)
|
)
|
||||||
|
// The GROUP BY below collapses many room rows per group; an arbitrary
|
||||||
|
// room.type would hide most types from the filter facet.
|
||||||
|
->addSelectLiteral('GROUP_CONCAT(DISTINCT room.type) as roomTypes')
|
||||||
->from('tx_epproducts_domain_model_date', 'date')
|
->from('tx_epproducts_domain_model_date', 'date')
|
||||||
->leftJoin('date', 'tx_epproducts_domain_model_concept', 'con', 'date.concept = con.uid')
|
->leftJoin('date', 'tx_epproducts_domain_model_concept', 'con', 'date.concept = con.uid')
|
||||||
->leftJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
|
->leftJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace EP\EpProducts\Domain\Repository;
|
|
||||||
|
|
||||||
/***************************************************************
|
|
||||||
*
|
|
||||||
* Copyright notice
|
|
||||||
*
|
|
||||||
* (c) 2016 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!
|
|
||||||
***************************************************************/
|
|
||||||
|
|
||||||
class RoomMappingRepository extends AbstractRepository
|
|
||||||
{}
|
|
||||||
@@ -49,8 +49,22 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
*/
|
*/
|
||||||
private const ACCESS_TOKEN_DEFAULT_TTL = 300;
|
private const ACCESS_TOKEN_DEFAULT_TTL = 300;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status codes that mean the token was rejected rather than the request being wrong.
|
||||||
|
*/
|
||||||
|
private const UNAUTHORIZED_STATUS_CODES = [Response::HTTP_UNAUTHORIZED, Response::HTTP_FORBIDDEN];
|
||||||
|
|
||||||
private static ?AccessToken $accessToken = null;
|
private static ?AccessToken $accessToken = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shared on purpose. Symfony's CurlHttpClient keeps its connection pool and TLS session
|
||||||
|
* cache in a CurlClientState owned by the instance, so building a client per call throws
|
||||||
|
* both away and forces a fresh DNS lookup, TCP connect and TLS handshake every time -
|
||||||
|
* TravelinfoController alone makes two calls per page render. The bearer token is passed
|
||||||
|
* per request rather than as a client default so one instance can outlive one token.
|
||||||
|
*/
|
||||||
|
private static ?HttpClientInterface $httpClient = null;
|
||||||
|
|
||||||
private ?FrontendInterface $cache = null;
|
private ?FrontendInterface $cache = null;
|
||||||
|
|
||||||
private ?array $configuration = null;
|
private ?array $configuration = null;
|
||||||
@@ -100,7 +114,25 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
'json' => $addressData,
|
'json' => $addressData,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertStatusCode($response, [Response::HTTP_OK, Response::HTTP_CREATED, Response::HTTP_ACCEPTED, Response::HTTP_NO_CONTENT], 'POST', 'contactform');
|
// A conflict means the address is already registered, which is the normal answer to a
|
||||||
|
// resubmitted contact form and not worth reporting.
|
||||||
|
$this->assertStatusCode($response, [Response::HTTP_OK, Response::HTTP_CREATED, Response::HTTP_ACCEPTED, Response::HTTP_NO_CONTENT, Response::HTTP_CONFLICT], 'POST', 'contactform');
|
||||||
|
$this->drainResponse($response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws ApiException
|
||||||
|
*/
|
||||||
|
public function submitApplication(array $applicationData): void
|
||||||
|
{
|
||||||
|
$response = $this->request('POST', 'applications', [
|
||||||
|
'json' => $applicationData,
|
||||||
|
]);
|
||||||
|
|
||||||
|
// A conflict means the submission is already known, which is the normal answer to a
|
||||||
|
// double-clicked submit button and not worth reporting.
|
||||||
|
$this->assertStatusCode($response, [Response::HTTP_OK, Response::HTTP_CREATED, Response::HTTP_ACCEPTED, Response::HTTP_NO_CONTENT, Response::HTTP_CONFLICT], 'POST', 'applications');
|
||||||
|
$this->drainResponse($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -183,6 +215,30 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
*/
|
*/
|
||||||
private function request(string $method, string $uri, array $options = []): ResponseInterface
|
private function request(string $method, string $uri, array $options = []): ResponseInterface
|
||||||
{
|
{
|
||||||
|
$response = $this->sendRequest($method, $uri, $options);
|
||||||
|
|
||||||
|
if (false === in_array($this->readStatusCode($response, $method, $uri), self::UNAUTHORIZED_STATUS_CODES, true)) {
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The token outlives a single PHP request, so one the API has stopped accepting - after
|
||||||
|
// a MyEP restart or a revoked client - would keep failing every call for the rest of its
|
||||||
|
// cached lifetime unless it is actively discarded here.
|
||||||
|
$this->logWarning(sprintf('MyEP API rejected the cached access token for %s %s, re-authenticating once', $method, $uri));
|
||||||
|
$this->discardAccessToken();
|
||||||
|
|
||||||
|
return $this->sendRequest($method, $uri, $options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws ApiException
|
||||||
|
*/
|
||||||
|
private function sendRequest(string $method, string $uri, array $options): ResponseInterface
|
||||||
|
{
|
||||||
|
// Resolved here rather than baked into the client's default options so that the shared
|
||||||
|
// client survives a token change, and so the retry above picks up the fresh token.
|
||||||
|
$options['auth_bearer'] = $this->getAccessToken($this->getConfiguration())->getToken();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return $this->getHttpClient()->request($method, $uri, $options);
|
return $this->getHttpClient()->request($method, $uri, $options);
|
||||||
} catch (TransportExceptionInterface $e) {
|
} catch (TransportExceptionInterface $e) {
|
||||||
@@ -199,13 +255,7 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
*/
|
*/
|
||||||
private function assertStatusCode(ResponseInterface $response, array $expectedStatusCodes, string $method, string $uri): void
|
private function assertStatusCode(ResponseInterface $response, array $expectedStatusCodes, string $method, string $uri): void
|
||||||
{
|
{
|
||||||
try {
|
$statusCode = $this->readStatusCode($response, $method, $uri);
|
||||||
$statusCode = $response->getStatusCode();
|
|
||||||
} catch (TransportExceptionInterface $e) {
|
|
||||||
$message = sprintf('MyEP API transport error while reading status for %s %s: %s', $method, $uri, $e->getMessage());
|
|
||||||
$this->logError($message, ['exception' => $e]);
|
|
||||||
throw new ApiException($message, 0, $e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (true === in_array($statusCode, $expectedStatusCodes, true)) {
|
if (true === in_array($statusCode, $expectedStatusCodes, true)) {
|
||||||
return;
|
return;
|
||||||
@@ -217,6 +267,39 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
throw new ApiException($message, $statusCode);
|
throw new ApiException($message, $statusCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reading the status completes the transfer, so this is also what turns the lazy response
|
||||||
|
* returned by the client into a finished request. Symfony keeps the status on the response,
|
||||||
|
* so calling this twice costs nothing.
|
||||||
|
*
|
||||||
|
* @throws ApiException
|
||||||
|
*/
|
||||||
|
private function readStatusCode(ResponseInterface $response, string $method, string $uri): int
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return $response->getStatusCode();
|
||||||
|
} catch (TransportExceptionInterface $e) {
|
||||||
|
$message = sprintf('MyEP API transport error while reading status for %s %s: %s', $method, $uri, $e->getMessage());
|
||||||
|
$this->logError($message, ['exception' => $e]);
|
||||||
|
throw new ApiException($message, 0, $e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads and discards a body nobody else is going to look at. Destroying an unconsumed
|
||||||
|
* response cancels the transfer, which closes the connection instead of returning it to
|
||||||
|
* the pool, so the next call would have to handshake again.
|
||||||
|
*/
|
||||||
|
private function drainResponse(ResponseInterface $response): void
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$response->getContent(false);
|
||||||
|
} catch (TransportExceptionInterface $e) {
|
||||||
|
// The status has already been asserted, so a failure here costs nothing but the
|
||||||
|
// connection reuse this method exists for.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ApiException
|
* @throws ApiException
|
||||||
*/
|
*/
|
||||||
@@ -237,13 +320,13 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
|
|
||||||
private function getHttpClient(): HttpClientInterface
|
private function getHttpClient(): HttpClientInterface
|
||||||
{
|
{
|
||||||
|
if (null !== static::$httpClient) {
|
||||||
|
return static::$httpClient;
|
||||||
|
}
|
||||||
|
|
||||||
$config = $this->getConfiguration();
|
$config = $this->getConfiguration();
|
||||||
|
|
||||||
static::$accessToken = $this->getAccessToken($config);
|
$options = [];
|
||||||
|
|
||||||
$options = [
|
|
||||||
'auth_bearer' => static::$accessToken->getToken(),
|
|
||||||
];
|
|
||||||
|
|
||||||
// Without these the client falls back to PHP's default_socket_timeout (commonly 60s),
|
// Without these the client falls back to PHP's default_socket_timeout (commonly 60s),
|
||||||
// so a stalled API pins a PHP worker for a minute per request. The defaults live in
|
// so a stalled API pins a PHP worker for a minute per request. The defaults live in
|
||||||
@@ -261,7 +344,7 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
$options['max_duration'] = $maxDuration;
|
$options['max_duration'] = $maxDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HttpClient::createForBaseUri($config['myEpApiBaseUrl'], $options);
|
return static::$httpClient = HttpClient::createForBaseUri($config['myEpApiBaseUrl'], $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -296,7 +379,7 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
*/
|
*/
|
||||||
private function getAccessToken(array $config): AccessToken
|
private function getAccessToken(array $config): AccessToken
|
||||||
{
|
{
|
||||||
if (null !== static::$accessToken && false === static::$accessToken->hasExpired()) {
|
if (true === $this->isTokenUsable(static::$accessToken)) {
|
||||||
return static::$accessToken;
|
return static::$accessToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,7 +388,7 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
$cachedToken = $this->getCache()->get(self::ACCESS_TOKEN_CACHE_IDENTIFIER);
|
$cachedToken = $this->getCache()->get(self::ACCESS_TOKEN_CACHE_IDENTIFIER);
|
||||||
if (is_array($cachedToken) && isset($cachedToken['access_token'])) {
|
if (is_array($cachedToken) && isset($cachedToken['access_token'])) {
|
||||||
$token = new AccessToken($cachedToken);
|
$token = new AccessToken($cachedToken);
|
||||||
if (false === $token->hasExpired()) {
|
if (true === $this->isTokenUsable($token)) {
|
||||||
static::$accessToken = $token;
|
static::$accessToken = $token;
|
||||||
|
|
||||||
return static::$accessToken;
|
return static::$accessToken;
|
||||||
@@ -313,7 +396,7 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
static::$accessToken = $this->getProvider($config)->getAccessToken('client_credentials');
|
static::$accessToken = $this->normalizeToken($this->getProvider($config)->getAccessToken('client_credentials'));
|
||||||
$this->cacheAccessToken(static::$accessToken);
|
$this->cacheAccessToken(static::$accessToken);
|
||||||
} catch (IdentityProviderException $e) {
|
} catch (IdentityProviderException $e) {
|
||||||
$message = sprintf('MyEP OAuth token request failed: %s', $e->getMessage());
|
$message = sprintf('MyEP OAuth token request failed: %s', $e->getMessage());
|
||||||
@@ -332,16 +415,53 @@ class ApiClient implements LoggerAwareInterface
|
|||||||
return static::$accessToken;
|
return static::$accessToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function cacheAccessToken(AccessToken $token): void
|
/**
|
||||||
|
* AccessToken::hasExpired() throws for a token that reports no expiry, so it cannot be used
|
||||||
|
* as the check - a token without one is simply treated as unusable and replaced. The same
|
||||||
|
* margin as the cache lifetime is applied on read as well, so a token cannot lapse between
|
||||||
|
* this check and the API call that uses it, whichever node wrote the cache entry.
|
||||||
|
*/
|
||||||
|
private function isTokenUsable(?AccessToken $token): bool
|
||||||
{
|
{
|
||||||
|
if (null === $token) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$expires = $token->getExpires();
|
$expires = $token->getExpires();
|
||||||
|
|
||||||
if (null === $expires) {
|
if (null === $expires) {
|
||||||
$lifetime = self::ACCESS_TOKEN_DEFAULT_TTL;
|
return false;
|
||||||
} else {
|
|
||||||
$lifetime = $expires - time() - self::ACCESS_TOKEN_EXPIRY_MARGIN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $expires - self::ACCESS_TOKEN_EXPIRY_MARGIN > time();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A token that reports no expiry cannot be validated on read - isTokenUsable() rejects it
|
||||||
|
* and AccessToken::hasExpired() throws for it - so it is given the fallback lifetime here,
|
||||||
|
* once, and the rest of the class can treat every token the same way.
|
||||||
|
*/
|
||||||
|
private function normalizeToken(AccessToken $token): AccessToken
|
||||||
|
{
|
||||||
|
if (null !== $token->getExpires()) {
|
||||||
|
return $token;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new AccessToken($token->jsonSerialize() + ['expires_in' => self::ACCESS_TOKEN_DEFAULT_TTL]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function discardAccessToken(): void
|
||||||
|
{
|
||||||
|
static::$accessToken = null;
|
||||||
|
$this->getCache()->remove(self::ACCESS_TOKEN_CACHE_IDENTIFIER);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function cacheAccessToken(AccessToken $token): void
|
||||||
|
{
|
||||||
|
// normalizeToken() has already given a token without a reported expiry the fallback
|
||||||
|
// lifetime, so there is always a real expiry to subtract the margin from here.
|
||||||
|
$lifetime = $token->getExpires() - time() - self::ACCESS_TOKEN_EXPIRY_MARGIN;
|
||||||
|
|
||||||
if ($lifetime <= 0) {
|
if ($lifetime <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,11 +60,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
*/
|
*/
|
||||||
protected $pid = 0;
|
protected $pid = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $roomMappings = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
@@ -90,6 +85,11 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
*/
|
*/
|
||||||
protected $importSourceFactory;
|
protected $importSourceFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var RoomTypeResolver
|
||||||
|
*/
|
||||||
|
protected $roomTypeResolver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
@@ -101,15 +101,18 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
* @param ConfigurationManagerInterface $configurationManager
|
* @param ConfigurationManagerInterface $configurationManager
|
||||||
* @param CacheService $cacheService
|
* @param CacheService $cacheService
|
||||||
* @param ProductImportSourceFactory $importSourceFactory
|
* @param ProductImportSourceFactory $importSourceFactory
|
||||||
|
* @param RoomTypeResolver $roomTypeResolver
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
ConfigurationManagerInterface $configurationManager,
|
ConfigurationManagerInterface $configurationManager,
|
||||||
CacheService $cacheService,
|
CacheService $cacheService,
|
||||||
ProductImportSourceFactory $importSourceFactory
|
ProductImportSourceFactory $importSourceFactory,
|
||||||
|
RoomTypeResolver $roomTypeResolver
|
||||||
) {
|
) {
|
||||||
$this->configurationManager = $configurationManager;
|
$this->configurationManager = $configurationManager;
|
||||||
$this->cacheService = $cacheService;
|
$this->cacheService = $cacheService;
|
||||||
$this->importSourceFactory = $importSourceFactory;
|
$this->importSourceFactory = $importSourceFactory;
|
||||||
|
$this->roomTypeResolver = $roomTypeResolver;
|
||||||
|
|
||||||
$settings = GeneralUtility::removeDotsFromTS(
|
$settings = GeneralUtility::removeDotsFromTS(
|
||||||
$this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
|
$this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
|
||||||
@@ -130,7 +133,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
public function import($path): int
|
public function import($path): int
|
||||||
{
|
{
|
||||||
$this->db = $this->getDbConnection();
|
$this->db = $this->getDbConnection();
|
||||||
$this->getRoomMappings();
|
|
||||||
$this->getHotelMappings();
|
$this->getHotelMappings();
|
||||||
$this->importPickups($path);
|
$this->importPickups($path);
|
||||||
$this->createTempTables();
|
$this->createTempTables();
|
||||||
@@ -594,13 +596,9 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$roomTypeKey = mb_strtolower($code);
|
$label = (string) $roomXml->attributes()['zimmertext'];
|
||||||
if (array_key_exists($roomTypeKey, $this->roomMappings)) {
|
$roomMinPax = (int) $roomXml->attributes()['MinPax'];
|
||||||
$roomType = $this->roomMappings[$roomTypeKey];
|
$pax = (int) $roomXml->attributes()['MaxPax'];
|
||||||
} else {
|
|
||||||
$this->logger->warning('room type not found', ['code' => $code]);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$available = (int) $roomXml->attributes()['verfuegbar'];
|
$available = (int) $roomXml->attributes()['verfuegbar'];
|
||||||
$price = (int) $roomXml->attributes()['preis'];
|
$price = (int) $roomXml->attributes()['preis'];
|
||||||
@@ -610,12 +608,23 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pax = (int) $roomXml->attributes()['MinPax'];
|
$roomType = $this->roomTypeResolver->resolve($code, $label, $pax, $roomMinPax);
|
||||||
if (0 === $minPax || $pax < $minPax) {
|
|
||||||
$minPax = $pax;
|
if ($pax < 1 && $roomMinPax < 1) {
|
||||||
|
$this->logger->warning('room without occupancy', ['code' => $code, 'zimmertext' => $label]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->roomTypeResolver->needsReview($code, $label, $pax)) {
|
||||||
|
$this->logger->warning(
|
||||||
|
'single-occupancy room without single-use marker',
|
||||||
|
['code' => $code, 'zimmertext' => $label]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 === $minPax || $roomMinPax < $minPax) {
|
||||||
|
$minPax = $roomMinPax;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pax = (int) $roomXml->attributes()['MaxPax'];
|
|
||||||
$availableTotal += $available * $pax;
|
$availableTotal += $available * $pax;
|
||||||
|
|
||||||
// Determine lowest price of available rooms
|
// Determine lowest price of available rooms
|
||||||
@@ -648,7 +657,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
'bus_pro_id' => (int) $roomXml->attributes()['idbuspro_zimmer'],
|
'bus_pro_id' => (int) $roomXml->attributes()['idbuspro_zimmer'],
|
||||||
'code' => $code,
|
'code' => $code,
|
||||||
'type' => $roomType,
|
'type' => $roomType,
|
||||||
'name' => (string) $roomXml->attributes()['zimmertext'],
|
'name' => $label,
|
||||||
'pax' => $pax,
|
'pax' => $pax,
|
||||||
'nights' => (int) $roomXml->attributes()['naechte'],
|
'nights' => (int) $roomXml->attributes()['naechte'],
|
||||||
'price' => $price,
|
'price' => $price,
|
||||||
@@ -791,16 +800,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRoomMappings(): void
|
|
||||||
{
|
|
||||||
$sql = 'SELECT code, type FROM tx_epproducts_domain_model_roommapping WHERE deleted = 0 AND hidden = 0';
|
|
||||||
$roomMappings = $this->db->fetchAllAssociative($sql);
|
|
||||||
foreach ($roomMappings as $mapping) {
|
|
||||||
$key = trim(mb_strtolower($mapping['code']));
|
|
||||||
$this->roomMappings[$key] = $mapping['type'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getHotelMappings(): void
|
protected function getHotelMappings(): void
|
||||||
{
|
{
|
||||||
$sql = '
|
$sql = '
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace EP\EpProducts\Service;
|
namespace EP\EpProducts\Service;
|
||||||
|
|
||||||
use EP\EpProducts\Domain\Model\Dto\FilterOptions;
|
use EP\EpProducts\Domain\Model\Dto\FilterOptions;
|
||||||
|
use EP\EpProducts\Domain\Model\Room;
|
||||||
use EP\EpProducts\Domain\Model\SearchResult;
|
use EP\EpProducts\Domain\Model\SearchResult;
|
||||||
use Symfony\Component\OptionsResolver\Options;
|
use Symfony\Component\OptionsResolver\Options;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
@@ -212,6 +213,12 @@ class FilterService implements SingletonInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($item['rooms'] as $roomType) {
|
foreach ($item['rooms'] as $roomType) {
|
||||||
|
// Type 0 is not a room (Baby) and must never become a filter option:
|
||||||
|
// it has no label, so it would render as an empty checkbox and leave
|
||||||
|
// a hole in the option list.
|
||||||
|
if ((int) $roomType === Room::ROOM_TYPE_UNCLASSIFIED) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!\in_array($roomType, $roomTypes, false)) {
|
if (!\in_array($roomType, $roomTypes, false)) {
|
||||||
$roomTypes[] = $roomType;
|
$roomTypes[] = $roomType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,11 +76,28 @@ class FilterSettingsEncoder
|
|||||||
return implode('|', $encoded);
|
return implode('|', $encoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes an encoded filter settings string.
|
||||||
|
*
|
||||||
|
* The format is strictly positional, so a string whose field count does not
|
||||||
|
* match the mapping cannot be interpreted: every field after a missing one
|
||||||
|
* would be read into the wrong setting. Such input is rejected outright
|
||||||
|
* rather than silently producing a shifted - and therefore wrong - result.
|
||||||
|
*
|
||||||
|
* @param string $data
|
||||||
|
* @return array the decoded settings, or an empty array if $data is malformed
|
||||||
|
*/
|
||||||
public function decode(string $data): array
|
public function decode(string $data): array
|
||||||
{
|
{
|
||||||
$decoded = [];
|
$mapping = $this->getMapping();
|
||||||
$values = explode('|', $data);
|
$values = explode('|', $data);
|
||||||
foreach ($this->getMapping() as $index => $property)
|
|
||||||
|
if (count($values) !== count($mapping)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$decoded = [];
|
||||||
|
foreach ($mapping as $index => $property)
|
||||||
{
|
{
|
||||||
[$name, $type] = $property;
|
[$name, $type] = $property;
|
||||||
$value = $values[$index];
|
$value = $values[$index];
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpProducts\Service;
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
*
|
||||||
|
* Copyright notice
|
||||||
|
*
|
||||||
|
* (c) 2016 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 EP\EpProducts\Domain\Model\Room;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Derives the room type from the data each <preis> element carries.
|
||||||
|
*
|
||||||
|
* Replaces the former tx_epproducts_domain_model_roommapping lookup: zimmercode is
|
||||||
|
* neither unique per room nor a function of room type, so a code-keyed table cannot
|
||||||
|
* classify this data. MaxPax is the advertised occupancy and is present on every row.
|
||||||
|
*/
|
||||||
|
class RoomTypeResolver
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Phrases in zimmertext that mark a bed shared with other customers.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
const LABEL_PATTERNS_WITH_OTHERS = [
|
||||||
|
'bett im',
|
||||||
|
'mit ander',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Phrases in zimmertext that mark a deliberate single use of a larger room.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
const LABEL_PATTERNS_SINGLE_USE = [
|
||||||
|
'einzel',
|
||||||
|
'1 person',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $code zimmercode
|
||||||
|
* @param string $label zimmertext
|
||||||
|
* @param int $maxPax MaxPax
|
||||||
|
* @param int $minPax MinPax
|
||||||
|
* @return int one of the Room::ROOM_TYPE_* constants
|
||||||
|
*/
|
||||||
|
public function resolve(string $code, string $label, int $maxPax, int $minPax): int
|
||||||
|
{
|
||||||
|
// Not a room: "Babypreis für 0-2 Jährige". Kept in the date record for its
|
||||||
|
// price and availability, but hidden from the filter.
|
||||||
|
if ($code === DateImportService::CODE_BABYROOM) {
|
||||||
|
return Room::ROOM_TYPE_UNCLASSIFIED;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->matchesAny($label, static::LABEL_PATTERNS_WITH_OTHERS)) {
|
||||||
|
return Room::ROOM_TYPE_WITH_OTHERS;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pax = $maxPax > 0 ? $maxPax : $minPax;
|
||||||
|
|
||||||
|
if ($pax >= 1) {
|
||||||
|
// Type numbering is chosen so that type === pax for pax 1-8.
|
||||||
|
return $pax >= 9 ? Room::ROOM_TYPE_FOR_NINE_PLUS : $pax;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No usable occupancy - should never happen on current data, the caller logs it.
|
||||||
|
return Room::ROOM_TYPE_WITH_OTHERS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tripwire for an under-matching label pattern: a row classified as a single room
|
||||||
|
* whose label carries no single-use marker is most likely a shared bed phrased in
|
||||||
|
* a way LABEL_PATTERNS_WITH_OTHERS does not yet cover.
|
||||||
|
*
|
||||||
|
* @param string $code zimmercode
|
||||||
|
* @param string $label zimmertext
|
||||||
|
* @param int $maxPax MaxPax
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function needsReview(string $code, string $label, int $maxPax): bool
|
||||||
|
{
|
||||||
|
if ($this->resolve($code, $label, $maxPax, $maxPax) !== Room::ROOM_TYPE_FOR_ONE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($maxPax !== 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !$this->matchesAny($label, static::LABEL_PATTERNS_SINGLE_USE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $label
|
||||||
|
* @param array $patterns
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function matchesAny(string $label, array $patterns): bool
|
||||||
|
{
|
||||||
|
foreach ($patterns as $pattern) {
|
||||||
|
if (mb_strpos(mb_strtolower($label), mb_strtolower($pattern)) !== false) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,6 +31,7 @@ use EP\EpProducts\Domain\Model\SearchResult;
|
|||||||
use EP\EpProducts\Domain\Repository\ProductRepository;
|
use EP\EpProducts\Domain\Repository\ProductRepository;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use TYPO3\CMS\Core\SingletonInterface;
|
use TYPO3\CMS\Core\SingletonInterface;
|
||||||
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
|
||||||
class SearchResultService implements SingletonInterface
|
class SearchResultService implements SingletonInterface
|
||||||
{
|
{
|
||||||
@@ -216,8 +217,10 @@ class SearchResultService implements SingletonInterface
|
|||||||
$item['filterMetadata']['boardTypes'][] = $boardType;
|
$item['filterMetadata']['boardTypes'][] = $boardType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($row['roomType']) && !\in_array($row['roomType'], $item['rooms'], false)) {
|
foreach (GeneralUtility::trimExplode(',', (string) ($row['roomTypes'] ?? ''), true) as $roomType) {
|
||||||
$item['rooms'][] = $row['roomType'];
|
if (!\in_array($roomType, $item['rooms'], false)) {
|
||||||
|
$item['rooms'][] = $roomType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\in_array($row['nights'], $item['nights'], false)) {
|
if (!\in_array($row['nights'], $item['nights'], false)) {
|
||||||
|
|||||||
@@ -33,7 +33,10 @@ use EP\EpProducts\Domain\Repository\RegionRepository;
|
|||||||
use EP\EpProducts\Domain\Repository\SnowreportRepository;
|
use EP\EpProducts\Domain\Repository\SnowreportRepository;
|
||||||
use EP\EpProducts\Domain\Repository\WebcamRepository;
|
use EP\EpProducts\Domain\Repository\WebcamRepository;
|
||||||
use EP\EpProducts\Utility\SettingsUtility;
|
use EP\EpProducts\Utility\SettingsUtility;
|
||||||
|
use TYPO3\CMS\Core\Database\Connection;
|
||||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||||
|
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
|
||||||
|
use TYPO3\CMS\Core\Http\RequestFactory;
|
||||||
use TYPO3\CMS\Core\SingletonInterface;
|
use TYPO3\CMS\Core\SingletonInterface;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
|
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
|
||||||
@@ -44,14 +47,34 @@ class SnowreportImportService implements SingletonInterface
|
|||||||
const XML_FILE_URL = 'https://www.skiresort-service.com/xml-feed/';
|
const XML_FILE_URL = 'https://www.skiresort-service.com/xml-feed/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* Connection and read timeout for the feed download, in seconds. A healthy response to this
|
||||||
|
* endpoint arrives in well under a second, so the ceiling is kept low enough that an outage on
|
||||||
|
* the vendor side fails visibly instead of stalling the scheduler task or the backend request.
|
||||||
*/
|
*/
|
||||||
protected static $validSnowreportUids = [];
|
const HTTP_CONNECT_TIMEOUT = 5;
|
||||||
|
const HTTP_TIMEOUT = 30;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected static $validWebcamUids = [];
|
protected $validSnowreportUids = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $validWebcamUids = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Existing records keyed by vendor_uid, preloaded once per import to avoid a query per record.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $snowreportIndex = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $webcamIndex = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
|
* @var \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
|
||||||
@@ -91,27 +114,62 @@ class SnowreportImportService implements SingletonInterface
|
|||||||
$this->regionRepository = $regionRepository;
|
$this->regionRepository = $regionRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TYPE_INT = 'int';
|
||||||
|
const TYPE_STRING = 'string';
|
||||||
|
const TYPE_BOOL = 'bool';
|
||||||
|
const TYPE_DATE = 'date';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Declared schema of the vendor feed: XML element name => target column and its type.
|
||||||
|
*
|
||||||
|
* XML carries no type information - every element is a string - so the type of each field is
|
||||||
|
* declared here rather than guessed from the value. Values are converted strictly according to
|
||||||
|
* this table; anything unexpected is logged and falls back to the type's empty value instead of
|
||||||
|
* silently changing type.
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected static $map = [
|
protected static $map = [
|
||||||
'region_id' => 'vendor_uid',
|
'region_id' => ['column' => 'vendor_uid', 'type' => self::TYPE_INT],
|
||||||
'region_name' => 'region_name',
|
'region_name' => ['column' => 'region_name', 'type' => self::TYPE_STRING],
|
||||||
'region_offen' => 'opened',
|
'region_offen' => ['column' => 'opened', 'type' => self::TYPE_BOOL],
|
||||||
'gletschergebiet' => 'glacier',
|
'gletschergebiet' => ['column' => 'glacier', 'type' => self::TYPE_BOOL],
|
||||||
'schneehoehe_berg' => 'snow_level_mountain',
|
'schneehoehe_berg' => ['column' => 'snow_level_mountain', 'type' => self::TYPE_INT],
|
||||||
'schneehoehe_tal' => 'snow_level_valley',
|
'schneehoehe_tal' => ['column' => 'snow_level_valley', 'type' => self::TYPE_INT],
|
||||||
'schneequalitaet' => 'snow_quality',
|
'schneequalitaet' => ['column' => 'snow_quality', 'type' => self::TYPE_STRING],
|
||||||
'letzter_schneefall' => 'last_snowfall',
|
'letzter_schneefall' => ['column' => 'last_snowfall', 'type' => self::TYPE_DATE],
|
||||||
'lifte_gesamt' => 'lifts_total',
|
'lifte_gesamt' => ['column' => 'lifts_total', 'type' => self::TYPE_INT],
|
||||||
'offene_lifte' => 'lifts_opened',
|
'offene_lifte' => ['column' => 'lifts_opened', 'type' => self::TYPE_INT],
|
||||||
'letzte_aktualisierung' => 'last_update',
|
'letzte_aktualisierung' => ['column' => 'last_update', 'type' => self::TYPE_DATE],
|
||||||
'hoehemax' => 'height_max',
|
'hoehemax' => ['column' => 'height_max', 'type' => self::TYPE_INT],
|
||||||
'hoehemin' => 'height_min',
|
'hoehemin' => ['column' => 'height_min', 'type' => self::TYPE_INT],
|
||||||
'datum_saisonstart' => 'season_start',
|
'datum_saisonstart' => ['column' => 'season_start', 'type' => self::TYPE_DATE],
|
||||||
'datum_saisonende' => 'season_end',
|
'datum_saisonende' => ['column' => 'season_end', 'type' => self::TYPE_DATE],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accepted boolean representations, lowercased.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected static $booleanMap = [
|
||||||
|
'true' => true,
|
||||||
|
'1' => true,
|
||||||
|
'ja' => true,
|
||||||
|
'yes' => true,
|
||||||
|
'false' => false,
|
||||||
|
'0' => false,
|
||||||
|
'nein' => false,
|
||||||
|
'no' => false,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Distinct conversion problems encountered during the current import.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $conversionWarnings = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@@ -119,39 +177,41 @@ class SnowreportImportService implements SingletonInterface
|
|||||||
{
|
{
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$file = GeneralUtility::getFileAbsFileName(self::XML_FILE_PATH);
|
$file = GeneralUtility::getFileAbsFileName(self::XML_FILE_PATH);
|
||||||
$xmlContent = file_get_contents($file);
|
|
||||||
$xmlData = simplexml_load_string($xmlContent);
|
if (!is_file($file)) {
|
||||||
|
$this->writelog(sprintf('Snowreport XML import failed: file "%s" does not exist.', $file));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$xmlData = $this->parseReportsXml((string) file_get_contents($file));
|
||||||
|
} catch (\RuntimeException $e) {
|
||||||
|
$this->writelog(sprintf('Snowreport XML import failed: %s', $e->getMessage()));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->resetImportState();
|
||||||
|
$this->buildIndexes();
|
||||||
|
|
||||||
$snowReportStoragePid = $this->getStoragePid();
|
$snowReportStoragePid = $this->getStoragePid();
|
||||||
|
|
||||||
foreach ($xmlData->schneemeldung as $reportXml)
|
foreach ($xmlData->schneemeldung as $reportXml)
|
||||||
{
|
{
|
||||||
$vendorUid = (int) $reportXml->region_id;
|
$vendorUid = (int) $reportXml->region_id;
|
||||||
$result = $this->snowreportRepository->findByVendorUid($vendorUid);
|
$snowreport = $this->getSnowreport($vendorUid);
|
||||||
if ($result->count() === 0) {
|
|
||||||
$snowreport = new Snowreport();
|
|
||||||
$this->snowreportRepository->add($snowreport);
|
|
||||||
} else {
|
|
||||||
$snowreport = $result->getFirst();
|
|
||||||
}
|
|
||||||
|
|
||||||
$row = [];
|
$row = [];
|
||||||
foreach (static::$map as $key => $column)
|
foreach (static::$map as $key => $field)
|
||||||
{
|
{
|
||||||
$valueRaw = trim($reportXml->{$key});
|
if (!isset($reportXml->{$key})) {
|
||||||
|
$this->addConversionWarning(sprintf('Element <%s> missing in feed.', $key));
|
||||||
if ($valueRaw === 'true') {
|
$row[$field['column']] = $this->getEmptyValue($field['type']);
|
||||||
$value = true;
|
continue;
|
||||||
} elseif ($valueRaw === 'false') {
|
|
||||||
$value = false;
|
|
||||||
} elseif (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $valueRaw)) {
|
|
||||||
$date = new \DateTime($valueRaw);
|
|
||||||
$value = $date->getTimestamp();
|
|
||||||
} else {
|
|
||||||
$value = (string) $valueRaw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$row[$column] = $value;
|
$row[$field['column']] = $this->convertValue((string) $reportXml->{$key}, $field['type'], $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
$snowreport->setPid($snowReportStoragePid);
|
$snowreport->setPid($snowReportStoragePid);
|
||||||
@@ -175,23 +235,24 @@ class SnowreportImportService implements SingletonInterface
|
|||||||
$this->importWebcamData($reportXml->webcam, $snowreport);
|
$this->importWebcamData($reportXml->webcam, $snowreport);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($snowreport->_isNew()) {
|
// New objects are already registered via add(); only managed ones need update().
|
||||||
$this->persistenceManager->persistAll();
|
if (!$snowreport->_isNew()) {
|
||||||
} else {
|
|
||||||
$this->snowreportRepository->update($snowreport);
|
$this->snowreportRepository->update($snowreport);
|
||||||
}
|
}
|
||||||
|
|
||||||
static::$validSnowreportUids[] = $vendorUid;
|
$this->validSnowreportUids[] = $vendorUid;
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->persistenceManager->persistAll();
|
$this->persistenceManager->persistAll();
|
||||||
|
|
||||||
$this->cleanupData('tx_epproducts_domain_model_webcam', static::$validWebcamUids);
|
$this->cleanupData('tx_epproducts_domain_model_webcam', $this->validWebcamUids);
|
||||||
$this->cleanupData('tx_epproducts_domain_model_snowreport', static::$validSnowreportUids);
|
$this->cleanupData('tx_epproducts_domain_model_snowreport', $this->validSnowreportUids);
|
||||||
|
$this->updateWebcamCounters();
|
||||||
|
|
||||||
$GLOBALS['BE_USER']->writelog(4, 0, 0, 0, sprintf('Snowreport XML import successful (%d records).', $count), []);
|
$this->logConversionWarnings();
|
||||||
|
$this->writelog(sprintf('Snowreport XML import successful (%d records).', $count));
|
||||||
|
|
||||||
return $count;
|
return $count;
|
||||||
}
|
}
|
||||||
@@ -205,40 +266,52 @@ class SnowreportImportService implements SingletonInterface
|
|||||||
$snowReportStoragePid = $this->getStoragePid();
|
$snowReportStoragePid = $this->getStoragePid();
|
||||||
foreach ($xml->children() as $item)
|
foreach ($xml->children() as $item)
|
||||||
{
|
{
|
||||||
$include = (string) $item->aktuell === 'true';
|
$include = $this->convertValue((string) $item->aktuell, self::TYPE_BOOL, 'aktuell');
|
||||||
$available = (string) $item->verf === 'true';
|
$available = $this->convertValue((string) $item->verf, self::TYPE_BOOL, 'verf');
|
||||||
$vendorUid = (int) $item->uid;
|
$vendorUid = (int) $item->uid;
|
||||||
$result = $this->webcamRepository->findByVendorUid($vendorUid);
|
|
||||||
// Skip invalid cams
|
$webcam = isset($this->webcamIndex[$vendorUid]) ? $this->webcamIndex[$vendorUid] : null;
|
||||||
if ($include === false && $result->count() === 0) {
|
|
||||||
|
// Skip cams that are neither current nor already known
|
||||||
|
if (null === $webcam && false === $include) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add new cam if not in db yet
|
// Add new cam if not in db yet
|
||||||
if ($result->count() === 0) {
|
if (null === $webcam) {
|
||||||
$webcam = new Webcam();
|
$webcam = new Webcam();
|
||||||
$webcam->setVendorUid($vendorUid);
|
$webcam->setVendorUid($vendorUid);
|
||||||
$webcam->setPid($snowReportStoragePid);
|
$webcam->setPid($snowReportStoragePid);
|
||||||
$webcam->setUrl((string) $item->url);
|
|
||||||
$webcam->setName((string) $item->dt);
|
|
||||||
$webcam->setAvailable($available);
|
|
||||||
$this->webcamRepository->add($webcam);
|
$this->webcamRepository->add($webcam);
|
||||||
|
$this->webcamIndex[$vendorUid] = $webcam;
|
||||||
$snowreport->addWebcam($webcam);
|
$snowreport->addWebcam($webcam);
|
||||||
} else {
|
|
||||||
// Update cam in db and set availability
|
|
||||||
$webcam = $result->getFirst();
|
|
||||||
$webcam->setUrl((string) $item->url);
|
|
||||||
$webcam->setName((string) $item->dt);
|
|
||||||
$webcam->setAvailable($available && $include);
|
|
||||||
}
|
}
|
||||||
static::$validWebcamUids[] = $vendorUid;
|
|
||||||
|
$webcam->setUrl((string) $item->url);
|
||||||
|
$webcam->setName((string) $item->dt);
|
||||||
|
$webcam->setAvailable($available && $include);
|
||||||
|
|
||||||
|
$this->validWebcamUids[] = $vendorUid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flags records that are no longer contained in the feed as deleted.
|
||||||
|
*
|
||||||
|
* @param string $table
|
||||||
|
* @param array $validUids
|
||||||
|
* @return int Number of records flagged
|
||||||
|
*/
|
||||||
public function cleanupData($table, array $validUids)
|
public function cleanupData($table, array $validUids)
|
||||||
{
|
{
|
||||||
/** @var ConnectionPool $connectionPool */
|
/** @var ConnectionPool $connectionPool */
|
||||||
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
|
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
|
||||||
$qb = $connectionPool->getQueryBuilderForTable($table);
|
$qb = $connectionPool->getQueryBuilderForTable($table);
|
||||||
|
// Hidden records are still managed by the import, only deleted ones are out of scope.
|
||||||
|
$qb->getRestrictions()
|
||||||
|
->removeAll()
|
||||||
|
->add(GeneralUtility::makeInstance(DeletedRestriction::class))
|
||||||
|
;
|
||||||
$result = $qb
|
$result = $qb
|
||||||
->select('vendor_uid')
|
->select('vendor_uid')
|
||||||
->from($table)
|
->from($table)
|
||||||
@@ -250,36 +323,293 @@ class SnowreportImportService implements SingletonInterface
|
|||||||
return (int)$row['vendor_uid'];
|
return (int)$row['vendor_uid'];
|
||||||
}, $result);
|
}, $result);
|
||||||
|
|
||||||
$obsoleteUids = array_diff($currentUids, $validUids);
|
$obsoleteUids = array_values(array_diff($currentUids, $validUids));
|
||||||
if (0 === count($obsoleteUids)) {
|
if (0 === count($obsoleteUids)) {
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$qb = $connectionPool->getQueryBuilderForTable($table);
|
$qb = $connectionPool->getQueryBuilderForTable($table);
|
||||||
$qb
|
|
||||||
->delete($table)
|
return (int) $qb
|
||||||
->where($qb->expr()->in('vendor_uid', $obsoleteUids))
|
->update($table)
|
||||||
|
->set('deleted', 1)
|
||||||
|
->set('tstamp', isset($GLOBALS['EXEC_TIME']) ? $GLOBALS['EXEC_TIME'] : time())
|
||||||
|
->where(
|
||||||
|
$qb->expr()->in(
|
||||||
|
'vendor_uid',
|
||||||
|
$qb->createNamedParameter($obsoleteUids, Connection::PARAM_INT_ARRAY)
|
||||||
|
)
|
||||||
|
)
|
||||||
->execute()
|
->execute()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recalculates the inline child counter on the snowreport records. Webcams are flagged as deleted
|
||||||
|
* with plain SQL, which bypasses the counter Extbase maintains for the relation.
|
||||||
|
*/
|
||||||
|
protected function updateWebcamCounters()
|
||||||
|
{
|
||||||
|
$connection = GeneralUtility::makeInstance(ConnectionPool::class)
|
||||||
|
->getConnectionForTable('tx_epproducts_domain_model_snowreport');
|
||||||
|
|
||||||
|
$connection->executeStatement(
|
||||||
|
'UPDATE tx_epproducts_domain_model_snowreport s SET s.webcams = ('
|
||||||
|
. ' SELECT COUNT(*) FROM tx_epproducts_domain_model_webcam w'
|
||||||
|
. ' WHERE w.snowreport = s.uid AND w.deleted = 0'
|
||||||
|
. ')'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Downloads the feed and replaces the local file only if the response is a usable XML document.
|
||||||
|
* The existing file is left untouched on any failure.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function downloadReportsXml()
|
public function downloadReportsXml()
|
||||||
{
|
{
|
||||||
$path = GeneralUtility::getFileAbsFileName(self::XML_FILE_PATH);
|
$path = GeneralUtility::getFileAbsFileName(self::XML_FILE_PATH);
|
||||||
$backupPath = $path . '.bak';
|
|
||||||
|
|
||||||
@copy($path, $backupPath);
|
try {
|
||||||
@unlink($path);
|
$xmlContent = $this->fetchReportsXml();
|
||||||
|
$this->parseReportsXml($xmlContent);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->writelog(sprintf(
|
||||||
|
'Snowreport XML download failed (%s). Keeping existing file.',
|
||||||
|
$e->getMessage()
|
||||||
|
));
|
||||||
|
|
||||||
$url = self::XML_FILE_URL;
|
return false;
|
||||||
exec("wget -O {$path} {$url}", $output, $return);
|
}
|
||||||
if (!$return) {
|
|
||||||
@unlink($backupPath);
|
// Write to a temporary file first and move it into place, so the feed is either the old or the
|
||||||
|
// new document, never a partially written one.
|
||||||
|
$temporaryPath = $path . '.tmp';
|
||||||
|
if (false === file_put_contents($temporaryPath, $xmlContent) || !rename($temporaryPath, $path)) {
|
||||||
|
@unlink($temporaryPath);
|
||||||
|
$this->writelog(sprintf('Snowreport XML could not be written to "%s".', $path));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
* @throws \RuntimeException
|
||||||
|
*/
|
||||||
|
protected function fetchReportsXml()
|
||||||
|
{
|
||||||
|
/** @var RequestFactory $requestFactory */
|
||||||
|
$requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
|
||||||
|
|
||||||
|
$response = $requestFactory->request(self::XML_FILE_URL, 'GET', [
|
||||||
|
'connect_timeout' => self::HTTP_CONNECT_TIMEOUT,
|
||||||
|
'timeout' => self::HTTP_TIMEOUT,
|
||||||
|
'headers' => [
|
||||||
|
'Accept' => 'application/xml, text/xml',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (200 !== $response->getStatusCode()) {
|
||||||
|
throw new \RuntimeException(
|
||||||
|
sprintf('unexpected status code %d', $response->getStatusCode()),
|
||||||
|
1758000001
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (string) $response->getBody();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parses the feed and rejects documents that are unusable. Without this an empty or truncated
|
||||||
|
* response would be imported as an empty feed, and the cleanup would flag every record as deleted.
|
||||||
|
*
|
||||||
|
* @param string $xmlContent
|
||||||
|
* @return \SimpleXMLElement
|
||||||
|
* @throws \RuntimeException
|
||||||
|
*/
|
||||||
|
protected function parseReportsXml($xmlContent)
|
||||||
|
{
|
||||||
|
if ('' === trim($xmlContent)) {
|
||||||
|
throw new \RuntimeException('response is empty', 1758000002);
|
||||||
|
}
|
||||||
|
|
||||||
|
$useInternalErrors = libxml_use_internal_errors(true);
|
||||||
|
libxml_clear_errors();
|
||||||
|
$xmlData = simplexml_load_string($xmlContent);
|
||||||
|
$errors = libxml_get_errors();
|
||||||
|
libxml_clear_errors();
|
||||||
|
libxml_use_internal_errors($useInternalErrors);
|
||||||
|
|
||||||
|
if (false === $xmlData) {
|
||||||
|
$message = count($errors) > 0 ? trim($errors[0]->message) : 'unknown error';
|
||||||
|
throw new \RuntimeException(sprintf('response is not valid XML (%s)', $message), 1758000003);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 === $xmlData->schneemeldung->count()) {
|
||||||
|
throw new \RuntimeException('response contains no <schneemeldung> elements', 1758000004);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $xmlData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads existing records once, keyed by vendor_uid. Replaces a repository lookup per feed record.
|
||||||
|
*/
|
||||||
|
protected function buildIndexes()
|
||||||
|
{
|
||||||
|
$this->snowreportIndex = [];
|
||||||
|
foreach ($this->snowreportRepository->findAll() as $snowreport) {
|
||||||
|
$this->snowreportIndex[(int) $snowreport->getVendorUid()] = $snowreport;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->webcamIndex = [];
|
||||||
|
foreach ($this->webcamRepository->findAll() as $webcam) {
|
||||||
|
$this->webcamIndex[(int) $webcam->getVendorUid()] = $webcam;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $vendorUid
|
||||||
|
* @return Snowreport
|
||||||
|
*/
|
||||||
|
protected function getSnowreport($vendorUid)
|
||||||
|
{
|
||||||
|
if (isset($this->snowreportIndex[$vendorUid])) {
|
||||||
|
return $this->snowreportIndex[$vendorUid];
|
||||||
|
}
|
||||||
|
|
||||||
|
$snowreport = new Snowreport();
|
||||||
|
$snowreport->setVendorUid($vendorUid);
|
||||||
|
$this->snowreportRepository->add($snowreport);
|
||||||
|
$this->snowreportIndex[$vendorUid] = $snowreport;
|
||||||
|
|
||||||
|
return $snowreport;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The service is a singleton, so per-import state must not survive into the next run.
|
||||||
|
*/
|
||||||
|
protected function resetImportState()
|
||||||
|
{
|
||||||
|
$this->validSnowreportUids = [];
|
||||||
|
$this->validWebcamUids = [];
|
||||||
|
$this->conversionWarnings = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a raw XML string to the declared type of the field.
|
||||||
|
*
|
||||||
|
* @param string $raw
|
||||||
|
* @param string $type
|
||||||
|
* @param string $key XML element name, for logging
|
||||||
|
* @return int|string|bool
|
||||||
|
*/
|
||||||
|
protected function convertValue($raw, $type, $key)
|
||||||
|
{
|
||||||
|
$raw = trim($raw);
|
||||||
|
|
||||||
|
// The feed delivers empty elements for data that is not available yet (snow levels out of
|
||||||
|
// season, for example). That is expected, not an error.
|
||||||
|
if ($raw === '') {
|
||||||
|
return $this->getEmptyValue($type);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($type) {
|
||||||
|
case self::TYPE_STRING:
|
||||||
|
return $raw;
|
||||||
|
|
||||||
|
case self::TYPE_INT:
|
||||||
|
if (!preg_match('/^-?\d+$/', $raw)) {
|
||||||
|
$this->addConversionWarning(sprintf('<%s> expected an integer, got "%s".', $key, $raw));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int) $raw;
|
||||||
|
|
||||||
|
case self::TYPE_BOOL:
|
||||||
|
$normalized = strtolower($raw);
|
||||||
|
if (!array_key_exists($normalized, static::$booleanMap)) {
|
||||||
|
$this->addConversionWarning(sprintf('<%s> expected a boolean, got "%s".', $key, $raw));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return static::$booleanMap[$normalized];
|
||||||
|
|
||||||
|
case self::TYPE_DATE:
|
||||||
|
if (!preg_match('/^\d{4}-\d{2}-\d{2}([ T]\d{2}:\d{2}(:\d{2})?)?$/', $raw)) {
|
||||||
|
$this->addConversionWarning(sprintf('<%s> expected a date, got "%s".', $key, $raw));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$date = new \DateTime($raw);
|
||||||
|
|
||||||
|
return $date->getTimestamp();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new \InvalidArgumentException(sprintf('Unknown field type "%s" declared for <%s>.', $type, $key), 1758000000);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $type
|
||||||
|
* @return int|string|bool
|
||||||
|
*/
|
||||||
|
protected function getEmptyValue($type)
|
||||||
|
{
|
||||||
|
if ($type === self::TYPE_STRING) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
if ($type === self::TYPE_BOOL) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $message
|
||||||
|
*/
|
||||||
|
protected function addConversionWarning($message)
|
||||||
|
{
|
||||||
|
// Keyed to keep one entry per distinct problem instead of one per record.
|
||||||
|
$this->conversionWarnings[$message] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes a single summary entry to the log if the feed contained unexpected values.
|
||||||
|
*/
|
||||||
|
protected function logConversionWarnings()
|
||||||
|
{
|
||||||
|
if (0 === count($this->conversionWarnings)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['BE_USER']->writelog(4, 0, 0, 0, 'Snowreport XML download failed. Keeping existing file.', []);
|
$messages = array_keys($this->conversionWarnings);
|
||||||
@rename($backupPath, $path);
|
$this->writelog(sprintf(
|
||||||
|
'Snowreport XML import: %d unexpected value(s) in feed: %s',
|
||||||
|
count($messages),
|
||||||
|
implode(' | ', array_slice($messages, 0, 10))
|
||||||
|
));
|
||||||
|
|
||||||
|
$this->conversionWarnings = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The scheduler task and the backend module provide a backend user, the CLI command does not.
|
||||||
|
*
|
||||||
|
* @param string $message
|
||||||
|
*/
|
||||||
|
protected function writelog($message)
|
||||||
|
{
|
||||||
|
if (isset($GLOBALS['BE_USER']) && is_object($GLOBALS['BE_USER'])) {
|
||||||
|
$GLOBALS['BE_USER']->writelog(4, 0, 0, 0, $message, []);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getStoragePid()
|
public function getStoragePid()
|
||||||
|
|||||||
-144
@@ -1,144 +0,0 @@
|
|||||||
<?php
|
|
||||||
return [
|
|
||||||
'ctrl' => [
|
|
||||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_roommapping',
|
|
||||||
'label' => 'code',
|
|
||||||
'prependAtCopy' => '[COPY %s]',
|
|
||||||
'default_sortby' => 'ORDER BY code',
|
|
||||||
'tstamp' => 'tstamp',
|
|
||||||
'crdate' => 'crdate',
|
|
||||||
'cruser_id' => 'cruser_id',
|
|
||||||
'dividers2tabs' => true,
|
|
||||||
'versioningWS' => false,
|
|
||||||
'languageField' => 'sys_language_uid',
|
|
||||||
'transOrigPointerField' => 'l10n_parent',
|
|
||||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
|
||||||
'delete' => 'deleted',
|
|
||||||
'enablecolumns' => [
|
|
||||||
'disabled' => 'hidden',
|
|
||||||
'starttime' => 'starttime',
|
|
||||||
'endtime' => 'endtime',
|
|
||||||
],
|
|
||||||
'searchFields' => 'code',
|
|
||||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
|
||||||
],
|
|
||||||
'types' => [
|
|
||||||
'1' => ['showitem' => 'code, type'],
|
|
||||||
],
|
|
||||||
'palettes' => [
|
|
||||||
'1' => ['showitem' => ''],
|
|
||||||
],
|
|
||||||
'columns' => [
|
|
||||||
|
|
||||||
'sys_language_uid' => [
|
|
||||||
'exclude' => 0,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'select',
|
|
||||||
'default' => 0,
|
|
||||||
'renderType' => 'selectSingle',
|
|
||||||
'foreign_table' => 'sys_language',
|
|
||||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
|
||||||
'items' => [
|
|
||||||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
|
|
||||||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'l10n_parent' => [
|
|
||||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'select',
|
|
||||||
'default' => 0,
|
|
||||||
'renderType' => 'selectSingle',
|
|
||||||
'items' => [
|
|
||||||
['', 0],
|
|
||||||
],
|
|
||||||
'foreign_table' => 'tx_epproducts_domain_model_roommapping',
|
|
||||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_roommapping.pid=###CURRENT_PID### AND tx_epproducts_domain_model_roommapping.sys_language_uid IN (-1,0)',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'l10n_diffsource' => [
|
|
||||||
'config' => [
|
|
||||||
'type' => 'passthrough',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
't3ver_label' => [
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'input',
|
|
||||||
'size' => 30,
|
|
||||||
'max' => 255,
|
|
||||||
]
|
|
||||||
],
|
|
||||||
|
|
||||||
'hidden' => [
|
|
||||||
'exclude' => 0,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'check',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'starttime' => [
|
|
||||||
'exclude' => 0,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'input',
|
|
||||||
'size' => 13,
|
|
||||||
'eval' => 'datetime',
|
|
||||||
'checkbox' => 0,
|
|
||||||
'default' => 0,
|
|
||||||
'behaviour' => [
|
|
||||||
'allowLanguageSynchronization' => true,
|
|
||||||
],
|
|
||||||
'renderType' => 'inputDateTime',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'endtime' => [
|
|
||||||
'exclude' => 0,
|
|
||||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'input',
|
|
||||||
'size' => 13,
|
|
||||||
'eval' => 'datetime',
|
|
||||||
'checkbox' => 0,
|
|
||||||
'default' => 0,
|
|
||||||
'behaviour' => [
|
|
||||||
'allowLanguageSynchronization' => true,
|
|
||||||
],
|
|
||||||
'renderType' => 'inputDateTime',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
'code' => [
|
|
||||||
'exclude' => 0,
|
|
||||||
'label' => 'Code',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'input',
|
|
||||||
'size' => 30,
|
|
||||||
'eval' => 'trim'
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'type' => [
|
|
||||||
'exclude' => 0,
|
|
||||||
'label' => 'Typ',
|
|
||||||
'config' => [
|
|
||||||
'type' => 'select',
|
|
||||||
'renderType' => 'selectSingle',
|
|
||||||
'items' => [
|
|
||||||
['Einzelzimmer', \EP\EpProducts\Domain\Model\Room::ROOM_TYPE_FOR_ONE],
|
|
||||||
['Doppelzimmer und Apartm. f. 2 Pers.', \EP\EpProducts\Domain\Model\Room::ROOM_TYPE_FOR_TWO],
|
|
||||||
['Zimmer und Apartm. f. 3 Pers.', \EP\EpProducts\Domain\Model\Room::ROOM_TYPE_FOR_THREE],
|
|
||||||
['Zimmer und Apartm. f. 4 Pers.', \EP\EpProducts\Domain\Model\Room::ROOM_TYPE_FOR_FOUR],
|
|
||||||
['Zimmer und Apartm. mit Anderen', \EP\EpProducts\Domain\Model\Room::ROOM_TYPE_WITH_OTHERS],
|
|
||||||
['weitere Zimmer und Apartments', \EP\EpProducts\Domain\Model\Room::ROOM_TYPE_OTHER],
|
|
||||||
],
|
|
||||||
'size' => 1,
|
|
||||||
'minItems' => 1,
|
|
||||||
'maxItems' => 1
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
];
|
|
||||||
@@ -39,9 +39,6 @@
|
|||||||
<trans-unit id="tx_epproducts_domain_model_teammember">
|
<trans-unit id="tx_epproducts_domain_model_teammember">
|
||||||
<source>Mitarbeiter/Teamer</source>
|
<source>Mitarbeiter/Teamer</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_epproducts_domain_model_roommapping">
|
|
||||||
<source>Zimmermapping</source>
|
|
||||||
</trans-unit>
|
|
||||||
<trans-unit id="tx_epproducts_domain_model_journey">
|
<trans-unit id="tx_epproducts_domain_model_journey">
|
||||||
<source>Anreise</source>
|
<source>Anreise</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|||||||
@@ -494,47 +494,6 @@ CREATE TABLE tx_epproducts_domain_model_room
|
|||||||
KEY constraints (date, type)
|
KEY constraints (date, type)
|
||||||
);
|
);
|
||||||
|
|
||||||
#
|
|
||||||
# Table structure for table 'tx_epproducts_domain_model_roommapping'
|
|
||||||
#
|
|
||||||
CREATE TABLE tx_epproducts_domain_model_roommapping
|
|
||||||
(
|
|
||||||
|
|
||||||
uid int(11) NOT NULL auto_increment,
|
|
||||||
pid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
code varchar(255) DEFAULT '' NOT NULL,
|
|
||||||
type int(11) DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
crdate int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
starttime int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
endtime int(11) unsigned DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
t3ver_oid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_id int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_label varchar(255) DEFAULT '' NOT NULL,
|
|
||||||
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_stage int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_count int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
|
|
||||||
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
sys_language_uid int(11) DEFAULT '0' NOT NULL,
|
|
||||||
l10n_parent int(11) DEFAULT '0' NOT NULL,
|
|
||||||
l10n_diffsource mediumblob,
|
|
||||||
|
|
||||||
PRIMARY KEY (uid),
|
|
||||||
KEY parent (pid),
|
|
||||||
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
|
|
||||||
KEY language (l10n_parent, sys_language_uid)
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Table structure for table 'tx_epproducts_domain_model_concept'
|
# Table structure for table 'tx_epproducts_domain_model_concept'
|
||||||
#
|
#
|
||||||
@@ -1098,6 +1057,7 @@ CREATE TABLE tx_epproducts_domain_model_snowreport
|
|||||||
|
|
||||||
PRIMARY KEY (uid),
|
PRIMARY KEY (uid),
|
||||||
KEY parent (pid),
|
KEY parent (pid),
|
||||||
|
KEY vendor_uid (vendor_uid),
|
||||||
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
|
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
|
||||||
KEY language (l10n_parent, sys_language_uid)
|
KEY language (l10n_parent, sys_language_uid)
|
||||||
|
|
||||||
@@ -1142,6 +1102,7 @@ CREATE TABLE tx_epproducts_domain_model_webcam
|
|||||||
|
|
||||||
PRIMARY KEY (uid),
|
PRIMARY KEY (uid),
|
||||||
KEY parent (pid),
|
KEY parent (pid),
|
||||||
|
KEY vendor_uid (vendor_uid),
|
||||||
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
|
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
|
||||||
KEY language (l10n_parent, sys_language_uid)
|
KEY language (l10n_parent, sys_language_uid)
|
||||||
|
|
||||||
|
|||||||
@@ -4,25 +4,43 @@ namespace EP\EpTheme\Form;
|
|||||||
|
|
||||||
use TYPO3\CMS\Core\Log\LogManager;
|
use TYPO3\CMS\Core\Log\LogManager;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||||
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
|
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
|
||||||
|
|
||||||
abstract class AbstractMappedFinisher extends AbstractFinisher
|
abstract class AbstractMappedFinisher extends AbstractFinisher
|
||||||
{
|
{
|
||||||
protected function buildPayload(): array
|
/**
|
||||||
|
* Resolves the 'mapping' option into remote name => local form element identifier.
|
||||||
|
*/
|
||||||
|
protected function parseMapping(): array
|
||||||
{
|
{
|
||||||
$values = [];
|
$mappings = [];
|
||||||
$formValues = $this->finisherContext->getFormValues();
|
|
||||||
$mappingOption = (string)$this->parseOption('mapping');
|
$mappingOption = (string)$this->parseOption('mapping');
|
||||||
$mappings = GeneralUtility::trimExplode(',', $mappingOption, true);
|
|
||||||
|
|
||||||
foreach ($mappings as $mapping) {
|
foreach (GeneralUtility::trimExplode(',', $mappingOption, true) as $mapping) {
|
||||||
$parts = GeneralUtility::trimExplode(':', $mapping, true, 2);
|
$parts = GeneralUtility::trimExplode(':', $mapping, true, 2);
|
||||||
if (2 !== count($parts)) {
|
if (2 !== count($parts)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
[$remote, $local] = $parts;
|
[$remote, $local] = $parts;
|
||||||
if ('' === $remote || '' === $local || false === array_key_exists($local, $formValues)) {
|
if ('' === $remote || '' === $local) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$mappings[$remote] = $local;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $mappings;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function buildPayload(): array
|
||||||
|
{
|
||||||
|
$values = [];
|
||||||
|
$formValues = $this->finisherContext->getFormValues();
|
||||||
|
|
||||||
|
foreach ($this->parseMapping() as $remote => $local) {
|
||||||
|
if (false === array_key_exists($local, $formValues)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,6 +50,95 @@ abstract class AbstractMappedFinisher extends AbstractFinisher
|
|||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Every submitted value that the mapping does not already cover, keyed by the element label
|
||||||
|
* as the editor sees it in the form editor. Forms built in the backend use generated
|
||||||
|
* identifiers (text-1, singleselect-2, ...) that carry no meaning and cannot be renamed
|
||||||
|
* without breaking existing finisher options, so the label is the only stable description
|
||||||
|
* of what was asked.
|
||||||
|
*
|
||||||
|
* The label is taken from the form definition, not through TranslationService: a translated
|
||||||
|
* label would change the payload keys with the site language, and these keys are stored.
|
||||||
|
*/
|
||||||
|
protected function buildLabeledValues(): array
|
||||||
|
{
|
||||||
|
$formValues = $this->finisherContext->getFormValues();
|
||||||
|
$skip = array_merge(
|
||||||
|
array_values($this->parseMapping()),
|
||||||
|
GeneralUtility::trimExplode(',', (string)$this->parseOption('exclude'), true)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Keyed by identifier in form order, and contains only real form elements - iterating
|
||||||
|
// this instead of the form values keeps the collection in the order of the form and
|
||||||
|
// leaves out anything that is not an element the visitor filled in.
|
||||||
|
$elements = $this->finisherContext->getFormRuntime()->getFormDefinition()->getElements();
|
||||||
|
|
||||||
|
$collected = [];
|
||||||
|
foreach ($elements as $identifier => $element) {
|
||||||
|
if (true === in_array($identifier, $skip, true) || false === array_key_exists($identifier, $formValues)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$value = $this->normalizeValue($formValues[$identifier], $identifier);
|
||||||
|
if (null === $value || '' === $value || [] === $value) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$label = trim($element->getLabel());
|
||||||
|
if ('' === $label) {
|
||||||
|
$label = $identifier;
|
||||||
|
}
|
||||||
|
if (true === array_key_exists($label, $collected)) {
|
||||||
|
$label .= ' (' . $identifier . ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$collected[$label] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $collected;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return mixed null when the value has no JSON representation
|
||||||
|
*/
|
||||||
|
protected function normalizeValue($value, string $identifier)
|
||||||
|
{
|
||||||
|
if (true === is_array($value)) {
|
||||||
|
$normalized = [];
|
||||||
|
foreach ($value as $item) {
|
||||||
|
$item = $this->normalizeValue($item, $identifier);
|
||||||
|
if (null !== $item && '' !== $item) {
|
||||||
|
$normalized[] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $normalized;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value instanceof \DateTimeInterface) {
|
||||||
|
return $value->format('Y-m-d');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value instanceof FileReference) {
|
||||||
|
$resource = $value->getOriginalResource();
|
||||||
|
|
||||||
|
return null !== $resource ? $resource->getName() : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (true === is_object($value)) {
|
||||||
|
$this->logWarning('Form value skipped while collecting labeled values: unsupported type.', [
|
||||||
|
'element' => $identifier,
|
||||||
|
'class' => get_class($value),
|
||||||
|
]);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
protected function logWarning(string $message, array $context = []): void
|
protected function logWarning(string $message, array $context = []): void
|
||||||
{
|
{
|
||||||
GeneralUtility::makeInstance(LogManager::class)
|
GeneralUtility::makeInstance(LogManager::class)
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace EP\EpTheme\Form;
|
||||||
|
|
||||||
|
use EP\EpProducts\MyEP\ApiClient;
|
||||||
|
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||||
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
|
||||||
|
class ApplicationApiFinisher extends AbstractMappedFinisher
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var ApiClient
|
||||||
|
*/
|
||||||
|
protected $apiClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ApiClient $apiClient
|
||||||
|
*/
|
||||||
|
public function injectApiClient(ApiClient $apiClient)
|
||||||
|
{
|
||||||
|
$this->apiClient = $apiClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function executeInternal()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$payload = $this->buildPayload();
|
||||||
|
if ([] === $payload) {
|
||||||
|
$this->logWarning('Application API finisher skipped: the mapping produced no values.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$formDefinition = $this->finisherContext->getFormRuntime()->getFormDefinition();
|
||||||
|
$formLabel = trim($formDefinition->getLabel());
|
||||||
|
|
||||||
|
$payload['form'] = $formDefinition->getIdentifier();
|
||||||
|
// The name the editor gave the form, so the receiving side can label a submission
|
||||||
|
// without keeping a list of identifiers. Taken from the definition rather than
|
||||||
|
// through TranslationService: a translated label would differ per site language.
|
||||||
|
$payload['formLabel'] = '' !== $formLabel ? $formLabel : $formDefinition->getIdentifier();
|
||||||
|
$payload['submittedAt'] = (new \DateTimeImmutable())->format(\DateTimeInterface::ATOM);
|
||||||
|
$payload = array_merge($payload, $this->resolvePageContext());
|
||||||
|
$payload['details'] = $this->buildLabeledValues();
|
||||||
|
|
||||||
|
$this->apiClient->submitApplication($payload);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
$this->logWarning('Application API finisher request failed.', [
|
||||||
|
'exception' => $e,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The page the form was submitted from. The URL is generated through the site router in the
|
||||||
|
* visitor's language, the same way AddReferrerFinisher does it, so it is the page's canonical
|
||||||
|
* URL rather than the submit request with its form arguments attached.
|
||||||
|
*/
|
||||||
|
private function resolvePageContext(): array
|
||||||
|
{
|
||||||
|
if (false === isset($GLOBALS['TSFE']) || 0 === (int)$GLOBALS['TSFE']->id) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$pageUid = (int)$GLOBALS['TSFE']->id;
|
||||||
|
$context = ['pageUid' => $pageUid];
|
||||||
|
|
||||||
|
try {
|
||||||
|
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($pageUid);
|
||||||
|
$context['pageUrl'] = (string)$site->getRouter()->generateUri($pageUid, [
|
||||||
|
'_language' => $GLOBALS['TSFE']->getLanguage(),
|
||||||
|
]);
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
// An unroutable page must not cost the submission, so the uid is sent without a URL.
|
||||||
|
$this->logWarning('Application API finisher could not resolve the page URL.', [
|
||||||
|
'pageUid' => $pageUid,
|
||||||
|
'exception' => $e,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $context;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace EP\EpTheme\ViewHelpers;
|
|
||||||
|
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
||||||
use TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper;
|
|
||||||
|
|
||||||
class LazyLoadImageViewHelper extends ImageViewHelper
|
|
||||||
{
|
|
||||||
public function initializeArguments()
|
|
||||||
{
|
|
||||||
parent::initializeArguments();
|
|
||||||
$this->registerArgument('loaderimg', 'string', '', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function render(): string
|
|
||||||
{
|
|
||||||
parent::render();
|
|
||||||
|
|
||||||
$src = $this->tag->getAttribute('src');
|
|
||||||
$this->tag->removeAttribute('src');
|
|
||||||
$this->tag->addAttribute('data', ['src' => $src], false);
|
|
||||||
|
|
||||||
if (isset($this->arguments['loaderimg'])) {
|
|
||||||
$loaderImage = $this->imageService->getImage($this->arguments['loaderimg'], null, false);
|
|
||||||
$processingInstructions = [
|
|
||||||
'width' => $this->arguments['width'],
|
|
||||||
'height' => $this->arguments['height'],
|
|
||||||
'minWidth' => $this->arguments['minWidth'],
|
|
||||||
'minHeight' => $this->arguments['minHeight'],
|
|
||||||
'maxWidth' => $this->arguments['maxWidth'],
|
|
||||||
'maxHeight' => $this->arguments['maxHeight'],
|
|
||||||
];
|
|
||||||
$processedLoaderImage = $this->imageService->applyProcessingInstructions($loaderImage, $processingInstructions);
|
|
||||||
$loaderImageUri = $this->imageService->getImageUri($processedLoaderImage, $this->arguments['absolute']);
|
|
||||||
$this->tag->addAttribute('src', $loaderImageUri);
|
|
||||||
}
|
|
||||||
|
|
||||||
$classes = $this->tag->getAttribute('class');
|
|
||||||
$classItems = GeneralUtility::trimExplode(' ', $classes, true);
|
|
||||||
$classItems[] = 'lazyload';
|
|
||||||
$classes = implode(' ', array_unique($classItems));
|
|
||||||
$this->tag->addAttribute('class', $classes);
|
|
||||||
// ensure a11y compliance
|
|
||||||
$this->tag->removeAttribute('title');
|
|
||||||
|
|
||||||
return $this->tag->render();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+3
@@ -17,5 +17,8 @@ plugin.tx_epproducts {
|
|||||||
ratingWidgetLabel = {$plugin.tx_eptheme.settings.ratingWidgetLabel}
|
ratingWidgetLabel = {$plugin.tx_eptheme.settings.ratingWidgetLabel}
|
||||||
skipassPageUid = {$plugin.tx_eptheme.settings.skipassPageUid}
|
skipassPageUid = {$plugin.tx_eptheme.settings.skipassPageUid}
|
||||||
conceptsPageUid = {$plugin.tx_eptheme.settings.conceptsPageUid}
|
conceptsPageUid = {$plugin.tx_eptheme.settings.conceptsPageUid}
|
||||||
|
mapTileUrl = {$plugin.tx_eptheme.settings.mapTileUrl}
|
||||||
|
mapApiKey = {$plugin.tx_eptheme.settings.mapApiKey}
|
||||||
|
mapAttribution = {$plugin.tx_eptheme.settings.mapAttribution}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -7,5 +7,8 @@ lib.contentElement {
|
|||||||
settings < plugin.tx_eptheme.settings
|
settings < plugin.tx_eptheme.settings
|
||||||
settings.themekey = {$plugin.tx_eptheme.settings.themekey}
|
settings.themekey = {$plugin.tx_eptheme.settings.themekey}
|
||||||
settings.defaultAjaxUid = {$plugin.tx_eptheme.settings.defaultAjaxUid}
|
settings.defaultAjaxUid = {$plugin.tx_eptheme.settings.defaultAjaxUid}
|
||||||
|
settings.mapTileUrl = {$plugin.tx_eptheme.settings.mapTileUrl}
|
||||||
|
settings.mapApiKey = {$plugin.tx_eptheme.settings.mapApiKey}
|
||||||
|
settings.mapAttribution = {$plugin.tx_eptheme.settings.mapAttribution}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,3 +15,10 @@ module.tx_form.settings.yamlConfigurations {
|
|||||||
1630994710 = EXT:ep_theme/Configuration/Yaml/FormsBase.yaml
|
1630994710 = EXT:ep_theme/Configuration/Yaml/FormsBase.yaml
|
||||||
1630994711 = EXT:ep_theme/Configuration/Yaml/FormFinishersBackend.yaml
|
1630994711 = EXT:ep_theme/Configuration/Yaml/FormFinishersBackend.yaml
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugin.tx_bwcaptcha.settings {
|
||||||
|
charset = abcdefghjkmnpqrtuvwxy34679
|
||||||
|
length = 4
|
||||||
|
width = 220
|
||||||
|
height = 60
|
||||||
|
}
|
||||||
|
|||||||
+12
-2
@@ -1,10 +1,20 @@
|
|||||||
config.tx_replacer {
|
config.tx_replacer {
|
||||||
enable_regex = 1
|
enable_regex = 1
|
||||||
|
|
||||||
|
# The quote character is captured rather than matched literally, because the
|
||||||
|
# @font-face block in Page/Main.typoscript writes its url() values with single
|
||||||
|
# quotes - anchoring on `"` alone would skip every font.
|
||||||
|
# typo3conf is scoped to ep_theme/Resources/Public on purpose: it keeps other
|
||||||
|
# extensions, Configuration/ and Resources/Private/ out of the CDN.
|
||||||
|
# The icon sprite is excluded: SVG <use href="...#icon"> may only reference a
|
||||||
|
# document from the same origin - browsers block an external sprite on the CDN
|
||||||
|
# host outright, and no CORS header on bunny.net changes that. It has to stay
|
||||||
|
# on the origin domain or every icon renders empty.
|
||||||
search {
|
search {
|
||||||
10 = /"\/?(fileadmin|typo3temp|uploads)/
|
10 = /(["'])\/?(fileadmin|typo3temp|uploads|typo3conf\/ext\/ep_theme\/Resources\/Public(?!\/images\/icons_sprite\.svg))/
|
||||||
}
|
}
|
||||||
|
|
||||||
replace {
|
replace {
|
||||||
10 = "https://cdn.ep-reisen.de/$1
|
10 = $1https://cdn.ep-reisen.de/$2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -5,5 +5,6 @@ plugin.tx_typo3encore {
|
|||||||
builds {
|
builds {
|
||||||
EpThemeConfig = EXT:ep_theme/Resources/Public
|
EpThemeConfig = EXT:ep_theme/Resources/Public
|
||||||
}
|
}
|
||||||
|
preload.enable = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,6 +75,13 @@ plugin.tx_eptheme {
|
|||||||
# cat=eptheme/200/350; type=string; label='Corona Updates' page UID
|
# cat=eptheme/200/350; type=string; label='Corona Updates' page UID
|
||||||
coronaUpdatesPageUid =
|
coronaUpdatesPageUid =
|
||||||
|
|
||||||
|
# cat=eptheme/500/100; type=string; label=Map tile URL template (without apiKey)
|
||||||
|
mapTileUrl = https://api-eu.geoapify.com/v1/tile/osm-bright/{z}/{x}/{y}.png
|
||||||
|
# cat=eptheme/500/110; type=string; label=Map tile API key (Geoapify), restricted by referrer
|
||||||
|
mapApiKey =
|
||||||
|
# cat=eptheme/500/120; type=string; label=Map attribution (Geoapify and OpenStreetMap credits are both required)
|
||||||
|
mapAttribution = Powered by <a href="https://www.geoapify.com/">Geoapify</a> | © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors
|
||||||
|
|
||||||
# cat=eptheme/400/100; type=string; label=Phone number general
|
# cat=eptheme/400/100; type=string; label=Phone number general
|
||||||
phoneNumber = 0221 - 272 276 0
|
phoneNumber = 0221 - 272 276 0
|
||||||
# cat=eptheme/400/110; type=string; label=Phone number WhatsApp
|
# cat=eptheme/400/110; type=string; label=Phone number WhatsApp
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ TYPO3:
|
|||||||
finishersDefinition:
|
finishersDefinition:
|
||||||
BpnApiFinisher:
|
BpnApiFinisher:
|
||||||
implementationClassName: 'EP\EpTheme\Form\BpnApiFinisher'
|
implementationClassName: 'EP\EpTheme\Form\BpnApiFinisher'
|
||||||
|
ApplicationApiFinisher:
|
||||||
|
implementationClassName: 'EP\EpTheme\Form\ApplicationApiFinisher'
|
||||||
WebhookFinisher:
|
WebhookFinisher:
|
||||||
implementationClassName: 'EP\EpTheme\Form\WebhookFinisher'
|
implementationClassName: 'EP\EpTheme\Form\WebhookFinisher'
|
||||||
AddReferrerFinisher:
|
AddReferrerFinisher:
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ TYPO3:
|
|||||||
1000:
|
1000:
|
||||||
value: 'BpnApiFinisher'
|
value: 'BpnApiFinisher'
|
||||||
label: 'BusPro Finisher'
|
label: 'BusPro Finisher'
|
||||||
|
1010:
|
||||||
|
value: 'ApplicationApiFinisher'
|
||||||
|
label: 'Application Finisher'
|
||||||
1050:
|
1050:
|
||||||
value: 'WebhookFinisher'
|
value: 'WebhookFinisher'
|
||||||
label: 'Webhook Finisher'
|
label: 'Webhook Finisher'
|
||||||
@@ -34,6 +37,25 @@ TYPO3:
|
|||||||
propertyPath: 'options.mapping'
|
propertyPath: 'options.mapping'
|
||||||
propertyValidators:
|
propertyValidators:
|
||||||
10: 'NotEmpty'
|
10: 'NotEmpty'
|
||||||
|
1010:
|
||||||
|
identifier: 'ApplicationApiFinisher'
|
||||||
|
editors:
|
||||||
|
__inheritances:
|
||||||
|
10: 'TYPO3.CMS.Form.mixins.formElementMixins.BaseCollectionEditorsMixin'
|
||||||
|
100:
|
||||||
|
label: 'Application Finisher'
|
||||||
|
110:
|
||||||
|
identifier: 'mapping'
|
||||||
|
templateName: 'Inspector-TextEditor'
|
||||||
|
label: 'Mapping'
|
||||||
|
propertyPath: 'options.mapping'
|
||||||
|
propertyValidators:
|
||||||
|
10: 'NotEmpty'
|
||||||
|
120:
|
||||||
|
identifier: 'exclude'
|
||||||
|
templateName: 'Inspector-TextEditor'
|
||||||
|
label: 'Exclude'
|
||||||
|
propertyPath: 'options.exclude'
|
||||||
1050:
|
1050:
|
||||||
identifier: 'WebhookFinisher'
|
identifier: 'WebhookFinisher'
|
||||||
editors:
|
editors:
|
||||||
@@ -70,6 +92,13 @@ TYPO3:
|
|||||||
predefinedDefaults:
|
predefinedDefaults:
|
||||||
options:
|
options:
|
||||||
mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,phone:telephone-1'
|
mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,phone:telephone-1'
|
||||||
|
ApplicationApiFinisher:
|
||||||
|
formEditor:
|
||||||
|
iconIdentifier: 'form-finisher'
|
||||||
|
predefinedDefaults:
|
||||||
|
options:
|
||||||
|
mapping: 'firstName:text-1,lastName:text-2,email:email-1,phone:telephone-1'
|
||||||
|
exclude: 'captcha,privacypolicyaccepted'
|
||||||
WebhookFinisher:
|
WebhookFinisher:
|
||||||
formEditor:
|
formEditor:
|
||||||
iconIdentifier: 'form-finisher'
|
iconIdentifier: 'form-finisher'
|
||||||
|
|||||||
@@ -11,6 +11,14 @@ TYPO3:
|
|||||||
options:
|
options:
|
||||||
identifier: 'BpnApiFinisher'
|
identifier: 'BpnApiFinisher'
|
||||||
mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,phone:telephone-1'
|
mapping: 'lastName:text-1,firstName:text-2,gender:singleselect-1,email:email-1,phone:telephone-1'
|
||||||
|
ApplicationApiFinisher:
|
||||||
|
implementationClassName: 'EP\EpTheme\Form\ApplicationApiFinisher'
|
||||||
|
formEditor:
|
||||||
|
label: 'Application Finisher'
|
||||||
|
options:
|
||||||
|
identifier: 'ApplicationApiFinisher'
|
||||||
|
mapping: 'firstName:text-1,lastName:text-2,email:email-1,phone:telephone-1'
|
||||||
|
exclude: 'captcha,privacypolicyaccepted'
|
||||||
WebhookFinisher:
|
WebhookFinisher:
|
||||||
implementationClassName: 'EP\EpTheme\Form\WebhookFinisher'
|
implementationClassName: 'EP\EpTheme\Form\WebhookFinisher'
|
||||||
formEditor:
|
formEditor:
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
// Import dependencies
|
|
||||||
require('lazysizes')
|
|
||||||
require('lazysizes/plugins/unveilhooks/ls.unveilhooks')
|
|
||||||
// require('picturefill')
|
|
||||||
|
|
||||||
// Polyfills
|
// Polyfills
|
||||||
// import smoothscroll from 'smoothscroll-polyfill'
|
// import smoothscroll from 'smoothscroll-polyfill'
|
||||||
// smoothscroll.polyfill()
|
// smoothscroll.polyfill()
|
||||||
|
|||||||
-791
@@ -1,791 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="relative">
|
|
||||||
<div class="mb-8"
|
|
||||||
v-show="!submitted">
|
|
||||||
<label class="mb-2 font-bold">
|
|
||||||
Zeitraum
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-field"
|
|
||||||
placeholder="von... bis" ref="picker"/>
|
|
||||||
<p class="text-sm mt-2" v-if="mainSeasonFrom && mainSeasonTo">
|
|
||||||
in der Hauptsaison {{ mainSeasonFrom }}-{{ mainSeasonTo }} mind. {{ minBookingDays }} Tage
|
|
||||||
</p>
|
|
||||||
<p class="text-sm italic mt-2"
|
|
||||||
v-show="nightsCount === 1">
|
|
||||||
Einzelne Nächte sind nur auf Anfrage buchbar
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="mb-8 grid sm:grid-cols-2 gap-8"
|
|
||||||
v-show="!submitted">
|
|
||||||
<div>
|
|
||||||
<label class="mb-2 font-bold">
|
|
||||||
Personenzahl
|
|
||||||
</label>
|
|
||||||
<input type="number"
|
|
||||||
class="form-field"
|
|
||||||
min="30"
|
|
||||||
v-model.number="selectedPax"
|
|
||||||
@change="onPaxUpdated()"
|
|
||||||
v-show="nightsCount > 0"/>
|
|
||||||
<p class="text-sm italic"
|
|
||||||
v-show="nightsCount === 0">
|
|
||||||
Bitte zuerst einen Zeitraum wählen
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label class="mb-2 font-bold">
|
|
||||||
davon Kinder 0-3 Jahre
|
|
||||||
</label>
|
|
||||||
<input type="number"
|
|
||||||
class="form-field"
|
|
||||||
min="0"
|
|
||||||
v-model.number="childrenCount"
|
|
||||||
@change="onPaxUpdated()"
|
|
||||||
v-show="nightsCount > 0"/>
|
|
||||||
<p class="text-sm italic"
|
|
||||||
v-show="nightsCount === 0">
|
|
||||||
Bitte zuerst einen Zeitraum wählen
|
|
||||||
</p>
|
|
||||||
<p class="text-sm italic"
|
|
||||||
v-show="nightsCount > 0">
|
|
||||||
Kinder werden nur bei Strom- und Abfallgebühren berücksichtigt.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label class="mb-2 font-bold">
|
|
||||||
davon Kinder 4-5 Jahre*
|
|
||||||
</label>
|
|
||||||
<input type="number"
|
|
||||||
class="form-field"
|
|
||||||
min="0"
|
|
||||||
v-model.number="minorsCount"
|
|
||||||
@change="onPaxUpdated()"
|
|
||||||
v-show="nightsCount > 0"/>
|
|
||||||
<p class="text-sm italic"
|
|
||||||
v-show="nightsCount === 0">
|
|
||||||
Bitte zuerst einen Zeitraum wählen
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div v-if="adolescentsAge > 0">
|
|
||||||
<label class="mb-2 font-bold">
|
|
||||||
davon Kinder 6-{{ adolescentsAge }} Jahre*
|
|
||||||
</label>
|
|
||||||
<input type="number"
|
|
||||||
class="form-field"
|
|
||||||
min="0"
|
|
||||||
v-model.number="adolescentsCount"
|
|
||||||
@change="onPaxUpdated()"
|
|
||||||
v-show="nightsCount > 0"/>
|
|
||||||
<p class="text-sm italic"
|
|
||||||
v-show="nightsCount === 0">
|
|
||||||
Bitte zuerst einen Zeitraum wählen
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="sm:col-span-2 text-sm">
|
|
||||||
*Die Kosten für Essen und Kurtaxe werden wir entsprechend der Altersstruktur der Gäste in der Rechnung
|
|
||||||
anpassen.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mb-8"
|
|
||||||
v-show="options.length > 0 && !submitted">
|
|
||||||
<div class="mb-2 font-bold">
|
|
||||||
Optionale Zusatzleistungen
|
|
||||||
</div>
|
|
||||||
<ul class="mb-0 p-0 space-y-2">
|
|
||||||
<li v-for="option of options" :key="option.uid">
|
|
||||||
<label class="flex items-start">
|
|
||||||
<input type="checkbox"
|
|
||||||
class="w-5 h-5 border-ep-primary-light ring-0 bg-transparent focus:ring-0 focus:border-none text-ep-primary"
|
|
||||||
v-model="selectedOptions"
|
|
||||||
:value="option">
|
|
||||||
<span class="pl-2 leading-none">{{ option.title }}{{ formatOptionPriceType(option) }}</span>
|
|
||||||
</label>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="mb-8"
|
|
||||||
v-show="boards.length > 0 && !submitted">
|
|
||||||
<label class="mb-2 font-bold">
|
|
||||||
Verpflegungsleistungen
|
|
||||||
</label>
|
|
||||||
<select class="form-field"
|
|
||||||
v-model="selectedBoard"
|
|
||||||
v-if="selectedPax >= 30">
|
|
||||||
<option :value="null" disabled>bitte auswählen</option>
|
|
||||||
<option v-for="board of boards"
|
|
||||||
:value="board"
|
|
||||||
:key="board.uid">
|
|
||||||
{{ board.title }} ({{ formatCurrency(board.price) }} pro Person und Nacht)
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.board"
|
|
||||||
v-html="formErrors.board"></div>
|
|
||||||
<div v-show="selectedPax < 30">
|
|
||||||
<span class="text-red-600">Erst ab 30 Personen buchbar.</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mb-8">
|
|
||||||
<div class="pb-2" v-if="submitted">
|
|
||||||
<p class="text-lg font-bold pb-2">
|
|
||||||
Vielen Dank für Deine {{ mode === 'booking' ? 'Buchung' : 'Anfrage' }}.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Für folgendes habt ihr euch entschieden:
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="p-2 uppercase bg-ep-primary-dark text-white w-full">
|
|
||||||
Preise
|
|
||||||
</div>
|
|
||||||
<div class="bg-zinc-100 p-2 mb-2">
|
|
||||||
<table class="w-full" v-show="nightsCount > 0">
|
|
||||||
<tbody>
|
|
||||||
<tr class="odd:bg-zinc-100">
|
|
||||||
<th class="text-left py-2">Zeitraum</th>
|
|
||||||
<td>{{ rangeFormatted }}, {{ nightsCount }} Nächte</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100">
|
|
||||||
<th class="text-left py-2">Personenzahl</th>
|
|
||||||
<td>
|
|
||||||
{{ selectedPax }}<span v-if="childrenCount > 0">, davon Kinder {{ childrenCount }}</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100">
|
|
||||||
<th class="text-left py-2">Basispreis</th>
|
|
||||||
<td>{{ formatCurrency(pricePax.base) }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100"
|
|
||||||
v-if="pricePax.additional.EUR > 0 || pricePax.additional.CHF > 0">
|
|
||||||
<th class="text-left py-2">Aufpreis Personenzahl</th>
|
|
||||||
<td>{{ formatCurrency(pricePax.additional) }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100"
|
|
||||||
v-if="priceShortTerm.EUR > 0 || priceShortTerm.CHF > 0">
|
|
||||||
<th class="text-left py-2">Aufpreis Kurzzeit</th>
|
|
||||||
<td>{{ formatCurrency(priceShortTerm) }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100"
|
|
||||||
v-for="selectedOption in selectedOptions">
|
|
||||||
<th class="text-left py-2">{{ selectedOption.title }}</th>
|
|
||||||
<td>{{ formatCurrency(calculateOptionPrice(selectedOption)) }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100"
|
|
||||||
v-if="priceBoard.EUR > 0 || priceBoard.CHF > 0">
|
|
||||||
<th class="text-left py-2">{{ selectedBoard.title }}</th>
|
|
||||||
<td>{{ formatCurrency(priceBoard) }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100"
|
|
||||||
v-if="false === isSelfCatering && undersubscriptionLimit > 0">
|
|
||||||
<th class="text-left py-2">Verpflegungs-Aufschlag für Gruppen unter {{ undersubscriptionLimit }} Personen</th>
|
|
||||||
<td>{{ formatCurrency(pricePax.undersubscription) }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100"
|
|
||||||
v-if="priceRunningCosts.EUR > 0 || priceRunningCosts.CHF > 0">
|
|
||||||
<th class="text-left py-2">Strom- und Abfallgebühren</th>
|
|
||||||
<td>{{ formatCurrency(priceRunningCosts) }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd:bg-zinc-100">
|
|
||||||
<th class="text-left py-2">Gesamtpreis</th>
|
|
||||||
<td>
|
|
||||||
<strong>{{ formatCurrency(priceTotal) }}</strong>
|
|
||||||
<br>
|
|
||||||
<small>{{ taxLabel }}</small>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p class="text-sm italic"
|
|
||||||
v-show="nightsCount === 0">
|
|
||||||
Bitte zuerst einen Zeitraum wählen
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div v-if="mode === 'booking' && submitted">
|
|
||||||
Bitte beachtet, dass die Buchung bei uns eingegangen, aber <strong>noch nicht bestätigt</strong> ist.
|
|
||||||
Wir behalten uns vor, die Buchungen auf Verfügbarkeit und Länge des gewünschten Aufenthalts zu prüfen.
|
|
||||||
Erst wenn wir euch die Buchung per Mail bestätigt haben, wird sie bindend.
|
|
||||||
</div>
|
|
||||||
<div v-if="mode === 'inquiry' && submitted">
|
|
||||||
Die Anfrage ist bei uns eingegangen und wird schnellstmöglich bearbeitet. Wir melden uns telefonisch
|
|
||||||
oder per Mail bei euch.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mb-8"
|
|
||||||
v-show="nightsCount > 0 && !submitted">
|
|
||||||
<div class="p-2 uppercase bg-ep-primary-dark text-white w-full">
|
|
||||||
Jetzt <span v-if="!forceInquiry">buchen</span><span v-if="forceInquiry">anfragen</span>
|
|
||||||
</div>
|
|
||||||
<div class="bg-zinc-100 p-2">
|
|
||||||
<div class="grid md:grid-cols-2 gap-4 mb-4">
|
|
||||||
<div :class="{ 'has-error': formErrors.name }">
|
|
||||||
<label class="font-bold mb-2">
|
|
||||||
Name*
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-field"
|
|
||||||
v-model="name">
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.name"
|
|
||||||
v-html="formErrors.name"></div>
|
|
||||||
</div>
|
|
||||||
<div :class="{ 'has-error': formErrors.street }">
|
|
||||||
<label class="font-bold mb-2">
|
|
||||||
Strasse, Nr.*
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-field"
|
|
||||||
v-model="street">
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.street"
|
|
||||||
v-html="formErrors.street"></div>
|
|
||||||
</div>
|
|
||||||
<div :class="{ 'has-error': formErrors.postcode }">
|
|
||||||
<label class="font-bold mb-2">
|
|
||||||
Postleitzahl*
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-field"
|
|
||||||
v-model="postcode">
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.postcode"
|
|
||||||
v-html="formErrors.postcode"></div>
|
|
||||||
</div>
|
|
||||||
<div :class="{ 'has-error': formErrors.city }">
|
|
||||||
<label class="font-bold mb-2">
|
|
||||||
Ort*
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-field"
|
|
||||||
v-model="city">
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.city"
|
|
||||||
v-html="formErrors.city"></div>
|
|
||||||
</div>
|
|
||||||
<div :class="{ 'has-error': formErrors.group }">
|
|
||||||
<label class="font-bold mb-2">
|
|
||||||
Name der Gruppe*
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-field"
|
|
||||||
v-model="group">
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.group"
|
|
||||||
v-html="formErrors.group"></div>
|
|
||||||
</div>
|
|
||||||
<div :class="{ 'has-error': formErrors.email }">
|
|
||||||
<label class="font-bold mb-2">
|
|
||||||
E-Mail*
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-field"
|
|
||||||
v-model="email">
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.email"
|
|
||||||
v-html="formErrors.email"></div>
|
|
||||||
</div>
|
|
||||||
<div :class="{ 'has-error': formErrors.phone }">
|
|
||||||
<label class="font-bold mb-2">
|
|
||||||
Telefon*
|
|
||||||
</label>
|
|
||||||
<input type="text"
|
|
||||||
class="form-field"
|
|
||||||
v-model="phone">
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.phone"
|
|
||||||
v-html="formErrors.phone"></div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label class="font-bold mb-2">
|
|
||||||
Bemerkungen/Wünsche
|
|
||||||
</label>
|
|
||||||
<textarea class="form-field"
|
|
||||||
cols="30"
|
|
||||||
rows="3"
|
|
||||||
v-model="remarks"/>
|
|
||||||
</div>
|
|
||||||
<div v-if="mode === 'booking'" :class="{ 'has-error': formErrors.confirmation }">
|
|
||||||
<label for="confirmation" class="flex items-start">
|
|
||||||
<input type="checkbox" v-model="confirmation" name="confirmation" id="confirmation">
|
|
||||||
<span class="block ml-2">
|
|
||||||
Durch Anklicken des Buttons 'Buchung abschicken' bestätige ich, dass ich die
|
|
||||||
<a :href="termsUrls[countryCode]"
|
|
||||||
class="text-ep-primary" target="_blank">
|
|
||||||
Allgemeinen Geschäftsbedingungen (AGB)
|
|
||||||
</a> gelesen habe und damit einverstanden bin, dass eine
|
|
||||||
kostenpflichtige Buchung zustande kommt.
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<div class="text-sm text-red-600 mt-1"
|
|
||||||
v-show="formErrors.confirmation"
|
|
||||||
v-html="formErrors.confirmation"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="py-4">
|
|
||||||
Ihr erhaltet von uns eine Bestätigung. Wir behalten uns vor die Buchung zu prüfen. Erst nach
|
|
||||||
Rückbestätigung von uns gilt die Buchung auch von unserer Seite als bindend.
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center space-x-2">
|
|
||||||
<button class="button bg-button"
|
|
||||||
type="submit"
|
|
||||||
v-if="!forceInquiry"
|
|
||||||
@click.prevent="submitForm('booking')">
|
|
||||||
Buchung abschicken
|
|
||||||
</button>
|
|
||||||
<button class="button bg-button"
|
|
||||||
:class="{ 'button--small bg-ep-secondary': !forceInquiry }"
|
|
||||||
type="submit"
|
|
||||||
@click.prevent="submitForm('inquiry')">
|
|
||||||
als Anfrage senden
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<img :src="logoAt" alt="" v-if="countryCode === 'AT'" class="block w-full h-auto max-w-24">
|
|
||||||
<img :src="logoCh" alt="" v-if="countryCode === 'CH'" class="block w-full h-auto max-w-24">
|
|
||||||
</div>
|
|
||||||
<div class="fixed top-0 left-0 inset-0 bg-white/85 flex items-center justify-center" v-show="processing">
|
|
||||||
<img :src="loaderUri" alt="Loading...">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import dayjs from 'dayjs'
|
|
||||||
import 'dayjs/locale/de'
|
|
||||||
import 'flatpickr';
|
|
||||||
import {German} from 'flatpickr/dist/l10n/de';
|
|
||||||
import Vue from 'vue';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'GroupsPriceCalculator',
|
|
||||||
props: {
|
|
||||||
loaderUri: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
endpoint: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
logoAt: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
logoCh: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
configsJson: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
boardsJson: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
optionsJson: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
runningCostsFactorEur: {
|
|
||||||
type: Number,
|
|
||||||
default: 2.5,
|
|
||||||
},
|
|
||||||
runningCostsFactorChf: {
|
|
||||||
type: Number,
|
|
||||||
default: 2.9,
|
|
||||||
},
|
|
||||||
undersubscription30Eur: {
|
|
||||||
type: Number,
|
|
||||||
default: 5.0,
|
|
||||||
},
|
|
||||||
undersubscription30Chf: {
|
|
||||||
type: Number,
|
|
||||||
default: 5.0,
|
|
||||||
},
|
|
||||||
undersubscription40Eur: {
|
|
||||||
type: Number,
|
|
||||||
default: 2.5,
|
|
||||||
},
|
|
||||||
undersubscription40Chf: {
|
|
||||||
type: Number,
|
|
||||||
default: 2.5,
|
|
||||||
},
|
|
||||||
countryCode: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
shortTermFactors: {
|
|
||||||
type: Array,
|
|
||||||
default() {
|
|
||||||
return [
|
|
||||||
{ nights: 1, factor: 0.3 },
|
|
||||||
{ nights: 2, factor: 0.2 },
|
|
||||||
{ nights: 3, factor: 0.1 },
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mainSeasonFrom: {
|
|
||||||
type: String,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
mainSeasonTo: {
|
|
||||||
type: String,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
minBookingDays: {
|
|
||||||
type: Number,
|
|
||||||
default: 5,
|
|
||||||
},
|
|
||||||
taxLabel: {
|
|
||||||
type: String,
|
|
||||||
default: 'zzgl. vorab zu entrichtender Ortstaxe',
|
|
||||||
},
|
|
||||||
adolescentsAge: {
|
|
||||||
type: Number,
|
|
||||||
default: 0,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
configs: JSON.parse(this.configsJson),
|
|
||||||
boards: JSON.parse(this.boardsJson),
|
|
||||||
options: JSON.parse(this.optionsJson),
|
|
||||||
processing: false,
|
|
||||||
submitted: false,
|
|
||||||
picker: null,
|
|
||||||
formErrors: {},
|
|
||||||
selectedFrom: null,
|
|
||||||
selectedTo: null,
|
|
||||||
selectedRange: [],
|
|
||||||
selectedPax: 30,
|
|
||||||
childrenCount: 0,
|
|
||||||
minorsCount: 0,
|
|
||||||
adolescentsCount: 0,
|
|
||||||
selectedOptions: [],
|
|
||||||
selectedBoard: null,
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
phone: '',
|
|
||||||
remarks: '',
|
|
||||||
group: '',
|
|
||||||
street: '',
|
|
||||||
postcode: '',
|
|
||||||
city: '',
|
|
||||||
mode: 'booking',
|
|
||||||
confirmation: false,
|
|
||||||
termsUrls: {
|
|
||||||
AT: 'https://www.ep-reisen.de/fileadmin/user_upload/allgemein/AGB_Gruppen/AGB_Gruppen_CLLT_Touristik_GmbH.pdf',
|
|
||||||
CH: 'https://www.ep-reisen.de/fileadmin/user_upload/allgemein/AGB_Gruppen/AVB_Gruppen_AlpineVacation_GmbH.pdf',
|
|
||||||
IT: 'https://www.ep-reisen.de/fileadmin/user_upload/allgemein/AGB_Gruppen/AGB_Gruppen_E_P_Reisen.pdf',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
formatCurrency({ EUR, CHF }) {
|
|
||||||
let price
|
|
||||||
|
|
||||||
if ('CH' === this.countryCode) {
|
|
||||||
let formatter = new Intl.NumberFormat('de-DE', {
|
|
||||||
style: 'currency',
|
|
||||||
currency: 'CHF',
|
|
||||||
})
|
|
||||||
price = formatter.format(CHF)
|
|
||||||
} else {
|
|
||||||
let formatter = new Intl.NumberFormat('de-DE', {
|
|
||||||
style: 'currency',
|
|
||||||
currency: 'EUR',
|
|
||||||
})
|
|
||||||
price = formatter.format(EUR)
|
|
||||||
}
|
|
||||||
|
|
||||||
return price
|
|
||||||
},
|
|
||||||
calculateOptionPrice(option) {
|
|
||||||
let price = {
|
|
||||||
EUR: 0,
|
|
||||||
CHF: 0,
|
|
||||||
};
|
|
||||||
let optionPriceEUR = option.price.EUR
|
|
||||||
let optionPriceCHF = option.price.CHF
|
|
||||||
if (1 === option.type) {
|
|
||||||
price.EUR = optionPriceEUR;
|
|
||||||
price.CHF = optionPriceCHF;
|
|
||||||
} else if (2 === option.type) {
|
|
||||||
price.EUR = optionPriceEUR * this.paxCount;
|
|
||||||
price.CHF = optionPriceCHF * this.paxCount;
|
|
||||||
} else if (3 === option.type) {
|
|
||||||
price.EUR = optionPriceEUR * this.nightsCount;
|
|
||||||
price.CHF = optionPriceCHF * this.nightsCount;
|
|
||||||
} else if (4 === option.type) {
|
|
||||||
price.EUR = optionPriceEUR * this.nightsCount * this.paxCount;
|
|
||||||
price.CHF = optionPriceCHF * this.nightsCount * this.paxCount;
|
|
||||||
}
|
|
||||||
return price;
|
|
||||||
},
|
|
||||||
formatOptionPriceType(option) {
|
|
||||||
if (2 === option.type) {
|
|
||||||
return ` (${this.formatCurrency(option.price)} pro Person)`
|
|
||||||
}
|
|
||||||
if (3 === option.type) {
|
|
||||||
return ` (${this.formatCurrency(option.price)} pro Nacht)`
|
|
||||||
}
|
|
||||||
if (4 === option.type) {
|
|
||||||
return ` (${this.formatCurrency(option.price)} pro Person und Nacht)`
|
|
||||||
}
|
|
||||||
|
|
||||||
return ` (${this.formatCurrency(option.price)})`
|
|
||||||
},
|
|
||||||
initSelectableRanges() {
|
|
||||||
let enabledDates = [];
|
|
||||||
for (let config of this.configs) {
|
|
||||||
const dateFrom = dayjs(config.dateFrom);
|
|
||||||
const dateTo = dayjs(config.dateTo);
|
|
||||||
enabledDates.push({
|
|
||||||
from: dateFrom.format('DD.MM.YYYY'),
|
|
||||||
to: dateTo.format('DD.MM.YYYY')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.picker.set('enable', enabledDates);
|
|
||||||
if (enabledDates.length > 0) {
|
|
||||||
const firstDate = enabledDates[0].from;
|
|
||||||
this.picker.set('minDate', firstDate);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
updateSelectedRange() {
|
|
||||||
let range = [];
|
|
||||||
let currentDate = this.selectedFrom;
|
|
||||||
while (currentDate < this.selectedTo) {
|
|
||||||
range.push(currentDate);
|
|
||||||
currentDate = currentDate.add(1, 'day');
|
|
||||||
}
|
|
||||||
this.selectedRange = range;
|
|
||||||
},
|
|
||||||
onPaxUpdated() {
|
|
||||||
if (this.selectedPax < 30) {
|
|
||||||
this.selectedBoard = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
submitForm(mode) {
|
|
||||||
this.mode = mode
|
|
||||||
let confirmation = 'inquiry' === mode ? true : this.confirmation
|
|
||||||
let formData = new URLSearchParams({
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][mode]': mode,
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][confirmation]': confirmation ? '1' : '0',
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][name]': this.name ? this.name : '',
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][group]': this.group ? this.group : '',
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][street]': this.street ? this.street : '',
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][postcode]': this.postcode ? this.postcode : '',
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][city]': this.city ? this.city : '',
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][email]': this.email? this.email : '',
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][phone]': this.phone ? this.phone : '',
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][remarks]': this.remarks,
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][dateFrom]': this.selectedFrom.format('DD.MM.YYYY'),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][dateTo]': this.selectedTo.format('DD.MM.YYYY'),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][nights]': this.nightsCount,
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][pax]': this.selectedPax,
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][children]': this.childrenCount,
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][minors]': this.minorsCount,
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][adolescents]': this.adolescentsCount,
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][paxBase]': this.formatCurrency(this.pricePax.base),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][paxAdditional]': this.formatCurrency(this.pricePax.additional),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][undersubscription]': this.formatCurrency(this.pricePax.undersubscription),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][shortTerm]': this.formatCurrency(this.priceShortTerm),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][options]': this.formatCurrency(this.priceOptions),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][board]': this.formatCurrency(this.priceBoard),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][runningCosts]': this.formatCurrency(this.priceRunningCosts),
|
|
||||||
'tx_epproducts_ajax[groupsPriceInquiry][summary][total]': this.formatCurrency(this.priceTotal),
|
|
||||||
})
|
|
||||||
if (this.selectedBoard) {
|
|
||||||
formData.append('tx_epproducts_ajax[groupsPriceInquiry][board]', this.selectedBoard.uid)
|
|
||||||
}
|
|
||||||
this.selectedOptions.map(option => (
|
|
||||||
formData.append('tx_epproducts_ajax[groupsPriceInquiry][options][]', option.uid)
|
|
||||||
))
|
|
||||||
this.processing = true;
|
|
||||||
this.submitted = false;
|
|
||||||
fetch(this.endpoint, { method: 'POST', body: formData })
|
|
||||||
.then(response => response.json())
|
|
||||||
.then((json) => {
|
|
||||||
if ('validation' === json.status) {
|
|
||||||
this.formErrors = json.errors
|
|
||||||
} else {
|
|
||||||
this.submitted = true;
|
|
||||||
window.dataLayer = window.dataLayer || [];
|
|
||||||
dataLayer.push({
|
|
||||||
'event': 'Preisberechnung'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
this.processing = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
isSelfCatering() {
|
|
||||||
let selectedBoard = this.selectedBoard
|
|
||||||
if (null === selectedBoard) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
if ('CH' === this.countryCode) {
|
|
||||||
return selectedBoard.price.CHF === 0
|
|
||||||
} else {
|
|
||||||
return selectedBoard.price.EUR === 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
undersubscriptionLimit() {
|
|
||||||
if (this.paxCount < 40) {
|
|
||||||
return 40
|
|
||||||
} else if (this.paxCount < 50) {
|
|
||||||
return 50
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0
|
|
||||||
},
|
|
||||||
paxCount() {
|
|
||||||
// subtract number of children from pax for price calculation, but minimum 30 pax
|
|
||||||
return Math.max(this.selectedPax - this.childrenCount, 30)
|
|
||||||
},
|
|
||||||
nightsCount() {
|
|
||||||
return this.selectedRange.length;
|
|
||||||
},
|
|
||||||
forceInquiry() {
|
|
||||||
return 1 === this.selectedRange.length
|
|
||||||
},
|
|
||||||
rangeFormatted() {
|
|
||||||
if (null === this.selectedFrom || null === this.selectedTo) {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.selectedFrom.format('DD.MM.YYYY') + ' - ' + this.selectedTo.format('DD.MM.YYYY');
|
|
||||||
},
|
|
||||||
pricePax() {
|
|
||||||
let base = {
|
|
||||||
EUR: 0,
|
|
||||||
CHF: 0,
|
|
||||||
}
|
|
||||||
let additional = {
|
|
||||||
EUR: 0,
|
|
||||||
CHF: 0,
|
|
||||||
}
|
|
||||||
let undersubscription = {
|
|
||||||
EUR: 0,
|
|
||||||
CHF: 0,
|
|
||||||
}
|
|
||||||
for (let date of this.selectedRange) {
|
|
||||||
for (let config of this.configs) {
|
|
||||||
if (date >= dayjs(config.dateFrom) && date < dayjs(config.dateTo)) {
|
|
||||||
base.EUR += config.price.EUR
|
|
||||||
base.CHF += config.price.CHF
|
|
||||||
let included = config.personsIncluded
|
|
||||||
if (this.paxCount > included) {
|
|
||||||
let additionalPax = this.paxCount - included
|
|
||||||
additional.EUR += additionalPax * config.priceAdditionalPerson.EUR
|
|
||||||
additional.CHF += additionalPax * config.priceAdditionalPerson.CHF
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (false === this.isSelfCatering) {
|
|
||||||
if (this.paxCount < 40) {
|
|
||||||
undersubscription.EUR = this.paxCount * this.undersubscription30Eur * this.selectedRange.length
|
|
||||||
undersubscription.CHF = this.paxCount * this.undersubscription30Chf * this.selectedRange.length
|
|
||||||
} else if (this.paxCount < 50) {
|
|
||||||
undersubscription.EUR = this.paxCount * this.undersubscription40Eur * this.selectedRange.length
|
|
||||||
undersubscription.CHF = this.paxCount * this.undersubscription40Chf * this.selectedRange.length
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {base, additional, undersubscription}
|
|
||||||
},
|
|
||||||
priceOptions() {
|
|
||||||
let price = {
|
|
||||||
EUR: 0,
|
|
||||||
CHF: 0,
|
|
||||||
};
|
|
||||||
for (let option of this.selectedOptions) {
|
|
||||||
let optionPrice = this.calculateOptionPrice(option)
|
|
||||||
price.EUR += optionPrice.EUR;
|
|
||||||
price.CHF += optionPrice.CHF;
|
|
||||||
}
|
|
||||||
return price;
|
|
||||||
},
|
|
||||||
priceBoard() {
|
|
||||||
let price = {
|
|
||||||
EUR: 0,
|
|
||||||
CHF: 0,
|
|
||||||
}
|
|
||||||
if (this.selectedBoard) {
|
|
||||||
price.EUR = this.selectedBoard.price.EUR * this.nightsCount * this.paxCount;
|
|
||||||
price.CHF = this.selectedBoard.price.CHF * this.nightsCount * this.paxCount;
|
|
||||||
}
|
|
||||||
return price
|
|
||||||
},
|
|
||||||
priceShortTerm() {
|
|
||||||
let price = {
|
|
||||||
EUR: 0,
|
|
||||||
CHF: 0,
|
|
||||||
}
|
|
||||||
const totalPricePax = this.pricePax.base.EUR + this.pricePax.additional.EUR;
|
|
||||||
const totalPricePaxCHF = this.pricePax.base.CHF + this.pricePax.additional.CHF;
|
|
||||||
const shorTermFactor = this.shortTermFactors.find(element => element.nights === this.nightsCount);
|
|
||||||
if (undefined !== shorTermFactor) {
|
|
||||||
price.EUR = totalPricePax * shorTermFactor.factor;
|
|
||||||
price.CHF = totalPricePaxCHF * shorTermFactor.factor;
|
|
||||||
}
|
|
||||||
return price
|
|
||||||
},
|
|
||||||
priceRunningCosts() {
|
|
||||||
return {
|
|
||||||
EUR: this.nightsCount * this.selectedPax * this.runningCostsFactorEur,
|
|
||||||
CHF: this.nightsCount * this.selectedPax * this.runningCostsFactorChf,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
priceTotal() {
|
|
||||||
let totalEUR = this.pricePax.base.EUR
|
|
||||||
+ this.pricePax.additional.EUR
|
|
||||||
+ this.pricePax.undersubscription.EUR
|
|
||||||
+ this.priceOptions.EUR
|
|
||||||
+ this.priceBoard.EUR
|
|
||||||
+ this.priceShortTerm.EUR
|
|
||||||
+ this.priceRunningCosts.EUR
|
|
||||||
|
|
||||||
let totalCHF = 0
|
|
||||||
|
|
||||||
// calculate CHF price when pax price in CHF is available since CHF prices may not be provided via CMS yet
|
|
||||||
if (0 < this.pricePax.base.CHF) {
|
|
||||||
totalCHF = this.pricePax.base.CHF
|
|
||||||
+ this.pricePax.additional.CHF
|
|
||||||
+ this.pricePax.undersubscription.CHF
|
|
||||||
+ this.priceOptions.CHF
|
|
||||||
+ this.priceBoard.CHF
|
|
||||||
+ this.priceShortTerm.CHF
|
|
||||||
+ this.priceRunningCosts.CHF
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
EUR: totalEUR,
|
|
||||||
CHF: totalCHF,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
Vue.nextTick(() => {
|
|
||||||
this.picker = flatpickr(this.$refs.picker, {
|
|
||||||
mode: 'range',
|
|
||||||
dateFormat: 'd.m.Y',
|
|
||||||
locale: German,
|
|
||||||
onChange: selectedDates => {
|
|
||||||
if (2 === selectedDates.length) {
|
|
||||||
this.selectedFrom = dayjs(selectedDates[0]);
|
|
||||||
this.selectedTo = dayjs(selectedDates[1]);
|
|
||||||
this.updateSelectedRange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.initSelectableRanges();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
+17
-2
@@ -9,6 +9,9 @@ export default class extends Controller {
|
|||||||
zoom: Number,
|
zoom: Number,
|
||||||
externalLink: String,
|
externalLink: String,
|
||||||
markers: Array,
|
markers: Array,
|
||||||
|
tileUrl: String,
|
||||||
|
apiKey: String,
|
||||||
|
attribution: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
@@ -44,9 +47,21 @@ export default class extends Controller {
|
|||||||
}
|
}
|
||||||
this.map.fitBounds(bounds)
|
this.map.fitBounds(bounds)
|
||||||
}
|
}
|
||||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
L.tileLayer(this.tileUrl(), {
|
||||||
maxZoom: 19,
|
maxZoom: 19,
|
||||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
// The site sends Referrer-Policy: same-origin, which strips the Referer on
|
||||||
|
// cross-origin requests. The tile provider needs it to match its key against
|
||||||
|
// the allowed-domain list, so widen the policy for tile requests only.
|
||||||
|
referrerPolicy: 'strict-origin-when-cross-origin',
|
||||||
|
attribution: this.attributionValue
|
||||||
}).addTo(this.map)
|
}).addTo(this.map)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tileUrl() {
|
||||||
|
if ('' === this.tileUrlValue || '' === this.apiKeyValue) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
const separator = -1 === this.tileUrlValue.indexOf('?') ? '?' : '&'
|
||||||
|
return this.tileUrlValue + separator + 'apiKey=' + encodeURIComponent(this.apiKeyValue)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
// Initialize vue app
|
|
||||||
import Vue from 'vue'
|
|
||||||
import vueCustomElement from 'vue-custom-element'
|
|
||||||
import 'document-register-element/build/document-register-element'
|
|
||||||
import GroupsPriceCalculator from './components/GroupsPriceCalculator'
|
|
||||||
|
|
||||||
Vue.use(vueCustomElement)
|
|
||||||
Vue.config.productionTip = false
|
|
||||||
|
|
||||||
Vue.customElement('groups-price-calculator', GroupsPriceCalculator)
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
import 'whatwg-fetch'
|
|
||||||
|
|
||||||
export const useFetch = controller => {
|
export const useFetch = controller => {
|
||||||
Object.assign(controller, {
|
Object.assign(controller, {
|
||||||
checkStatus(response) {
|
checkStatus(response) {
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
|
@use "sass:meta";
|
||||||
@layer base {
|
@layer base {
|
||||||
body {
|
body {
|
||||||
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
||||||
}
|
}
|
||||||
@import "base/typography";
|
@include meta.load-css("base/typography");
|
||||||
@import "base/images";
|
@include meta.load-css("base/images");
|
||||||
|
|
||||||
[data-rte-content] {
|
@include meta.load-css("base/rte-content");
|
||||||
@import "base/rte-content";
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe {
|
iframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
|
@use "sass:meta";
|
||||||
@layer components {
|
@layer components {
|
||||||
@import "components/topnav";
|
@include meta.load-css("components/topnav");
|
||||||
@import "components/background";
|
@include meta.load-css("components/background");
|
||||||
@import "components/badges";
|
@include meta.load-css("components/badges");
|
||||||
@import "components/buttons";
|
@include meta.load-css("components/buttons");
|
||||||
@import "components/contact-bar";
|
@include meta.load-css("components/contact-bar");
|
||||||
@import "components/calendar";
|
@include meta.load-css("components/calendar");
|
||||||
@import "components/forms";
|
@include meta.load-css("components/forms");
|
||||||
@import "components/herounit";
|
@include meta.load-css("components/herounit");
|
||||||
@import "components/misc";
|
@include meta.load-css("components/misc");
|
||||||
@import "components/searchbar";
|
@include meta.load-css("components/searchbar");
|
||||||
@import "components/teaser";
|
@include meta.load-css("components/teaser");
|
||||||
@import "components/travelinfo";
|
@include meta.load-css("components/travelinfo");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
@use "sass:meta";
|
||||||
|
|
||||||
// Lightbox
|
// Lightbox
|
||||||
@import "~glightbox/dist/css/glightbox.css";
|
@import "~glightbox/dist/css/glightbox.css";
|
||||||
|
|
||||||
// Tooltips
|
// Tooltips
|
||||||
@import "~cooltipz-css/src/cooltipz";
|
@include meta.load-css("cooltipz-css/cooltipz.css");
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--cooltipz-bg-color: theme('colors.zinc.700');
|
--cooltipz-bg-color: theme('colors.zinc.700');
|
||||||
|
|||||||
@@ -3,7 +3,3 @@
|
|||||||
@apply block w-full h-auto;
|
@apply block w-full h-auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.lazyloading {
|
|
||||||
background: url(../../images/lazy.png) no-repeat top center;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
+79
-75
@@ -1,82 +1,86 @@
|
|||||||
h1,
|
// Self-contained: the wrapper lives here so `&` and @extend resolve the same
|
||||||
.headline--primary,
|
// way they did when this file was @imported into a [data-rte-content] block.
|
||||||
h2,
|
[data-rte-content] {
|
||||||
.headline--secondary,
|
h1,
|
||||||
h3,
|
.headline--primary,
|
||||||
.headline--3,
|
h2,
|
||||||
h4,
|
.headline--secondary,
|
||||||
.headline--4 {
|
h3,
|
||||||
@apply mb-4;
|
.headline--3,
|
||||||
}
|
h4,
|
||||||
|
.headline--4 {
|
||||||
|
@apply mb-4;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
@apply list-disc pl-4 mb-4;
|
@apply list-disc pl-4 mb-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol {
|
ol {
|
||||||
@apply list-decimal pl-4 mb-4;
|
@apply list-decimal pl-4 mb-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
@apply mb-4;
|
@apply mb-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:not(.button):not(.rte-button):not(.rte-button--full) {
|
a:not(.button):not(.rte-button):not(.rte-button--full) {
|
||||||
@apply underline text-ep-primary-dark sbw:text-sbw-primary-dark;
|
@apply underline text-ep-primary-dark sbw:text-sbw-primary-dark;
|
||||||
|
|
||||||
.bg-brand-gradient & {
|
.bg-brand-gradient & {
|
||||||
@apply text-white underline;
|
@apply text-white underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a.rte-button {
|
||||||
|
@apply inline-flex items-center justify-center px-4 py-2 md:px-8;
|
||||||
|
@apply uppercase leading-none text-center;
|
||||||
|
@apply transition-colors outline-none;
|
||||||
|
@apply bg-ep-primary-light text-white;
|
||||||
|
@apply sbw:bg-sbw-secondary;
|
||||||
|
@apply snz:bg-snz-secondary;
|
||||||
|
@apply suz:bg-suz-secondary;
|
||||||
|
@apply uch:bg-uch-secondary;
|
||||||
|
@apply ser:bg-ser-secondary;
|
||||||
|
@apply hover:bg-ep-secondary group-hover:bg-ep-secondary;
|
||||||
|
@apply sbw:hover:bg-sbw-primary-dark sbw:group-hover:bg-sbw-primary-dark;
|
||||||
|
@apply snz:hover:bg-snz-primary-dark snz:group-hover:bg-snz-primary-dark;
|
||||||
|
@apply suz:hover:bg-suz-primary-dark suz:group-hover:bg-suz-primary-dark;
|
||||||
|
@apply uch:hover:bg-uch-primary-dark uch:group-hover:bg-uch-primary-dark;
|
||||||
|
@apply ser:hover:bg-ser-primary ser:group-hover:bg-ser-primary;
|
||||||
|
@apply focus:outline focus:outline-2 focus:outline-offset-2;
|
||||||
|
@apply focus:outline-ep-primary-dark sbw:focus:outline-sbw-secondary uch:focus:outline-uch-secondary;
|
||||||
|
@apply suz:focus:outline-suz-secondary ser:focus:outline-ser-secondary snz:focus:outline-snz-secondary;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
a.rte-button--full {
|
||||||
|
@extend .rte-button;
|
||||||
|
@apply w-full;
|
||||||
|
}
|
||||||
|
|
||||||
|
table,
|
||||||
|
.table {
|
||||||
|
@apply w-full;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
@apply bg-zinc-200;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
@apply odd:bg-zinc-100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
@apply border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
@apply border-r border-zinc-200 px-2 py-1 md:p-2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a.rte-button {
|
|
||||||
@apply inline-flex items-center justify-center px-4 py-2 md:px-8;
|
|
||||||
@apply uppercase leading-none text-center;
|
|
||||||
@apply transition-colors outline-none;
|
|
||||||
@apply bg-ep-primary-light text-white;
|
|
||||||
@apply sbw:bg-sbw-secondary;
|
|
||||||
@apply snz:bg-snz-secondary;
|
|
||||||
@apply suz:bg-suz-secondary;
|
|
||||||
@apply uch:bg-uch-secondary;
|
|
||||||
@apply ser:bg-ser-secondary;
|
|
||||||
@apply hover:bg-ep-secondary group-hover:bg-ep-secondary;
|
|
||||||
@apply sbw:hover:bg-sbw-primary-dark sbw:group-hover:bg-sbw-primary-dark;
|
|
||||||
@apply snz:hover:bg-snz-primary-dark snz:group-hover:bg-snz-primary-dark;
|
|
||||||
@apply suz:hover:bg-suz-primary-dark suz:group-hover:bg-suz-primary-dark;
|
|
||||||
@apply uch:hover:bg-uch-primary-dark uch:group-hover:bg-uch-primary-dark;
|
|
||||||
@apply ser:hover:bg-ser-primary ser:group-hover:bg-ser-primary;
|
|
||||||
@apply focus:outline focus:outline-2 focus:outline-offset-2;
|
|
||||||
@apply focus:outline-ep-primary-dark sbw:focus:outline-sbw-secondary uch:focus:outline-uch-secondary;
|
|
||||||
@apply suz:focus:outline-suz-secondary ser:focus:outline-ser-secondary snz:focus:outline-snz-secondary;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
a.rte-button--full {
|
|
||||||
@extend .rte-button;
|
|
||||||
@apply w-full;
|
|
||||||
}
|
|
||||||
|
|
||||||
table,
|
|
||||||
.table {
|
|
||||||
@apply w-full;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead {
|
|
||||||
tr {
|
|
||||||
@apply bg-zinc-200;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody {
|
|
||||||
tr {
|
|
||||||
@apply odd:bg-zinc-100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
@apply border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
@apply border-r border-zinc-200 px-2 py-1 md:p-2;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
@import "tailwindcss/base";
|
@use "sass:meta";
|
||||||
@import "base";
|
|
||||||
|
|
||||||
@import "tailwindcss/components";
|
@include meta.load-css("tailwindcss/base");
|
||||||
@import "components";
|
@include meta.load-css("base");
|
||||||
|
|
||||||
@import "tailwindcss/utilities";
|
@include meta.load-css("tailwindcss/components");
|
||||||
@import "utilities";
|
@include meta.load-css("components");
|
||||||
|
|
||||||
@import "vendor";
|
@include meta.load-css("tailwindcss/utilities");
|
||||||
|
@include meta.load-css("utilities");
|
||||||
|
|
||||||
|
@include meta.load-css("vendor");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@import "base/fonts";
|
@use "base/fonts";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply antialiased text-zinc-800 font-sans;
|
@apply antialiased text-zinc-800 font-sans;
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
</f:if>
|
</f:if>
|
||||||
<f:if condition="{image}">
|
<f:if condition="{image}">
|
||||||
<f:then>
|
<f:then>
|
||||||
<ep:lazyLoadImage image="{image}"
|
<f:image image="{image}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-full object-cover"
|
class="block w-full h-full object-cover"
|
||||||
width="400c"
|
width="400c"
|
||||||
height="300c"
|
height="300c"
|
||||||
alt="{city.name}" />
|
alt="{city.name}" />
|
||||||
</f:then>
|
</f:then>
|
||||||
<f:else>
|
<f:else>
|
||||||
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png"
|
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<html data-namespace-typo3-fluid="true" lang="en"
|
<html data-namespace-typo3-fluid="true" lang="en"
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
|
||||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||||
|
|
||||||
<f:section name="Teaser">
|
<f:section name="Teaser">
|
||||||
@@ -18,12 +17,12 @@
|
|||||||
</f:if>
|
</f:if>
|
||||||
<f:if condition="{image}">
|
<f:if condition="{image}">
|
||||||
<f:then>
|
<f:then>
|
||||||
<ep:lazyLoadImage image="{image}"
|
<f:image image="{image}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-full object-cover"
|
class="block w-full h-full object-cover"
|
||||||
width="400c"
|
width="400c"
|
||||||
height="300c"
|
height="300c"
|
||||||
alt="{concept.name}" />
|
alt="{concept.name}" />
|
||||||
</f:then>
|
</f:then>
|
||||||
<f:else>
|
<f:else>
|
||||||
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png"
|
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png"
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
<div class="col-span-2 md:col-span-1">
|
<div class="col-span-2 md:col-span-1">
|
||||||
<div class="relative max-w-md mx-auto mb-8">
|
<div class="relative max-w-md mx-auto mb-8">
|
||||||
<f:if condition="{image}">
|
<f:if condition="{image}">
|
||||||
<ep:lazyLoadImage image="{image}"
|
<f:image image="{image}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto rounded-full"
|
class="block w-full h-auto rounded-full"
|
||||||
width="400"
|
width="400"
|
||||||
height="400c"
|
height="400c"
|
||||||
alt="{image.alternative}" />
|
alt="{image.alternative}" />
|
||||||
</f:if>
|
</f:if>
|
||||||
<a href="tel:{settings.phoneNumber -> v:format.pregReplace(pattern: '/[\-\s]/', replacement: '')}"
|
<a href="tel:{settings.phoneNumber -> v:format.pregReplace(pattern: '/[\-\s]/', replacement: '')}"
|
||||||
rel="nofollow"
|
rel="nofollow"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<html data-namespace-typo3-fluid="true" lang="en"
|
<html data-namespace-typo3-fluid="true" lang="en"
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
|
||||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||||
|
|
||||||
<f:alias map="{button: data.flexForm.buttons.0}">
|
<f:alias map="{button: data.flexForm.buttons.0}">
|
||||||
@@ -11,11 +10,11 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<a href="{f:uri.typolink(parameter: button.container.link)}" title="{button.container.label -> f:format.raw()}">
|
<a href="{f:uri.typolink(parameter: button.container.link)}" title="{button.container.label -> f:format.raw()}">
|
||||||
<f:if condition="{image}">
|
<f:if condition="{image}">
|
||||||
<ep:lazyLoadImage image="{image}"
|
<f:image image="{image}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto rounded-full"
|
class="block w-full h-auto rounded-full"
|
||||||
width="400"
|
width="400"
|
||||||
alt="{image.alternative}" />
|
alt="{image.alternative}" />
|
||||||
</f:if>
|
</f:if>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
<div class="md:flex md:items-start py-4">
|
<div class="md:flex md:items-start py-4">
|
||||||
<div class="px-16 pb-4 md:px-4 md:pb-0 md:w-1/6">
|
<div class="px-16 pb-4 md:px-4 md:pb-0 md:w-1/6">
|
||||||
<f:if condition="{image}">
|
<f:if condition="{image}">
|
||||||
<ep:lazyLoadImage image="{image}"
|
<f:image image="{image}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto rounded-full"
|
class="block w-full h-auto rounded-full"
|
||||||
width="400"
|
width="400"
|
||||||
height="400c"
|
height="400c"
|
||||||
alt="{image.alternative}" />
|
alt="{image.alternative}" />
|
||||||
</f:if>
|
</f:if>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-16 md:px-4 md:w-5/6 md:pl-8 text-center text-white md:text-left" data-rte-content>
|
<div class="px-16 md:px-4 md:w-5/6 md:pl-8 text-center text-white md:text-left" data-rte-content>
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
<div class="col-span-2 md:col-span-1">
|
<div class="col-span-2 md:col-span-1">
|
||||||
<div class="relative max-w-md mx-auto mb-8">
|
<div class="relative max-w-md mx-auto mb-8">
|
||||||
<f:if condition="{teaserImage}">
|
<f:if condition="{teaserImage}">
|
||||||
<ep:lazyLoadImage image="{teaserImage}"
|
<f:image image="{teaserImage}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto rounded-full"
|
class="block w-full h-auto rounded-full"
|
||||||
width="400"
|
width="400"
|
||||||
height="400c"
|
height="400c"
|
||||||
alt="{teaserImage.alternative}" />
|
alt="{teaserImage.alternative}" />
|
||||||
</f:if>
|
</f:if>
|
||||||
<a href="tel:{settings.phoneNumber -> v:format.pregReplace(pattern: '/[\-\s]/', replacement: '')}"
|
<a href="tel:{settings.phoneNumber -> v:format.pregReplace(pattern: '/[\-\s]/', replacement: '')}"
|
||||||
rel="nofollow"
|
rel="nofollow"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<html data-namespace-typo3-fluid="true" lang="en"
|
<html data-namespace-typo3-fluid="true" lang="en"
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
|
||||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||||
|
|
||||||
<f:alias map="{button: data.flexForm.buttons.0}">
|
<f:alias map="{button: data.flexForm.buttons.0}">
|
||||||
@@ -11,11 +10,11 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<a href="{f:uri.typolink(parameter: button.container.link)}" title="{button.container.label -> f:format.raw()}">
|
<a href="{f:uri.typolink(parameter: button.container.link)}" title="{button.container.label -> f:format.raw()}">
|
||||||
<f:if condition="{teaserImage}">
|
<f:if condition="{teaserImage}">
|
||||||
<ep:lazyLoadImage image="{teaserImage}"
|
<f:image image="{teaserImage}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto rounded-full"
|
class="block w-full h-auto rounded-full"
|
||||||
width="400"
|
width="400"
|
||||||
alt="{teaserImage.alternative}" />
|
alt="{teaserImage.alternative}" />
|
||||||
</f:if>
|
</f:if>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
<div class="md:flex md:items-start py-4">
|
<div class="md:flex md:items-start py-4">
|
||||||
<div class="px-16 pb-4 md:px-4 md:pb-0 md:w-1/6">
|
<div class="px-16 pb-4 md:px-4 md:pb-0 md:w-1/6">
|
||||||
<f:if condition="{teaserImage}">
|
<f:if condition="{teaserImage}">
|
||||||
<ep:lazyLoadImage image="{teaserImage}"
|
<f:image image="{teaserImage}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto rounded-full"
|
class="block w-full h-auto rounded-full"
|
||||||
width="400"
|
width="400"
|
||||||
height="400c"
|
height="400c"
|
||||||
alt="{teaserImage.alternative}" />
|
alt="{teaserImage.alternative}" />
|
||||||
</f:if>
|
</f:if>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-16 md:px-4 md:w-5/6 md:pl-8 text-center text-white md:text-left" data-rte-content>
|
<div class="px-16 md:px-4 md:w-5/6 md:pl-8 text-center text-white md:text-left" data-rte-content>
|
||||||
|
|||||||
@@ -158,11 +158,11 @@
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="nofollow"
|
rel="nofollow"
|
||||||
title="Global Compact">
|
title="Global Compact">
|
||||||
<ep:lazyLoadImage src="EXT:ep_theme/Resources/Public/images/global_compact.png"
|
<f:image src="EXT:ep_theme/Resources/Public/images/global_compact.png"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto"
|
class="block w-full h-auto"
|
||||||
width="100"
|
width="100"
|
||||||
alt="Global Compact" />
|
alt="Global Compact" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -184,8 +184,10 @@
|
|||||||
<f:format.raw>{totalRatings.jsonData->f:format.json()}</f:format.raw>
|
<f:format.raw>{totalRatings.jsonData->f:format.json()}</f:format.raw>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<f:if condition="{site.identifier} == 'ep-reisen'">
|
<f:comment><!--
|
||||||
<f:render partial="Chatbot" arguments="{_all}"/>
|
<f:if condition="{site.identifier} == 'ep-reisen'">
|
||||||
</f:if>
|
<f:render partial="Chatbot" arguments="{_all}"/>
|
||||||
|
</f:if>
|
||||||
|
--></f:comment>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
{ep:icon(icon: 'flag-{hotel.country.code -> f:format.case(mode: \'lower\')}', class: 'w-8 h-6 absolute top-0 left-0')}
|
{ep:icon(icon: 'flag-{hotel.country.code -> f:format.case(mode: \'lower\')}', class: 'w-8 h-6 absolute top-0 left-0')}
|
||||||
<f:if condition="{hotel.images.original.0}">
|
<f:if condition="{hotel.images.original.0}">
|
||||||
<f:then>
|
<f:then>
|
||||||
<ep:lazyLoadImage image="{hotel.images.original.0}"
|
<f:image image="{hotel.images.original.0}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-full object-cover"
|
class="block w-full h-full object-cover"
|
||||||
width="400c"
|
width="400c"
|
||||||
height="300c"
|
height="300c"
|
||||||
alt="{hotel.name}" />
|
alt="{hotel.name}" />
|
||||||
</f:then>
|
</f:then>
|
||||||
<f:else>
|
<f:else>
|
||||||
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png"
|
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png"
|
||||||
|
|||||||
@@ -15,12 +15,12 @@
|
|||||||
<a href="{f:uri.image(image: image, cropVariant: 'zoom', maxWidth: '2560')}"
|
<a href="{f:uri.image(image: image, cropVariant: 'zoom', maxWidth: '2560')}"
|
||||||
title="{image.title}"
|
title="{image.title}"
|
||||||
data-action="lightbox#open">
|
data-action="lightbox#open">
|
||||||
<ep:lazyLoadImage image="{image}"
|
<f:image image="{image}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto"
|
class="block w-full h-auto"
|
||||||
width="770"
|
width="770"
|
||||||
height="430c+100"
|
height="430c+100"
|
||||||
alt="{image.alternative}"/>
|
alt="{image.alternative}"/>
|
||||||
</a>
|
</a>
|
||||||
</f:alias>
|
</f:alias>
|
||||||
<f:if condition="{thumbnails}">
|
<f:if condition="{thumbnails}">
|
||||||
@@ -35,12 +35,12 @@
|
|||||||
data-lightbox-caption="{image.originalResource.description}"
|
data-lightbox-caption="{image.originalResource.description}"
|
||||||
title="{image.title}"
|
title="{image.title}"
|
||||||
class="block">
|
class="block">
|
||||||
<ep:lazyLoadImage image="{image}"
|
<f:image image="{image}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto"
|
class="block w-full h-auto"
|
||||||
width="150"
|
width="150"
|
||||||
height="85c+100"
|
height="85c+100"
|
||||||
alt="{image.alternative}"/>
|
alt="{image.alternative}"/>
|
||||||
</a>
|
</a>
|
||||||
</f:if>
|
</f:if>
|
||||||
</f:for>
|
</f:for>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<html data-namespace-typo3-fluid="true" lang="en"
|
<html data-namespace-typo3-fluid="true" lang="en"
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
|
||||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
||||||
|
|
||||||
<div class="odd:bg-zinc-50 p-4" data-rte-content>
|
<div class="odd:bg-zinc-50 p-4" data-rte-content>
|
||||||
@@ -18,12 +17,12 @@
|
|||||||
</h3>
|
</h3>
|
||||||
{journey.byCar -> f:format.html()}
|
{journey.byCar -> f:format.html()}
|
||||||
<f:if condition="{journey.image}">
|
<f:if condition="{journey.image}">
|
||||||
<ep:lazyLoadImage image="{journey.image}"
|
<f:image image="{journey.image}"
|
||||||
loaderimg="EXT:ep_theme/Resources/Public/images/lazy.png"
|
loading="lazy"
|
||||||
class="block w-full h-auto"
|
class="block w-full h-auto"
|
||||||
width="770"
|
width="770"
|
||||||
height="430c+100"
|
height="430c+100"
|
||||||
alt="{journey.image.alternative}" />
|
alt="{journey.image.alternative}" />
|
||||||
</f:if>
|
</f:if>
|
||||||
</f:if>
|
</f:if>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<div class="w-full aspect-w-16 aspect-h-9 {class}"
|
||||||
|
data-controller="osm"
|
||||||
|
data-osm-tile-url-value="{settings.mapTileUrl}"
|
||||||
|
data-osm-api-key-value="{settings.mapApiKey}"
|
||||||
|
data-osm-attribution-value="{settings.mapAttribution}"
|
||||||
|
<f:if condition="{zoom}">data-osm-zoom-value="{zoom}"</f:if>
|
||||||
|
<f:if condition="{lat}">data-osm-lat-value="{lat}" data-osm-lng-value="{lng}"</f:if>
|
||||||
|
<f:if condition="{externalLink}">data-osm-external-link-value="{externalLink}"</f:if>
|
||||||
|
<f:if condition="{markers}">data-osm-markers-value='{markers -> f:format.raw()}'</f:if>
|
||||||
|
></div>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user