Skip to content

Instantly share code, notes, and snippets.

@ABooooo
ABooooo / new_gist_file.php
Created August 13, 2015 08:35
realURL and news system
//realurl_config.php (we have to change two files)
// change "newsDetailConfiguration" with a blog single page id
<?php
$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',tx_realurl_pathsegment';
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
'pagePath' => array(
'type' => 'user',
@ABooooo
ABooooo / new_gist_file.js
Created August 14, 2015 08:28
change html tag
/* change h3 to h2 in blog list view */
$(function() {
$('.news-list-view h3').each(function(i, em) {
$(em).replaceWith('<h2>'+$(em).html()+'</h2>');
});
});
@ABooooo
ABooooo / Web source
Created August 19, 2015 07:05
RTE Classes
https://axelerant.com/add-custom-css-classes-to-the-typo3-rte/
@ABooooo
ABooooo / new_gist_file.js
Created August 21, 2015 10:25
change style parameter on mouse over / out
$( "a" ).has( "img" ).mouseenter(function(){
$(this).css("color", "#870036");
});
$( "a" ).has( "img" ).mouseleave(function(){
$(this).css("color", "black");
});
@ABooooo
ABooooo / new_gist_file.js
Created September 16, 2015 11:34
get data from json
// check url
var url = window.location.pathname;
var output = url.indexOf('/events')!=-1;
//alert (output[0]);
if (output) {
(function eventsData() {
@ABooooo
ABooooo / new_gist_file.js
Last active November 1, 2018 08:13
check img width and add class
// add img responsive class
$.each($('.news img'), function (index, item) {
if ($(item).width() >= 600) {
$(item).addClass("img-responsive");
}
});
@ABooooo
ABooooo / new_gist_file.ts
Last active November 1, 2018 08:13
Add video with DCE
// cinfiguration = file abstration layer
// field = filed name in configuration
<f:for each="{dce:fal(field:'jpg_data', contentObject:contentObject)}" as="fileReference">
<video poster="{f:uri.image(src:fileReference.uid,treatIdAsReference:1)}" autoplay="autoplay" preload="preload">
</f:for>
<f:for each="{dce:fal(field:'mp4_data', contentObject:contentObject)}" as="fileReference">
<source type="video/mp4" src="{f:uri.image(src:fileReference.uid,treatIdAsReference:1)}" />
</f:for>
<f:for each="{dce:fal(field:'webm_data', contentObject:contentObject)}" as="fileReference">
@ABooooo
ABooooo / new_gist_file_0
Created October 28, 2015 13:44
fullscreen background
body {
background-image: url(../img/bg.jpg);
background-position: top center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% auto;
background-color: $whiteColor;
}
@ABooooo
ABooooo / new_gist_file.css
Created October 29, 2015 09:23
box sizing
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
@ABooooo
ABooooo / new_gist_file.html
Last active November 1, 2018 08:12
DCE format
// RTE
<f:format.html>{field.zitatText}</f:format.html>
// Single line text
<p>{field.zitatAutor}</p>
// Image (field:'variableName')
<f:for each="{dce:fal(field:'sliderImage', contentObject:contentObject)}" as="fileReference">
<f:image class="img-responsive" src="{fileReference.uid}" alt="" treatIdAsReference="1" />
</f:for>