Commit bdd8e214 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Merge branch 'main' into spinner-during-login-logout-process

parents fcd175ce 54c16a66
include:
- template: Dependency-Scanning.gitlab-ci.yml
- remote: 'https://git.spooner.io/ci-templates/composer-packages/-/raw/main/composer-packages.yml'
cache:
key: "$CI_COMMIT_REF_NAME-$CI_JOB_STAGE"
paths:
......@@ -5,17 +9,17 @@ cache:
- Build/node_modules/
stages:
- packages
- test
- build
test:typoscript:
stage: test
image: composer:1
image: composer:2.0.7
before_script:
- composer global require helmich/typo3-typoscript-lint
script:
- /tmp/vendor/bin/typoscript-lint -c typoscript-lint.yml --fail-on-warnings
allow_failure: true
test:php:
stage: test
......@@ -23,10 +27,15 @@ test:php:
variables:
GIT_STRATEGY: "clone"
script:
- php-cs-fixer fix --dry-run --config=Build/.php_cs --diff --diff-format=udiff
- php-cs-fixer fix --config=Build/.php_cs --format=gitlab > report.json
- cat report.json
artifacts:
reports:
codequality:
- report.json
build:
image: node:9
image: node:12
stage: build
before_script:
- npm config set cache cache/npm/ --global
......@@ -34,6 +43,7 @@ build:
script:
- npm install > /dev/null
- npm run ci
dependencies: []
artifacts:
paths:
- Resources/Public/
......@@ -46,8 +46,7 @@ FlyOutAjaxLogin.prototype.authenticationRequest = function(event, form) {
}
if (alertType === 'success') {
// eslint-disable-next-line no-self-assign
location = location;
location.reload();
}
const login = new FlyOutAjaxLogin();
......@@ -59,7 +58,7 @@ FlyOutAjaxLogin.prototype.authenticationRequest = function(event, form) {
FlyOutAjaxLogin.prototype.initMenuBar = function() {
const returnUrl = encodeURIComponent(window.location.href);
FlyOutAjaxLogin.callAjax('/index.php?eID=FlyOutAjaxLoginController&returnUrl=' + returnUrl, function (response) {
FlyOutAjaxLogin.callAjax('/index.php?load=FlyOutAjaxLogin&returnUrl=' + returnUrl, function (response) {
if (response !== null || response !== undefined || response !== '') {
const login = JSON.parse(response);
const container = document.querySelector('._login');
......
......@@ -30,7 +30,7 @@ NotifyMessage.prototype.show = function (alertClass, alertHeader, alertText) {
spacing: 10,
z_index: 9000,
delay: 5000,
timer: 1000,
timer: 5000,
width: '50%',
url_target: "_blank",
mouse_over: null,
......
......@@ -44,17 +44,30 @@ $(function () {
noScrollbars: true
});
$('.js__landing-slick-slider').slick({
asNavFor: '.js__landing-slick-slider-nav',
arrows: false,
vertical: false,
responsive: [{
breakpoint: 1024,
settings: {
dots: true
}
}]
});
if ($('.js__landing-slick-slider-nav').length) {
$('.js__landing-slick-slider').slick({
asNavFor: '.js__landing-slick-slider-nav',
arrows: false,
vertical: false,
responsive: [{
breakpoint: 1024,
settings: {
dots: true
}
}]
});
} else {
$('.js__landing-slick-slider').slick({
arrows: false,
vertical: false,
responsive: [{
breakpoint: 1024,
settings: {
dots: true
}
}]
});
}
window.addEventListener("load", function () {
window.cookieconsent.initialise({
"palette": {
......@@ -89,14 +102,16 @@ $(function () {
}
});
$('.js__landing-slick-slider-nav').slick({
asNavFor: '.js__landing-slick-slider',
vertical: true,
swipe: false,
slidesToShow: 5,
focusOnSelect: true,
arrows: false
});
if ($('.js__landing-slick-slider').length) {
$('.js__landing-slick-slider-nav').slick({
asNavFor: '.js__landing-slick-slider',
vertical: true,
swipe: false,
slidesToShow: 5,
focusOnSelect: true,
arrows: false
});
}
var $searchForm = $('.js__main-nav__solr');
// JS behaviour of main navigation
......
......@@ -40,3 +40,7 @@
.label--hide {
display: none;
}
.form-control {
padding: 0.5rem;
}
......@@ -7,7 +7,7 @@ $remPostDecimalPositionNumber: 1000;
// Set font path to Fonts
$fa-font-path: '../Fonts/FontAwesome';
$slick-font-path: '../Fonts/Slick';
$slick-font-path: '../Fonts/Slick/';
$mobile-menu-height: 56px;
$max-page-container-width: 1700px;
$primaryFont: 'Source Sans Pro', sans-serif;
......@@ -783,3 +783,5 @@ $navbar-brand-padding-y: 0;
//
// $pre-color: $gray-900 !default;
// $pre-scrollable-max-height: 340px !default;
$slick-loader-path: "/typo3conf/ext/Resources/Public/Images/ajax-loader.gif";
......@@ -34,6 +34,14 @@
width: auto;
}
.ce-left.ce-intext .ce-bodytext.col-md-8,
.ce-right.ce-intext .ce-bodytext.col-md-8,
.ce-bodytext.col-md-8 {
@include media-breakpoint-up(md) {
max-width: 66.66667%;
}
}
.ce-center .ce-gallery {
text-align: center;
}
......
......@@ -31,26 +31,40 @@
}
h2 {
margin-top: 0 !important;
a {
color: $dark-grey;
color: $key-color;
transition: color 300ms ease;
&:hover {
color: $key-color;
color: $dark-grey;
text-decoration: none;
}
}
}
&-date {
color: $key-color;
.mt-3.mt-lg-4,
.my-lg-4 {
margin-top: 1rem !important;
}
&-date,
&-categories,
&-tags,
&-author {
font-family: $codeFont;
.btn-secondary {
background-color: #f8f9fa;
border-color: #f8f9fa;
margin-top: 1rem !important;
color: $dark-grey;
box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.2);
}
.btn-secondary:hover {
background-color: #f8f9fa;
border-color: #f8f9fa !important;
box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.3);
}
&-date {
color: $dark-grey;
}
&-categories,
......
......@@ -216,10 +216,6 @@
}
}
.slick-loading .slick-list {
background: #fff url('../Images/ajax-loader.gif') center center no-repeat;
}
@include media-breakpoint-down(sm) {
.landing-slider-wrapper {
.landing-slick-slider {
......
......@@ -218,11 +218,13 @@
}
&._search a:before {
font-family: 'Font Awesome 5 Free';
content: '\f002';
}
&._login {
&:not(._in) a:before {
font-family: 'Font Awesome 5 Free';
content: '\f007';
}
......@@ -742,6 +744,7 @@
z-index: 2;
color: $white;
box-shadow: none;
padding-left: 30px;
&:-webkit-autofill {
-webkit-text-fill-color: #fff !important;
......
......@@ -39,7 +39,7 @@
&:after {
content: "\f002";
font: 14px/1 'Font Awesome 5 Free';
font-family: 'Font Awesome 5 Free';
text-rendering: auto;
-webkit-font-smoothing: antialiased;
color: $stage-orange-light;
......
......@@ -8,18 +8,6 @@ typo3-universe {
top: 0;
left: 0;
right: 0;
--universe-link-background: #fff;
--universe-link-color: #212121;
--universe-link-hover-background: #f2f2f2;
--universe-link-hover-color: #212121;
--universe-background-color: #fff;
--universe-button-background: #f2f2f2;
--universe-button-color: #212121;
--universe-button-hover-background: #e2e2e2;
--universe-button-hover-color: #212121;
--universe-caret-color: #f49700;
--universe-maxwidth: 1170px;
}
@media (max-width: 991.99px) {
......@@ -36,3 +24,19 @@ typo3-universe {
max-height: calc(100vh - 100px);
}
}
@media (min-width: 992px) {
typo3-universe {
--universe-link-background: #fff;
--universe-link-color: #212121;
--universe-link-hover-background: #f2f2f2;
--universe-link-hover-color: #212121;
--universe-background-color: #fff;
--universe-button-background: #f2f2f2;
--universe-button-color: #212121;
--universe-button-hover-background: #e2e2e2;
--universe-button-hover-color: #212121;
--universe-caret-color: #f49700;
--universe-maxwidth: 1170px;
}
}
# Used JS Libs
* jquery
* tether (boostrap dependencie)
* popper (boostrap dependencie)
* bootstrap (js)
* typeahead (solar autosugesst)
* datatables.net-bs4 (sortable tables)
* Is conifgured to used by class '.table.sortable'. Could not finde any usage of the class '.sortable'
* slick (slider startpage for example)
* cookieconsent (cookie hint)
* fancybox (used for image zoom on media rendering)
* bootstrap4-notify (used for FlyOutAjaxLogin in 'NotifyMessage.js')
* baguettebox.js (used in gallery rendering as lighbox)
This diff is collapsed.
......@@ -4,27 +4,27 @@
"private": true,
"main": "Gulpfile.js",
"dependencies": {
"@fancyapps/fancybox": "^3.2.5",
"@fortawesome/fontawesome-free": "^5.5.0",
"baguettebox.js": "^1.9.1",
"bootstrap": "^4.1.3",
"bootstrap4-notify": "^4.0.3",
"cookieconsent": "^3.1.0",
"datatables.net-bs4": "^1.10.19",
"gravatar": "^1.6.0",
"h5bp-print-styles": "^4.3.2",
"jquery": "^3.4",
"jquery-typeahead": "^2.10.4",
"popper.js": "^1.14.4",
"slick-carousel": "^1.8.1",
"source-sans-pro": "^2.40.0",
"tether": "^1.4.3"
"@fancyapps/fancybox": "3.2.5",
"@fortawesome/fontawesome-free": "5.5.0",
"baguettebox.js": "1.9.1",
"bootstrap": "4.4.1",
"bootstrap4-notify": "4.0.3",
"cookieconsent": "3.1.0",
"datatables.net-bs4": "1.10.19",
"gravatar": "1.6.0",
"h5bp-print-styles": "4.3.2",
"jquery": "3.4.1",
"jquery-typeahead": "2.10.4",
"popper.js": "1.14.4",
"slick-carousel": "1.8.1",
"source-sans-pro": "2.40.0",
"tether": "1.4.3"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-preset-es2015": "^6.24.1",
"babelify": "^8.0.0",
"browser-sync": "^2.26.3",
"browser-sync": "^2.26.7",
"browserify": "^16.2.3",
"gulp": "^4.0.0",
"gulp-autoprefixer": "^4.1.0",
......@@ -35,14 +35,15 @@
"gulp-file-include": "^2.0.1",
"gulp-plumber": "^1.2.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^4.0.1",
"gulp-sass": "^4.0.2",
"gulp-sourcemaps": "^2.6.3",
"gulp-stylefmt": "^1.1.0",
"gulp-stylelint": "^6.0.0",
"gulp-uglify": "^3.0.0",
"kss": "^3.0.0-beta.23",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0"
"vinyl-source-stream": "^2.0.0",
"node-sass": "^4.13.1"
},
"config": {
"path": {
......@@ -53,9 +54,9 @@
}
},
"scripts": {
"build": "./node_modules/.bin/gulp build",
"build-prod": "./node_modules/.bin/gulp build-prod",
"start": "./node_modules/.bin/gulp default",
"ci": "./node_modules/.bin/gulp ci"
"build": "npx gulp build",
"build-prod": "npx gulp build-prod",
"start": "npx gulp default",
"ci": "npx gulp ci"
}
}
......@@ -2,9 +2,13 @@
namespace T3o\T3olayout\Backend\ViewHelpers;
class ResolveFileReferenceViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
class ResolveFileReferenceViewHelper extends AbstractViewHelper
{
use \TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
use CompileWithRenderStatic;
/**
* Initialize arguments
......@@ -22,9 +26,9 @@ class ResolveFileReferenceViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Ab
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return string
* @throws Exception
* @throws \Exception
*/
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
{
return \TYPO3\CMS\Backend\Utility\BackendUtility::resolveFileReferences('tt_content', 'assets', $arguments['row']);
}
......
<?php
namespace T3o\T3olayout\Controller;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Mvc\Web\Response;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Fluid\View\StandaloneView;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\Utility\EidUtility;
/**
* Class AjaxFrontendLoginController
*
* @target Frontend
*/
class FlyOutAjaxLoginController
{
public static function processLogin()
{
EidUtility::initTCA();
self::getTypoScriptFrontendController();
$feUser = EidUtility::initFeUser();
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$response = $objectManager->get(Response::class);
$response->setHeader('Content-Type', 'application/json; charset=utf-8');
$configurationManager = $objectManager->get(ConfigurationManager::class);
$typoScriptSetup = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
$contentObjectRenderer = $objectManager->get(ContentObjectRenderer::class);
$loginPid = $contentObjectRenderer->cObjGetSingle(
$typoScriptSetup['lib.']['loginPid'],
$typoScriptSetup['lib.']['loginPid.']
);
$loginFormPid = $contentObjectRenderer->cObjGetSingle(
$typoScriptSetup['lib.']['loginFormPid'],
$typoScriptSetup['lib.']['loginFormPid.']
);
$menuBarTemplate = $objectManager->get(StandaloneView::class);
$menuBarTemplate->setTemplatePathAndFilename('EXT:t3olayout/Resources/Private/Templates/Felogin/MenuBarAjaxLogin.html');
$menuBarTemplate->assign('user', $feUser->user);
$menuBarTemplate->assign('loginPid', $loginPid);
$menuBarTemplate->assign('loginFormPid', $loginFormPid);
echo json_encode(
[
'loginPid' => $loginPid,
'loginFormPid' => $loginFormPid,
'loggedIn' => $feUser->user['ses_userid'] > 0,
'menuBarTemplate' => $menuBarTemplate->render()
]
);
$response->send();
exit;
}
/**
* Initialize the typoscript frontend controller
*
* @param int $pid
*/
private static function getTypoScriptFrontendController($pid = 1)
{
/** @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $frontend */
$frontend = GeneralUtility::makeInstance(
\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class,
null,
$pid,
0
);
$GLOBALS['TSFE'] = $frontend;
$frontend->initFEuser();
$frontend->determineId();
$frontend->initTemplate();
$frontend->getConfigArray();
}
}
<?php
namespace T3o\T3olayout\DataProcessing;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentDataProcessor;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
/**
* This menu processor utilizes HMENU to generate a json encoded menu
* string that will be decoded again and assigned to FLUIDTEMPLATE as
* variable. Additional DataProcessing is supported and will be applied
* to each record.
*
* Options:
* as - The variable to be used within the result
* levels - Number of levels of the menu
* expandAll = If false, submenus will only render if the parent page is active
* includeSpacer = If true, pagetype spacer will be included in the menu
* titleField = Field that should be used for the title
*
* See HMENU docs for more options.
* https://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Hmenu/Index.html
*
*
* Example TypoScript configuration:
*
* 10 = t3o\t3olayout\DataProcessing\MenuProcessor
* 10 {
* special = list
* special.value.field = pages
* levels = 7
* as = menu
* expandAll = 1
* includeSpacer = 1
* titleField = nav_title // title
* dataProcessing {
* 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
* 10 {
* references.fieldName = media
* }
* }
* }
*/
class MenuProcessor implements DataProcessorInterface
{
const LINK_PLACEHOLDER = '###LINKPLACEHOLDER###';
const TARGET_PLACEHOLDER = '###TARGETPLACEHOLDER###';
/**
* The content object renderer
*
* @var ContentObjectRenderer
*/
public $cObj;
/**
* The processor configuration
*
* @var array
*/
protected $processorConfiguration;
/**
* Allowed configuration keys for menu generation, other keys
* will throw an exception to prevent configuration errors.
*
* @var array
*/
public $allowedConfigurationKeys = [
'cache_period',