Skip to content

Instantly share code, notes, and snippets.

@andreasisaak
andreasisaak / development.scss
Created June 12, 2014 10:19
Example usage: show the red bordered body only in development mode
@if compass-env() == 'development' {
body {
border:1px solid red;
}
}
@andreasisaak
andreasisaak / fe_page.html5
Created June 5, 2014 19:34
footerStickAlt
<?php $this->extend('fe_page'); ?>
<?php $this->block('footer'); $this->endblock(); ?>
<?php $this->block('body'); ?>
<?php $this->parent(); ?>
<?php if ($this->footer): ?>
<footer id="footer">
<div class="inside">
<?php echo $this->footer; ?>
</div>

Keybase proof

I hereby claim:

  • I am andreasisaak on github.
  • I am andreasisaak (https://keybase.io/andreasisaak) on keybase.
  • I have a public key whose fingerprint is 2A85 BA6A 9EA0 6AF7 A9E8 5A18 28C6 CD10 46A0 5FD2

To claim this, I am signing this object:

/**
* Powered by parallax - The ultimative parallax script for Contao
*
* Copyright ©2012-2013 by MEN AT WORK <info@men-at-work.de>
* Visit the agency website at http://www.men-at-work.de for more information
*
* @package ParallaxXtend
* @copyright MEN AT WORK
* @link http://www.contao-parallax.com
* @license EULA
@andreasisaak
andreasisaak / gist:7085018
Created October 21, 2013 14:41
Use contao functions to trim text
<?php
echo '<p class="teaser">' . String::getInstance()->substr($this->text, 80) . '</p>';
?>
@andreasisaak
andreasisaak / gist:7084979
Created October 21, 2013 14:40
Use retina images in template files
<?php $objInput = Input::getInstance(); ?>
<?php $objCookie = json_decode($objInput->cookie("retina")); ?>
<?php echo ($objCookie->hasRetina) ? $this->getImage('src', 'retina_width', 'retina_height') : $this->getImage('src', 'width', 'height'); ?>
.logo {
width: 204px;
height: 100px;
background: url('/img/logo.png');
}
@media
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
@andreasisaak
andreasisaak / gist:5712103
Last active December 18, 2015 02:39 — forked from tim-bec/gist:5711780
<?php
#Vorbereiten
$longtext = MetaModelFactory::byTableName('mm_projects')->findById($arrItem['raw']['project']['id'])->get('introduction');
# Longtext an string übergeben
echo String::getInstance()->substr($longtext['value'], 120);
?>
@andreasisaak
andreasisaak / gist:5020632
Created February 23, 2013 17:46
No need to replace "domain.com" with this improvement https://github.com/contao/core/pull/4555
## Uncomment to rewrite domain.com to www.domain.com
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
## Uncomment to rewrite www.domain.com to domain.com
#RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
#RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
// prevent click
$('nav').addEvent('click', function(event){
event.stop();
});