This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements template_preprocess_field(). | |
*/ | |
function EXAMPLE_preprocess_field(&$vars) { | |
/* | |
* theme_hook_suggestion: | |
* $variables['theme_hook_suggestions'] = array( | |
'field__' . $element['#field_type'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<title>Vertical centering - 3WA</title> | |
<style> | |
/* border box ftw*/ | |
*, *::before, *::after { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-size: 62.5%; /* font-size 1em = 10px */ | |
} | |
p { | |
font-size: 1.6em; /* 1.6em = 16px */ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From https://github.com/opi/basement/blob/7.x-1.x/js/basement.js#L29 | |
// Enlarge Your Click Zone : allow link'parent element to be clickable too | |
var enlargeYourClick = function(selector){ | |
$(selector).click(function(e){ | |
// don't handle if user click on a link, or if he click with mouse wheel | |
if (e.target.tagName != "A" && e.button != 1) { | |
var firstLink = $(this).find('a:first'), | |
dest = firstLink.attr('href'), | |
blank = firstLink.attr('target'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Placer ce code directement après l'ouverture du <body> --> | |
<!--[if lte IE 9]> | |
<p class="browsehappy">Vous utilisez un navigateur <strong>dépassé</strong>. Merci de <a href="http://browsehappy.com/">mettre à jour votre navigateur</a> pour améliorer votre expérience sur ce site.</p> | |
<![endif]--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Favicons --> | |
<link rel="apple-touch-icon" sizes="57x57" href="/icon/apple-touch-icon-57x57.png"> | |
<link rel="apple-touch-icon" sizes="114x114" href="/icon/apple-touch-icon-114x114.png"> | |
<link rel="apple-touch-icon" sizes="72x72" href="/icon/apple-touch-icon-72x72.png"> | |
<link rel="apple-touch-icon" sizes="144x144" href="/icon/apple-touch-icon-144x144.png"> | |
<link rel="apple-touch-icon" sizes="60x60" href="/icon/apple-touch-icon-60x60.png"> | |
<link rel="apple-touch-icon" sizes="120x120" href="/icon/apple-touch-icon-120x120.png"> | |
<link rel="apple-touch-icon" sizes="76x76" href="/icon/apple-touch-icon-76x76.png"> | |
<link rel="apple-touch-icon" sizes="152x152" href="/icon/apple-touch-icon-152x152.png"> | |
<link rel="icon" type="image/png" href="/icon/favicon-196x196.png" sizes="196x196"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drush field-create CONTENT_TYPE field_FIELD_NAME,text_long,text_textarea | |
drush field-create CONTENT_TYPE field_FIELD_NAME,text,text_textfield | |
drush field-create CONTENT_TYPE field_FIELD_NAME,list_text,options_select | |
drush field-create CONTENT_TYPE field_FIELD_NAME,number_integer,number | |
drush field-create CONTENT_TYPE field_FIELD_NAME,number_decimal,number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Fix seven CSS stupidity */ | |
.wysiwyg-toggle-wrapper { | |
border-left: 1px solid #ccc; | |
border-right: 1px solid #ccc; | |
padding: 0 8px; | |
} | |
.filter-wrapper, | |
.wysiwyg-toggle-wrapper { | |
margin-right: 1px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Holds relevant functions for paragraph field formatters. | |
*/ | |
/** | |
* Implements hook_field_formatter_info(). | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Views page and feeds list | |
$views = array(); | |
foreach (views_get_enabled_views() as $view_name => $view) { | |
// Filter views having no display | |
if (count($view->display) > 1 && (strpos($view_name, 'admin') === FALSE)) { | |
$views[$view_name] = array( | |
'#theme' => 'item_list', | |
'#title' => $view->human_name, |