Commit aef8b029 authored by Thomas Löffler's avatar Thomas Löffler

Merge branch 'develop' into 'master'

Merge develop state into master

See merge request !220
parents 34944f76 a8720df4
const FlyOutAjaxLogin = function (props) {
FlyOutAjaxLogin.settings = props;
};
/**
*
* @param {string} url
* @param {function} callback
*/
FlyOutAjaxLogin.callAjax = function (url, callback) {
const xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
return callback(xmlhttp.responseText);
}
};
xmlhttp.open("GET", url, true);
xmlhttp.send();
};
FlyOutAjaxLogin.prototype.init = function () {
FlyOutAjaxLogin.callAjax('/index.php?eID=FlyOutAjaxLoginController', function (response) {
if (response !== null || response !== undefined || response !== '') {
const login = JSON.parse(response);
const container = document.querySelector('._login');
container.innerHTML = login.menuBarTemplate;
const aim = document.querySelector('.js__full-width-dropdown__lvl-down[data-parent-lvl1="' + login.loginFormPid + '"]');
const wrapper = document.createElement('div');
wrapper.classList = 'd-flex flex-row m-auto';
wrapper.innerHTML = login.flyOutTemplate;
aim.innerHTML = '';
aim.appendChild(wrapper);
}
})
};
module.exports = FlyOutAjaxLogin;
......@@ -34,8 +34,17 @@ require('jquery-typeahead');
*/
const baguetteBox = require('baguettebox.js');
/**
* Load tether into global `AjaxLogin`
*/
const FlyOutAjaxLogin = require('./Module/FlyOutAjaxLogin');
$(function() {
const login = new FlyOutAjaxLogin();
login.init();
baguetteBox.run('.js-gallery', {
noScrollbars: true
});
......@@ -66,16 +75,16 @@ $(function() {
var $searchForm = $('.js__main-nav__solr');
// JS behaviour of main navigation
// show item of second level (desktop view)
$('.js__main-nav__list-item_link').on('click', function(e) {
$(document).on('click', '.js__main-nav__list-item_link', function(e) {
e.stopPropagation();
var $this = $(this),
$parent = $this.parent(),
sub = $this.data('sub');
sub = $this.attr('data-sub');
if (window.matchMedia("(min-width: 992px)").matches && sub) {
e.preventDefault();
var id = $this.data('id');
var id = $this.attr('data-id');
// if first level item has sub level
// second level
var $aim = $('.js__full-width-dropdown__lvl-down._lvl-2[data-parent-lvl1="' + id + '"]');
......
......@@ -143,8 +143,7 @@
@media (min-width: 992px) {
padding: 30px;
width: 80px;
color: transparent;
font-size: 0;
color: $white;
border-left: 1px solid $whiteOpacity;
}
......@@ -158,6 +157,7 @@
color: $white;
width: 20px;
opacity: 1;
content: unset;
@media (max-width: 991px) {
margin-right: 5px;
......@@ -374,16 +374,13 @@
top: 0;
left: 0;
width: 0;
padding-right: 0;
will-change: transform;
transition: visibility 0.5s ease;
transform-origin: right;
right: 0;
overflow-x: hidden;
&._visible {
width: 100%;
width: auto;
z-index: 3;
max-width: 732px;
margin-right: 160px;
}
.typeahead {
......@@ -477,8 +474,8 @@
&._lvl-2 {
width: 100%;
min-height: 380px;
max-height: 50vh;
min-height: 460px;
max-height: 60vh;
}
.sub-nav {
......@@ -494,7 +491,7 @@
position: absolute;
content: '';
right: 0;
top: 50px;
top: 0;
bottom: 15px;
width: 1px;
display: block;
......@@ -511,7 +508,7 @@
&._lvl-3 {
display: none;
margin-top: 70px;
margin-top: 65px;
padding-left: 10px;
&._visible {
......@@ -526,6 +523,7 @@
display: block;
color: $greyDark;
padding: 10px 20px;
line-height: 1.25;
&:focus,
&:active,
......
......@@ -5,7 +5,7 @@
"main": "Gulpfile.js",
"dependencies": {
"baguettebox.js": "^1.8.2",
"bootstrap": "^4.0.0-alpha.6",
"bootstrap": "4.0.0-alpha.6",
"font-awesome": "^4.7.0",
"isotope-layout": "^3.0.4",
"jquery": "^3.2.1",
......
<?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
{
/**
* @return void
*/
public static function processLogin()
{
EidUtility::initTCA();
self::getTypoScriptFrontendController();
$feUser = EidUtility::initFeUser();
if (is_null($feUser->user)) {
exit;
}
$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);
$flyOutTemplate = $objectManager->get(StandaloneView::class);
$flyOutTemplate->setTemplatePathAndFilename('EXT:t3olayout/Resources/Private/Templates/Felogin/FlyOutAjaxLogin.html');
$flyOutTemplate->assign('user', $feUser->user);
$flyOutTemplate->assign('loginPid', $loginPid);
$flyOutTemplate->assign('loginFormPid', $loginFormPid);
echo json_encode(
[
'loginPid' => $loginPid,
'loginFormPid' => $loginFormPid,
'menuBarTemplate' => $menuBarTemplate->render(),
'flyOutTemplate' => $flyOutTemplate->render()
]
);
$response->send();
}
/**
* Initialize the typoscript frontend controller
*
* @param int $pid
*
* @return void
*/
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->connectToDB();
$frontend->initFEuser();
$frontend->determineId();
$frontend->initTemplate();
$frontend->getConfigArray();
}
}
#################
#### TCEFORM ####
#################
TCEFORM {
pages {
}
}
TCEFORM.tt_content {
frame_class {
addItems.200 = Card small
addItems.201 = Card medium
addItems.202 = Card large
}
imagecols{
removeItems = 8,7,6,5
}
}
## Default Image cropping ##
TCEFORM.sys_file_reference.crop.config.cropVariants {
default {
title = Desktop
selectedRatio = NaN
allowedAspectRatios {
NaN {
title = Free
value = 0.0
}
21:9 {
title = 21:9
value = 2.3333333
}
16:9 {
title = 16:9
value = 1.7777777
}
5:2 {
title = 5:2
value = 2.5
}
4:3 {
title = 4:3
value = 1.3333333
}
3:2 {
title = 3:2
value = 1.5
}
1:1 {
title = 1:1
value = 1
}
pages {
alias.disabled = 1
author.disabled = 1
author_email.disabled = 1
cache_tags.disabled = 1
cache_timeout.disabled = 1
categories.disabled = 1
content_from_pid.disabled = 1
editlock.disabled = 1
extendToSubpages.disabled = 1
is_siteroot.disabled = 1
l18n_cfg.disabled = 1
lastUpdated.disabled = 1
layout.disabled = 1
module.disabled = 1
newUntil.disabled = 1
no_cache.disabled = 1
php_tree_stop.disabled = 1
storage_pid.disabled = 1
target.disabled = 1
TSconfig.disabled = 1
tsconfig_includes.disabled = 1
}
tt_content {
accessibility_bypass.disabled = 1
accessibility_bypass_text.disabled = 1
accessibility_title.disabled = 1
categories.disabled = 0
cols.disabled = 1
colPos.disabled = 0
date.disabled = 1
disable_stretching.disabled = 0
editlock.disabled = 1
frame_class {
addItems.200 = Card small
addItems.201 = Card medium
addItems.202 = Card large
removeItems := addToList(default,ruler-before,ruler-after,indent,indent-left,indent-right)
}
}
tablet {
title = Tablet
selectedRatio = NaN
allowedAspectRatios {
NaN {
title = Free
value = 0.0
}
21:9 {
title = 21:9
value = 2.3333333
}
16:9 {
title = 16:9
value = 1.7777777
}
4:3 {
title = 4:3
value = 1.3333333
}
3:2 {
title = 3:2
value = 1.5
}
1:1 {
title = 1:1
value = 1
}
header_position.disabled = 1
header_link.disabled = 0
image_zoom.disabled = 0
imageborder.disabled = 1
image_compression.disabled = 1
image_effects.disabled = 1
imagecols {
removeItems = 8,7,6,5
}
imageorient {
removeItems := addToList(1,2,9,10)
}
imagewidth.disabled = 1
imageheight.disabled = 1
image_noRows.disabled = 1
imagecaption_position.disabled = 1
linkToTop.disabled = 1
recursive.disabled = 1
rowDescription.disabled = 1
rte_enabled.disabled = 1
sectionIndex.disabled = 1
select_key.disabled = 1
space_after_class.disabled = 1
space_before_class.disabled = 1
spaceAfter.disabled = 1
spaceBefore.disabled = 1
subheader.disabled = 0
}
mobile {
title = Mobile
selectedRatio = NaN
allowedAspectRatios {
NaN {
title = Free
value = 0.0
}
21:9 {
title = 21:9
value = 2.3333333
}
16:9 {
title = 16:9
value = 1.7777777
}
4:3 {
title = 4:3
value = 1.3333333
sys_file_reference.crop.config.cropVariants {
default {
title = Desktop
selectedRatio = NaN
allowedAspectRatios {
NaN {
title = Free
value = 0.0
}
21:9 {
title = 21:9
value = 2.3333333
}
16:9 {
title = 16:9
value = 1.7777777
}
5:2 {
title = 5:2
value = 2.5
}
4:3 {
title = 4:3
value = 1.3333333
}
3:2 {
title = 3:2
value = 1.5
}
1:1 {
title = 1:1
value = 1
}
}
}
3:2 {
title = 3:2
value = 1.5
tablet {
title = Tablet
selectedRatio = NaN
allowedAspectRatios {
NaN {
title = Free
value = 0.0
}
21:9 {
title = 21:9
value = 2.3333333
}
16:9 {
title = 16:9
value = 1.7777777
}
4:3 {
title = 4:3
value = 1.3333333
}
3:2 {
title = 3:2
value = 1.5
}
1:1 {
title = 1:1
value = 1
}
}
}
1:1 {
title = 1:1
value = 1
mobile {
title = Mobile
selectedRatio = NaN
allowedAspectRatios {
NaN {
title = Free
value = 0.0
}
21:9 {
title = 21:9
value = 2.3333333
}
16:9 {
title = 16:9
value = 1.7777777
}
4:3 {
title = 4:3
value = 1.3333333
}
3:2 {
title = 3:2
value = 1.5
}
1:1 {
title = 1:1
value = 1
}
}
}
}
}
## Default Image cropping - END ##
TCEMAIN {
TCEMAIN.permissions {
# groupid =
everybody = show
user = show
group = show
}
\ No newline at end of file
......@@ -2,6 +2,9 @@ lib {
loginPid = TEXT
loginPid.value = {$styles.content.loginform.pid}
loginFormPid = TEXT
loginFormPid.value = {$tx_t3olayout.page.loginid}
forgotPasswordPageURL = TEXT
forgotPasswordPageURL.value = {$tx_t3olayout.page.forgotPasswordURL}
......
page {
headerData {
1501157682 = TEXT
1501157682.value (
<!-- Piwik -->
<script type=“text/javascript”>
var _paq = _paq || [];
/* tracker methods like “setCustomDimension” should be called before “trackPageView” */
_paq.push([“setCookieDomain”, “*.typo3.org”]);
_paq.push([‘trackPageView’]);
_paq.push([‘enableLinkTracking’]);
(function() {
var u=“//piwik.typo3.org/“;
_paq.push([‘setTrackerUrl’, u+‘piwik.php’]);
_paq.push([‘setSiteId’, ‘2’]);
var d=document, g=d.createElement(‘script’), s=d.getElementsByTagName(‘script’)[0];
g.type=‘text/javascript’; g.async=true; g.defer=true; g.src=u+‘piwik.js’; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src=“//piwik.typo3.org/piwik.php?idsite=2&rec=1” style=“border:0;” alt=“” /></p></noscript>
<!-- End Piwik Code -->
)
}
meta {
viewport = {$page.meta.viewport}
robots = {$page.meta.robots}
......
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:spaceless>
<section class="container">
<section class="{f:if(condition: '{data.frame_class} >= 200', then: '{f:render(partial: \'ContentElements/CardClasses\', arguments:_all) -> f:spaceless()}', else: 'container')}">
<f:if condition="{data.frame_class} != none">
<f:then>
<div id="c{data.uid}" class="frame frame-{data.frame_class} frame-type-{data.CType} frame-layout-{data.layout}{f:if(condition: data.space_before_class, then: ' frame-space-before-{data.space_before_class}')}{f:if(condition: data.space_after_class, then: ' frame-space-after-{data.space_after_class}')} {f:render(partial: 'ContentElements/CardClasses', arguments:_all) -> f:spaceless()}">
<div id="c{data.uid}" class="frame frame-{data.frame_class} frame-type-{data.CType} frame-layout-{data.layout}{f:if(condition: data.space_before_class, then: ' frame-space-before-{data.space_before_class}')}{f:if(condition: data.space_after_class, then: ' frame-space-after-{data.space_after_class}')}">
<f:if condition="{data._LOCALIZED_UID}">
<a id="c{data._LOCALIZED_UID}"></a>
</f:if>
......
<html xmlns:f="http://typo3.org/ns/typo3/cms-fluid/master/ViewHelpers" xmlns:t="http://typo3.org/ns/T3o/T3olayout/ViewHelpers" data-namespace-typo3-fluid="true">
<span><f:format.raw><t:gravatar emailAddress="{user.email}" size="100" /></f:format.raw></span>
<form action="{f:uri.page()}" method="post">
<div class="hidden">
<input type="hidden" name="logintype" value="logout">
<input type="hidden" name="pid" value="{f:cObject(typoscriptObjectPath:'lib.loginPid')}">
<input type="hidden" name="redirect_url" value="{f:uri.page()}">
</div>
<h3>Hello {user.name}!</h3>
<p>Everybody can contribute. Get in contact with the teams.</p>
<div class="d-flex justify-content-between">
<button type="submit" class="btn btn-secondary btn-lg">Logout</button>