Skip to content

Instantly share code, notes, and snippets.

View aastrong's full-sized avatar
😀
Happy working @promet

Aaron Armstrong aastrong

😀
Happy working @promet
View GitHub Profile
{% set imagePath = 'public://images/default.jpg' %}
{% set responsiveimagestyle = {
'#theme': 'responsive_image',
'#responsive_image_style_id': 'my_responsive_image_style_id',
'#uri': imagePath,
'#alt': 'my alt text',
'#attributes': { class: 'img-responsive' },
} %}
{{ responsiveimagestyle }}
@aastrong
aastrong / wetkit_theme_tabsort.patch
Created April 16, 2015 17:20
Fix sorting for wetkit bootstrap horizontal tabs
diff --git a/modules/wetkit_bootstrapx/plugins/styles/bootstrap_horiz_styles.inc b/modules/wetkit_bootstrapx/plugins/styles/bootstrap_horiz_styles.inc
index f3ca6e8..f316a25 100644
--- a/modules/wetkit_bootstrapx/plugins/styles/bootstrap_horiz_styles.inc
+++ b/modules/wetkit_bootstrapx/plugins/styles/bootstrap_horiz_styles.inc
@@ -41,9 +41,7 @@ function theme_wetkit_bootstrapx_bootstrap_horiz_styles_render_region($vars) {
$content[$pane_title] = array('#markup' => '<details id="details-pane-' . $pane_id . '" class="tab-pane">' . '<summary>' . $pane_title . '</summary>' . $pane . '</details>');
}
- arsort($content);
- $first = array_shift($content);
@aastrong
aastrong / wetkit_bean_twitter.patch
Created April 16, 2015 17:17
Make wetkit twitter bean scrollable and no tweet limit
diff --git a/plugins/bean/wetkit_bean.twitter.inc b/plugins/bean/wetkit_bean.twitter.inc
index b45b521..ef58db9 100644
--- a/plugins/bean/wetkit_bean.twitter.inc
+++ b/plugins/bean/wetkit_bean.twitter.inc
@@ -155,7 +155,7 @@ class WetKitTwitterBean extends BeanPlugin {
// Rendered markup.
$markup = '<section><div class="wb-twitter ' . $custom_css . ' ' . $span . '">';
$markup .= '<h2>' . $title . '</h2>';
- $markup .= '<a class="twitter-timeline" href="' . $url . '" data-widget-id="' . $widget_id . '" ' . $tweet_limit . '>Tweets</a>';
+ $markup .= '<a class="twitter-timeline" height="400" href="' . $url . '" data-widget-id="' . $widget_id . '" ' . '>Tweets</a>';
@aastrong
aastrong / views_limit_grouping_secondary.patch
Created April 16, 2015 17:15
Patch to views limit grouping to make a secondary group
diff --git a/views-limit-grouping.tpl.php b/views-limit-grouping.tpl.php
index 82064b3..f93dcbd 100755
--- a/views-limit-grouping.tpl.php
+++ b/views-limit-grouping.tpl.php
@@ -5,13 +5,13 @@
* Basically, just a copy of views-view-unformatted.tpl.php.
*/
?>
-<div class="views-limit-grouping-group">
+<details class="views-limit-grouping-group">
@aastrong
aastrong / wetkit_bootstrap_megamenu.patch
Created April 16, 2015 17:12
Patch to bring back megamenu to wet-boew
diff --git a/templates/menu/menu-link.func.php b/templates/menu/menu-link.func.php
index 3a5285c..cfda60f 100644
--- a/templates/menu/menu-link.func.php
+++ b/templates/menu/menu-link.func.php
@@ -45,7 +45,7 @@ function wetkit_bootstrap_menu_link(array $variables) {
/**
* Overrides theme_menu_tree().
*/
-function wetkit_bootstrap_menu_link__menu_block__main_menu(&$variables) {
+function wetkit_bootstrap_menu_link__menu_block__megamenu(&$variables) {