This file contains 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
(function($) { | |
// equalHeights - compare two or more elements and animate them all to the | |
// same (min-)height. | |
// You'll need jQuery for this to work. | |
$.fn.equalHeight = function() { | |
var heights = []; | |
var height; | |
$(this).each(function() { | |
// Cache the current height. |
This file contains 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 hook_mail_alter() | |
* Send mails to a file for easy debugging | |
*/ | |
function mail_themer_mail_alter(&$message) { | |
$debug_dir = file_directory_temp() . '/mail_debug'; | |
$debug_file = $debug_dir . '/mail_debug.html'; |
This file contains 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
#!/bin/bash | |
# This script creates virtual hosts and prepares your mysql DB and drupal directory. | |
# you should put it under /usr/local/bin/ | |
# and run it with sudo newsite | |
# Set the path to your localhost | |
www=/var/www | |
echo "Enter directory name under $www" | |
read sn |
This file contains 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
/** | |
* Media queries and @import rules | |
*/ | |
@import "http://twitter.github.com/bootstrap/assets/css/bootstrap.css"; |
This file contains 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
/** | |
* This script will watch files for changes and | |
* automatically refresh the browser when a file is modified. | |
* | |
* Usage: | |
* | |
* - Include it: | |
* <script src="/js/fileWatcher.js"></script> | |
* | |
* - Call it from your script (or un-comment the call below): |
This file contains 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
/** | |
* CSS flipping tools | |
*/ | |
/* Original code */ | |
.class { | |
padding: 1px 2px 3px 4px; | |
margin-right: 3em; | |
background: url(image.gif) no-repeat right center; | |
margin-bottom: 20px; |
This file contains 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
/** | |
* CSS flipping inheritance | |
*/ | |
/* Original code */ | |
.class { | |
margin-left: 3em; /* Will be flipped */ | |
margin-right: 2em; /* Will be flipped */ | |
padding-left: 1em; /* Will be flipped and reseted */ | |
} |
This file contains 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
/* | |
* ##### Sasson - advanced drupal theming. ##### | |
* | |
* SASS mixins | |
* http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins | |
* | |
*/ | |
// Inline block with ie7 support | |
@mixin inline-block($alignment: false, $ie7-support: false) { |
This file contains 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
@import "compass/css3"; | |
@import "salsa/salsa"; | |
// container grids | |
.container { | |
text-align: center; | |
.element { | |
@include border-radius(12px); | |
@include box-shadow(0 0 40px rgba(0,0,0,.3) inset); | |
@include transition(margin .5s); |
This file contains 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
function THEME_preprocess_html(&$vars) { | |
if ($vars['user']) { | |
foreach($vars['user']->roles as $key => $role){ | |
$vars['classes_array'][] = 'role-' . drupal_html_class($role); | |
} | |
} | |
} |
OlderNewer