Skip to content

Instantly share code, notes, and snippets.

View christophengelmayer's full-sized avatar

Christoph Engelmayer christophengelmayer

View GitHub Profile
@tomraithel
tomraithel / .htaccess 2
Created February 25, 2013 21:51
LARAVEL: .htaccess configuration on domain-factory
# Apache configuration file
# http://httpd.apache.org/docs/2.2/mod/quickreference.html
# Note: ".htaccess" files are an overhead for each request. This logic should
# be placed in your Apache config whenever possible.
# http://httpd.apache.org/docs/2.2/howto/htaccess.html
# Turning on the rewrite engine is necessary for the following rules and
# features. "+FollowSymLinks" must be enabled for this to work symbolically.
@somatonic
somatonic / from.php
Last active June 26, 2018 19:23
Create a page edit form on frontend using PW API and fields from the template of the page
<?php
// get a page
$editpage = $pages->get("/editme/");
$ignorefields = array("isOld","language_published");
$form = $modules->get("InputfieldForm");
$form->method = 'post';
$form->action = './';
@soulcyon
soulcyon / lazyloadwebfonts.js
Last active October 25, 2015 13:58
Google Webfonts - Lazy Loader
WebFontConfig = {
/* Add your desired font family here, its a simple Javascript array */
google: { families: [ 'Ubuntu' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
@stefansl
stefansl / contao_og
Last active October 13, 2015 07:38
Contao - opengraph tags in page layout
<meta property="og:image" content="{{env::url}}/files/_theme/images/facebook_preview.png" />
<meta property="og:url" content="{{env::path}}{{env::request}}" />
<meta property="og:site_name" content="{{page::rootTitle}}" />
<meta property="og:title" content="{{page::pageTitle}}" />
<meta property="og:type" content="website" />

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables