diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 4f32eb6..0000000 --- a/Rakefile +++ /dev/null @@ -1,35 +0,0 @@ -# automates minifying jquery.isotope.js -# requires Google Closure Compiler http://code.google.com/closure/compiler/ -# from command line run: -# rake min COMPILER='path/to/compiler.jar' -file compiler = ENV["COMPILER"] || '../../resources/google-closure/compiler.jar' -js = 'jquery.isotope.js' -min_js = 'jquery.isotope.min.js' - -desc "Generates #{min_js}" -task :min do - unless File.exists?( compiler ) - puts "ERROR: Compiler not found at " + compiler - else - puts "Minifying jquery.isotope.js..." - sh "java -jar #{compiler} --js #{js} --js_output_file #{min_js}" - # Adds header comment - min = File.read( min_js ) - File.open( min_js, 'w') do |f| - f.write File.readlines( js )[0..9].join() - f.write min - end - end -end - -desc "Zips _site/ into isotope-site.zip on to Desktop" -task :zip do - # makes isotope-site/ directory - sh 'mkdir isotope-site;' - # copies _site/ - sh 'cp -r _site/ isotope-site;' - # zips isotope-site/ - sh 'zip -r ~/Desktop/isotope-site.zip isotope-site/;' - # removes isotope-site/ - sh 'rm -rf isotope-site;' -end \ No newline at end of file diff --git a/_config.yml b/_config.yml index 422b213..0c96e6f 100644 --- a/_config.yml +++ b/_config.yml @@ -3,7 +3,7 @@ permalink: /:categories/:title.html pygments: true isotope_js: jquery.isotope.min.js jquery_js: js/jquery-1.5.1.min.js -exclude: [ Rakefile ] +exclude: [ Makefile ] random_order: [ 11, 91, 63, 38, 4, 25, 94, 29, 60, 48, 32, 67, 33, 37, 39, 84, 40, 7, 96, 8, 97, 9, 14, 99, 15, 19, 5, 36, 114, 20, 30, 80, 13, 47, 21, 3, 22, 31, 54, 66, 55, 71, 1, 23, 41, 70, 2, 77, 117, 79, 42, 95, 46, 50, 69, 53, 56, 72, 51, 73, 59, 74, 35, 49, 101, 88, 34, 76, 102, 75, 103, 81, 58, 6, 82, 26, 27, 44, 83, 45, 86, 68, 87, 104, 105, 10, 85, 43, 12, 109, 110, 113, 28, 106, 107, 108, 115, 62, 116, 0, 57, 111, 112, 61, 89, 90, 64, 65, 92, 93, 78, 24, 98, 100, 16, 17, 18, 52 ] diff --git a/_includes/element-partial.html b/_includes/element-partial.html index 2d1d733..561a302 100644 --- a/_includes/element-partial.html +++ b/_includes/element-partial.html @@ -1,5 +1,7 @@ - -
+ {% capture a %}{{ element.number | modulus:7 | modulus:2 }}{% endcapture %} + {% capture b %}{{ element.number | modulus:3 }}{% endcapture %} + {% capture classnames %}{% for cat in element.categories %}{{ cat }} {% endfor %} {% if page.infinite_scroll %} width2 height2 {% else %} {% if a == '1' %} width2 {% endif %} {% if b == '0' %} height2 {% endif %} {% endif %} {% endcapture %} +

{{ element.number }}

{{ element.symbol }}

{{ element.name }}

diff --git a/_layouts/elements.html b/_layouts/elements.html index c009a63..69aba03 100644 --- a/_layouts/elements.html +++ b/_layouts/elements.html @@ -95,17 +95,6 @@ $(function(){ - // hacky way of adding random size classes - $container.find('.element').each(function(){ - if ( Math.random() > 0.6 ) { - $(this).addClass('width2'); - } - if ( Math.random() > 0.6 ) { - $(this).addClass('height2'); - } - }); - - $container.isotope({ itemSelector : '.element', // layoutMode : 'fitRows', diff --git a/_plugins/modulus.rb b/_plugins/modulus.rb new file mode 100644 index 0000000..0b98c97 --- /dev/null +++ b/_plugins/modulus.rb @@ -0,0 +1,7 @@ +module MathFilter + def modulus(input, operand) + to_number(input) % to_number(operand) + end +end + +Liquid::Template.register_filter(MathFilter) \ No newline at end of file diff --git a/_posts/demos/2010-12-29-layout-modes.html b/_posts/demos/2010-12-29-layout-modes.html index 4cf40b1..e6580f3 100644 --- a/_posts/demos/2010-12-29-layout-modes.html +++ b/_posts/demos/2010-12-29-layout-modes.html @@ -34,16 +34,6 @@ related: layouts $(function(){ - // hacky way of adding random size classes - $container.find('.element').each(function(){ - if ( Math.random() > 0.6 ) { - $(this).addClass('width2'); - } - if ( Math.random() > 0.6 ) { - $(this).addClass('height2'); - } - }); - $container.isotope({ itemSelector : '.element', masonry : { diff --git a/_posts/demos/2010-12-31-relayout.html b/_posts/demos/2010-12-31-relayout.html index 833c120..b903eac 100644 --- a/_posts/demos/2010-12-31-relayout.html +++ b/_posts/demos/2010-12-31-relayout.html @@ -45,16 +45,6 @@ related: methods $(function(){ - // hacky way of adding random size classes - $container.find('.element').each(function(){ - if ( Math.random() > 0.6 ) { - $(this).addClass('width2'); - } - if ( Math.random() > 0.6 ) { - $(this).addClass('height2'); - } - }); - $container.isotope({ itemSelector: '.element', masonry : { diff --git a/_posts/docs/2010-12-04-methods.mdown b/_posts/docs/2010-12-04-methods.mdown index df21c13..89718c8 100644 --- a/_posts/docs/2010-12-04-methods.mdown +++ b/_posts/docs/2010-12-04-methods.mdown @@ -92,20 +92,13 @@ Positions specified item elements in layout. {% endhighlight %} -Modifies options for plugin instance. Can be used to get and set options. Unlike passing options through `.isotope()`, using the `option` method will not trigger layout. +Sets options for plugin instance. Unlike passing options through `.isotope()`, using the `option` method will not trigger layout. {% highlight javascript %} // sets multiple options .isotope( 'option', { layoutMode: 'fitRows', filter: '.my-filter' } ) -// set single option -.isotope( 'option', 'layoutMode', 'straightDown' ) - -// get option -.isotope( 'option', 'layoutMode' ) -// returns 'straightDown' - {% endhighlight %} diff --git a/_posts/docs/2010-12-11-troubleshooting.mdown b/_posts/docs/2010-12-11-help.mdown similarity index 94% rename from _posts/docs/2010-12-11-troubleshooting.mdown rename to _posts/docs/2010-12-11-help.mdown index ed9312c..7eb085b 100644 --- a/_posts/docs/2010-12-11-troubleshooting.mdown +++ b/_posts/docs/2010-12-11-help.mdown @@ -1,6 +1,6 @@ --- -title: Troubleshooting +title: Help category: docs layout: doc related: z-etc @@ -13,7 +13,6 @@ toc: - { title: @font-face fonts, anchor: fontface_fonts } - { title: CSS transforms in Opera, anchor: css_transforms_in_opera } - { title: Infinite Scroll with filtering or sorting, anchor: infinite_scroll_with_filtering_or_sorting} - - { title: Prepending items, anchor: prepending_items } - { title: Flash, anchor: flash } --- @@ -123,10 +122,6 @@ I recommend against using Infinite Scroll with filtering or sorting. This combin If you do plan on implementing Infinite Scroll with filtering or sorting (which is a _bad idea_), use the `insert` method instead of `appended`. -## Prepending items - -While there is no prepend method built into Isotope, you can add items to the beginning of a Isotope layout by using sorting and [`updateSortData`](methods.html#getsortdata). See [Isotope - prepending items on jsFiddle](http://jsfiddle.net/desandro/zXWkw/4/). - ## Flash [Using CSS transforms with Flash content is a bit buggy in Safari and Firefox](http://dropshado.ws/post/4085720152/css-transforms-breaking-flash). This is problematic when using Isotope on item elements that contain Flash content like YouTube or Vimeo videos, Flash ads, or Flash audio players. diff --git a/_posts/tests/2011-03-27-destroy01.html b/_posts/tests/2011-03-27-destroy01.html index 94f31de..12c22a6 100644 --- a/_posts/tests/2011-03-27-destroy01.html +++ b/_posts/tests/2011-03-27-destroy01.html @@ -12,7 +12,12 @@ category: tests
-

After destroy-ing Isotope, original CSS gets re-applied

+

Click init button the destroy. Original CSS, pre-init, should be re-applied, all items back to visibility.

+
+ +
+ +
@@ -28,9 +33,15 @@ category: tests var $container = $('#container'); - $container.isotope({ - itemSelector: '.element', - filter: '.metal' + $('#init').click(function(){ + $container.isotope({ + itemSelector: '.element', + filter: '.metal' + }); + }); + + $('#destroy').click(function(){ + $container.isotope('destroy'); }); }); diff --git a/_posts/tests/2011-03-27-no-items01.html b/_posts/tests/2011-03-27-no-items01.html index 50c73f1..14cf5d8 100644 --- a/_posts/tests/2011-03-27-no-items01.html +++ b/_posts/tests/2011-03-27-no-items01.html @@ -5,7 +5,7 @@ category: tests ---
-

What happens when there are no items for Isotope/

+

What happens when there are no items for Isotope? If no items match `itemSelector`, container collapses. Plugin still return this.

@@ -23,7 +23,7 @@ category: tests $container.isotope({ itemSelector: '.foo' - }); + }).css('border', '10px solid'); }); \ No newline at end of file diff --git a/_posts/tests/2011-04-26-item-position-data01.html b/_posts/tests/2011-04-26-item-position-data01.html index 5c89636..25b2bd7 100644 --- a/_posts/tests/2011-04-26-item-position-data01.html +++ b/_posts/tests/2011-04-26-item-position-data01.html @@ -5,30 +5,11 @@ category: tests ---
-

+

itemPositionDataEnabled option is enabled.

-

Filters

- - - {% include sort-buttons.html %}

Etc

@@ -39,7 +20,7 @@ category: tests
-
+
{% for element in site.elements limit:40 %} {% include element-partial.html %} {% endfor %} @@ -48,26 +29,25 @@ category: tests