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_page_alter(). | |
*/ | |
function mytheme_page_alter(&$page) { | |
// Remove all the region wrappers. | |
foreach (element_children($page) as $key => $region) { | |
if (!empty($page[$region]['#theme_wrappers'])) { | |
$page[$region]['#theme_wrappers'] = array_diff($page[$region]['#theme_wrappers'], array('region')); |
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 | |
function hook_preprocess_html(&$vars) { | |
// add modernizr and avoid that it gets preprocessed | |
$options = array('preprocess' => FALSE, | |
'weight' => -25.000, | |
'group' => -100); | |
drupal_add_js('/sites/all/libraries/modernizr/modernizr.min.js', $options); | |
} | |
?> |
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
!!! 5 | |
/[if lt IE 7] <html lang="en" class="no-js ie6"> | |
/[if IE 7 ] <html lang="en" class="no-js ie7"> | |
/[if IE 8 ] <html lang="en" class="no-js ie8"> | |
/[if IE 9 ] <html lang="en" class="no-js ie9"> | |
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> | |
%head | |
%meta{ "charset" => "utf-8" }/ | |
= csrf_meta_tag | |
%meta{ "http-equiv" => "X-UA-Compatible", :content => "IE=edge,chrome=1" }/ |
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
/** | |
* html5 progress bar styling | |
*/ | |
html{ | |
background: #f06; | |
background: linear-gradient(45deg, #f33, #a33); | |
min-height:100%; | |
} | |
/* remove standard styling |
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 | |
/** | |
* Override the output of the default locale language switch links. | |
* We only want prefixes. If no link available, go to frontpage. Better than nothing. | |
*/ | |
function theme_links__locale_block(&$variables) { | |
$links = $variables['links']; | |
$attributes = $variables['attributes']; | |
$heading = $variables['heading']; | |
global $language_url; |
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 template_preprocess_views_view | |
* if we're using Semantic Views to remove all the rows, | |
* things can get messy with nth-child selectors in css because | |
* of the dirty contextual links in the title_suffix. | |
* Remove them automatically when using Semantic Views and stripping out row markup. | |
*/ | |
function YOURTHEME_preprocess_views_view(&$vars) { | |
$view = $vars['view']; |
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 | |
// throw out unnecesary classes | |
$vars['classes_array'] = array_diff($vars['classes_array'], array('toRemove1', 'toRemove2')); |
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 | |
/** | |
* cleanup this mess by checking if something exists before printing all the markup surrounding it. | |
*/ | |
?> | |
<div class="panel-display panel-2col-bricks " <?php if (isset($css_id)) { print "id=\"$css_id\""; } ?>> | |
<?php if(!empty($content['top'])): ?> | |
<div class="panel-panel panel-col-top"> | |
<?php print $content['top']; ?> | |
</div> |
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
// include this after you declare your webfont | |
@mixin fout{ | |
.wf-loading &, | |
.wf-inactive &{ | |
visibility:hidden; | |
} | |
.wf-active &{ | |
visibility:visible; | |
} | |
} |
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 | |
function hook_js_alter(&$js){ | |
uasort($js, 'drupal_sort_css_js'); | |
$i = 0; | |
foreach($js as $name => $script) { | |
$js[$name]['weight'] = $i++; | |
$js[$name]['group'] = JS_DEFAULT; | |
$js[$name]['every_page'] = FALSE; | |
$js[$name]['scope'] = 'footer'; |
OlderNewer