Skip to content

Instantly share code, notes, and snippets.

View babsgosgens's full-sized avatar
🤡
Life’s a parade

Babs Gösgens babsgosgens

🤡
Life’s a parade
  • Rosmalen, Netherlands
View GitHub Profile
{
"name": {
"en-GB": "Single article"
},
"description": {
"en-GB": "Single article output – header and body"
},
"template": "containers/global/group/group.html.twig",
"template_config": {
"config": {
@babsgosgens
babsgosgens / Hero.json
Created September 27, 2018 10:52 — forked from ItsReaSz/Hero.json
Hero with optional promotional slogan
{
"name": {
"en-GB": "Hero"
},
"description": {
"en-GB": "Hero with optional promotional slogan"
},
"template": "containers/media/hero/hero-slogan.html.twig",
"template_config": {
"model": {
@function em($target, $context: $base-font-size) {
@if $target == 0 { @return 0 }
@return $target / $context + 0em;
}
$base-font-size: 15px;
h1 {
font-size: em(21px, 15px); // Outputs 1.4em
}
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
$red: #ff4242;
// Declare this variable early
$parent-classes: ();
// This document is a compilated resource from various documents on good practices found elsewhere (see a list of resources at the end of this document).
// We hesitate to use the words 'good' or 'bad', since this is a contributor's guide for our code base and not a critique of techniques. We've replaced them with:
// No (as in, not our way) and Yes (this is what we expect from contributions)
// Elements can be referred to as Tags or Elements, or both
/* General principles */
// All code in any code-base should look like a single person typed it, no matter how many people contributed.
@babsgosgens
babsgosgens / calc-elem.scss
Created November 13, 2012 20:58 — forked from moyarich/calc-elem.scss
using SASS to convert/calculate css sizes from px to em, px to percent and em to px; also has function to remove units / (Design in pixels then convert it to em or percent)
//----- Global variables-------------
$mr-grid-width: 1200px !default; // The wrapper/container size$mr-gutter-width: 20px !default; // The amount of margin between columns
$mr-em-base: 16px !default;
$mr-convert-to: "%" !default;
//----------------------------------
@function -mr-grid-col-width($cols, $grid-width:$mr-grid-width, $grid-total-cols:$mr-grid-total-column, $gutter-width: $mr-gutter-width){
//$cols The number of columns used to create the current elements width.
@return ($grid-width / $grid-total-cols) * $cols - $gutter-width;
@babsgosgens
babsgosgens / calc-elem.scss
Created September 3, 2012 13:09 — forked from moyarich/calc-elem.scss
using SASS to convert/calculate css sizes from px to em, px to percent and em to px; also has function to remove units / (Design in pixels then convert it to em or percent)
//----- Global variables-------------
$mr-grid-width: 1200px !default; // The wrapper/container size$mr-gutter-width: 20px !default; // The amount of margin between columns
$mr-em-base: 16px !default;
$mr-convert-to: "%" !default;
//----------------------------------
@function -mr-grid-col-width($cols, $grid-width:$mr-grid-width, $grid-total-cols:$mr-grid-total-column, $gutter-width: $mr-gutter-width){
//$cols The number of columns used to create the current elements width.
@return ($grid-width / $grid-total-cols) * $cols - $gutter-width;
@babsgosgens
babsgosgens / list.php
Created August 3, 2012 07:04 — forked from AmyStephen/list.php
To create a .gitignore with a list of all files in Repository
<?php
/**
* @package Molajo
* @copyright 2012 Amy Stephen. All rights reserved.
* @license GNU GPL v 2, or later and MIT, see License folder
*
* Place in the root of your website - execute it - and copy the results into your .gitignore
*/
$current_path = __DIR__;