Skip to content

Instantly share code, notes, and snippets.

View fieke's full-sized avatar

Sofie Verreyken fieke

View GitHub Profile
@vdchristelle
vdchristelle / only_variables_passed_by_reference_1679118_4.patch
Created February 6, 2014 09:56
Video embed field module 7.x-2.0-beta5 - Strict warning: 'Only variables should be passed by reference in template_preprocess' Bron: https://drupal.org/node/1679118
diff --git a/video_embed_field.module b/video_embed_field.module
index 54491d4..8a45ebb 100755
--- a/video_embed_field.module
+++ b/video_embed_field.module
@@ -354,7 +354,8 @@ function template_preprocess_video_embed_field_embed_code(&$variables) {
// Prepare embed code
if ($handler && isset($handler['function']) && function_exists($handler['function'])) {
- $variables['embed_code'] = drupal_render(call_user_func($handler['function'], $variables['url'], $variables['style_settings']));
+ $embed_code = call_user_func($handler['function'], $variables['url'], $variables['style_settings']);
@vdchristelle
vdchristelle / offcanvas.scss
Created December 9, 2013 11:41
off canvas top region
// OFF-CANVAS TOP REGION
#top {
background: $grey-light;
color: $white;
overflow: hidden;
> .container {
position: relative;
overflow: hidden;
height: 5em;
-webkit-transition: height 0.5s ease-out;
@vdchristelle
vdchristelle / _variables.scss
Created December 5, 2013 10:58
Testtool breakpoint: op iPad heb je idd break-1 en break-3… => komt vanuit the_aim_theme, base font iets kleiner gezet en nu gaat hij op iPad van break-2 naar break-3
//-- FONT SETTINGS --
//-------------------
$base-font-size: 13.5px;
@vdchristelle
vdchristelle / colorbox-extra.js
Created December 5, 2013 10:42
colorbox gallery Overview page with teasers: we want every teaser to be a gallery of its own and not all images off all teasers in 1 colorbox solution: add specific class per gallery on the a elements
// references
// loop through teasers
// add different rel to each li
// for colorbox to see each teaser as a separate gallery
var count = 0;
$('ul.references.overview li').each(function(){
$(this).find('.colorbox a').attr('rel','gallery-'+count);
// add class to first list item, to be able to hide all others
$(this).find('ul li:first').addClass('show');
count++;
@vdchristelle
vdchristelle / insert.scss
Created December 5, 2013 07:30
WYSIWYG inserted styles
img.inserted {
width: 50%;
float: left;
}
.left .inserted {
float: left;
margin: rhythm(0.3) rhythm(0.5) rhythm(0.25) 0;
}
.right .inserted {
@vdchristelle
vdchristelle / width.scss
Created December 3, 2013 15:48
calculate width by colums and gutter
width: columns(4,9) + (columns(1,9)/2) + (gutter(9)/2);
margin-right: gutter(9);
@vdchristelle
vdchristelle / google_map_custom_icon.html
Last active June 7, 2016 09:58
Google map with custom icon + custom balloon Google Maps Custom markers info: https://developers.google.com/maps/tutorials/customizing/custom-markers Google MAPS API: https://developers.google.com/maps/documentation/javascript/reference#InfoWindow -------> ATTENTION: do not put this code in de document load part <---------------
// add this to your html page (e.g. in a block)
<div id="map_canvas">map_canvas</div>
@vdchristelle
vdchristelle / team_members.scss
Created November 22, 2013 08:30
Team members
//--------------
//---- TEAM ----
//--------------
ul.team {
@include span-columns($total-columns);
padding: 0 !important;
li {
list-style: none;
@include span-columns($total-columns);
border-bottom: 1px solid $grey;
@vdchristelle
vdchristelle / responsive-table.scss
Created November 21, 2013 11:27
Responsive table
/* Responsive table */
@media all and (max-width: 640px) {
.table,
.row,
.column,
.column:before {
display: inline-block;
/* Converts a table, table row, table column and table column:before into a block element */
}
@vdchristelle
vdchristelle / template.php
Created November 21, 2013 10:29
Wrapper around the term description field (because display suite does not allow) Base theme strips the prefix & suffix, you can reset it in your custom theme
/**
* Implements template_preprocess_taxonomy_term().
*/
function YOURTHEME_preprocess_taxonomy_term(&$variables) {
// Add taxonomy term description wrapper
$variables['content']['description']['#prefix'] = '';
$variables['content']['description']['#suffix'] = '';
}