summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Strawn2013-01-10 18:25:10 (GMT)
committer Jake Strawn2013-01-10 18:25:10 (GMT)
commit59526db426fcc5769637b1c31ae9a818f2f40a0c (patch)
tree29afc5ad4b447c121c24a963514b94b3bd0bffff
parentb4c6a5a7e5df568624d8e65b8c31684402b828fc (diff)
generic updates to theme
-rw-r--r--css/global.css26
-rw-r--r--js/nodemaker-isotope.js72
-rw-r--r--omega_nodemaker.info9
-rw-r--r--scss/nodemaker.scss35
-rw-r--r--template.php1
5 files changed, 134 insertions, 9 deletions
diff --git a/css/global.css b/css/global.css
index c61ef08..e47bac7 100644
--- a/css/global.css
+++ b/css/global.css
@@ -4020,6 +4020,32 @@ div.more-link {
#block-menu-block-nm-core-footer-menu {
display: none; }
+/**** disabling Isotope CSS3 transitions ****/
+.isotope.no-transition,
+.isotope.no-transition .isotope-item,
+.isotope .isotope-item.no-transition {
+ -webkit-transition-duration: 0s;
+ -moz-transition-duration: 0s;
+ -ms-transition-duration: 0s;
+ -o-transition-duration: 0s;
+ transition-duration: 0s; }
+
+.isotope {
+ clear: both;
+ margin-bottom: 1px; }
+
+#views_infinite_scroll-ajax-loader {
+ float: left;
+ width: 100%;
+ margin-bottom: 10px; }
+
+#views_infinite_scroll-ajax-loader img {
+ width: auto; }
+
+.view-display-id-thumb_page .views-row a, .view-display-id-thumb_page .views-row img {
+ display: block;
+ margin: 0; }
+
img {
max-width: 100%;
height: auto; }
diff --git a/js/nodemaker-isotope.js b/js/nodemaker-isotope.js
index fcc3569..ae77c83 100644
--- a/js/nodemaker-isotope.js
+++ b/js/nodemaker-isotope.js
@@ -87,6 +87,10 @@ Drupal.nodemaker = Drupal.nodemaker || {};
gutters = gutter * (cols - 1)
colwidth = (containerwidth - gutters) / cols;
+ isotopeGutterWidth = gutter;
+ isotopeAllGutters = isotopeGutterWidth * (isotopeCols - 1)
+ isotopeColWidth = (isotopeContainerWidth - isotopeAllGutters) / isotopeCols;
+
// reset the item width to the new value
container.find(item).css('width', colwidth);
@@ -107,6 +111,46 @@ Drupal.nodemaker = Drupal.nodemaker || {};
}
}
+
+
+
+
+
+ Drupal.nodemaker.isotopeAppend = function (container, item, newItems) {
+
+ if (!Drupal.nodemaker.isotopeTest(container, item)) {
+ //console.log('FML... Drupal.nodemaker.isotopeTest(container, item) fails...');
+ return;
+ }
+
+ if (isotopeActive) {
+ $(newItems).css('width', isotopeColWidth).animate({
+ opacity: 0
+ }, 1, function() {
+ // Animation complete.
+ });
+ container.imagesLoaded(function(){
+ container.isotope('appended', $(newItems));
+ container.isotope('reLayout');
+ $(newItems).animate({
+ opacity: 1
+ }, 1000, function() {
+ // Animation complete.
+ });
+ });
+
+ }
+
+ else {
+ //Drupal.nodemaker.isotopeInvoke(container, item, cols, gutter);
+ }
+ }
+
+
+
+
+
+
Drupal.nodemaker.isotopeDestroy = function (container, item) {
if (!Drupal.nodemaker.isotopeTest(container, item)) {
return;
@@ -628,6 +672,34 @@ Drupal.nodemaker = Drupal.nodemaker || {};
}
};
+
+ // customize views infinite scroll behavior to work with isotope/masory items.
+ Drupal.behaviors.nodemakerInfiniteScroller = {
+ attach: function(context, settings) {
+
+ if($.autopager && Drupal.settings.views_infinite_scroll.length == 1) {
+ console.log(Drupal.settings.views_infinite_scroll);
+
+ $('.' + Drupal.settings.views_infinite_scroll.view_name).after();
+ // when isotopeInvoked == true, there IS an isotope item, and if
+ // context.length is true, we have magically added items to the doc via ajax.
+ // this needs some QA to ensure it works in all scenarios, and NOT
+ // in other content updated via ajax other than our infinite scroll
+
+
+ // appears that a colorbox load is actually implementing this since
+ // it is shrinking that image in the colorbox... must fix
+ if(context.length && isotopeInvoked) {
+
+ var newIsotopeItems = context;
+ Drupal.nodemaker.isotopeAppend(isotopeContainer, isotopeItem, newIsotopeItems);
+ }
+ }
+ }
+ };
+
+
+
// modified Isotope methods for gutters in masonry
$.Isotope.prototype._getMasonryGutterColumns = function() {
var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;
diff --git a/omega_nodemaker.info b/omega_nodemaker.info
index 7969c87..850f4f7 100644
--- a/omega_nodemaker.info
+++ b/omega_nodemaker.info
@@ -15,18 +15,9 @@ features[] = favicon
;features[] = main_menu
;features[] = secondary_menu
-
-
-
-
-
scripts[] = 'js/nodemaker.js'
scripts[] = 'js/modernizer.js'
-css[global.css][name] = 'Your custom global styles'
-css[global.css][description] = 'This file holds all the globally active custom CSS of your theme.'
-css[global.css][options][weight] = '10'
-
zones[header] = 'Header'
zones[content] = 'Content'
zones[footer] = 'Footer'
diff --git a/scss/nodemaker.scss b/scss/nodemaker.scss
index a83bbee..c589574 100644
--- a/scss/nodemaker.scss
+++ b/scss/nodemaker.scss
@@ -559,4 +559,39 @@ div.more-link {
#block-menu-block-nm-core-footer-menu {
display: none;
+}
+
+/**** disabling Isotope CSS3 transitions ****/
+
+.isotope.no-transition,
+.isotope.no-transition .isotope-item,
+.isotope .isotope-item.no-transition {
+ -webkit-transition-duration: 0s;
+ -moz-transition-duration: 0s;
+ -ms-transition-duration: 0s;
+ -o-transition-duration: 0s;
+ transition-duration: 0s;
+}
+
+.isotope {
+ clear: both;
+ margin-bottom: 1px;
+}
+
+#views_infinite_scroll-ajax-loader {
+ float:left;
+ width:100%;
+ margin-bottom:10px;
+}
+#views_infinite_scroll-ajax-loader img {
+ width: auto;
+}
+
+.view-display-id-thumb_page {
+ .views-row {
+ a, img {
+ display: block;
+ margin: 0;
+ }
+ }
} \ No newline at end of file
diff --git a/template.php b/template.php
index ef5ef7e..a0bf004 100644
--- a/template.php
+++ b/template.php
@@ -12,6 +12,7 @@
*/
require_once(drupal_get_path('theme', 'omega_nodemaker') . '/includes/omega_nodemaker.theme.inc');
+drupal_add_css(drupal_get_path('theme', 'omega_nodemaker') . '/css/global.css');
/**
* Debugging calls to drupal_set_message