Browse Source

Merge branch 'master' of github.com:desandro/isotope

pull/96/head
David DeSandro 14 years ago
parent
commit
691018f18f
  1. 13
      _posts/tests/2011-05-18-centered-masonry.html
  2. 85
      _posts/tests/2011-05-31-tiny-text.html

13
_posts/tests/2011-05-18-centered-masonry.html

@ -92,21 +92,16 @@ category: tests
var i = this.masonry.cols;
this.masonry.colYs = [];
while (i--) {
this.masonry.colYs.push( this.posTop );
this.masonry.colYs.push( 0 );
}
return this;
};
$.Isotope.prototype._masonryResize = function() {
$.Isotope.prototype._masonryResizeChanged = function() {
var prevColCount = this.masonry.cols;
// get updated colCount
this._getCenteredMasonryColumns();
if ( this.masonry.cols !== prevColCount ) {
// if column count has changed, do a new column cound
this.reLayout();
}
return this;
return ( this.masonry.cols !== prevColCount )
};
$.Isotope.prototype._masonryGetContainerSize = function() {
@ -117,7 +112,7 @@ category: tests
var layoutWidth = this.masonry.cols * this.masonry.columnWidth,
size = {
height : Math.max.apply( Math, this.masonry.colYs ) - this.posTop,
height : Math.max.apply( Math, this.masonry.colYs ),
width : Math.min(layoutWidth, itemsTotalWidth )
};
return size;

85
_posts/tests/2011-05-31-tiny-text.html

@ -0,0 +1,85 @@
---
title: Tiny text
layout: demo
category: tests
lorem: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
---
<style>
.text-box {
width: 200px;
margin: 10px;
color: #000;
float: left;
font-size: 11px;
line-height: 1.3em;
padding: 10px;
}
.blue { background: #88F; }
.red { background: #F88; }
</style>
<section id="copy">
<p>Test to see how IE7 deals with type rendering</p>
</section>
<section id="options" class="clearfix">
<h3>Filters</h3>
<ul id="filters" class="option-set floated clearfix">
<li><a href="#show-all" class="selected">show all</a></li>
<li><a href="#red">red</a></li>
<li><a href="#blue">blue</a></li>
</ul>
</section> <!-- #options -->
<div id="container" class="clearfix">
<div class="red text-box">{{ page.lorem }}</div>
<div class="blue text-box">{{ page.lorem }}</div>
<div class="red text-box">{{ page.lorem }}</div>
<div class="blue text-box">{{ page.lorem }}</div>
<div class="red text-box">{{ page.lorem }}</div>
<div class="blue text-box">{{ page.lorem }}</div>
<div class="red text-box">{{ page.lorem }}</div>
<div class="blue text-box">{{ page.lorem }}</div>
<div class="red text-box">{{ page.lorem }}</div>
<div class="blue text-box">{{ page.lorem }}</div>
<div class="red text-box">{{ page.lorem }}</div>
<div class="blue text-box">{{ page.lorem }}</div>
<div class="red text-box">{{ page.lorem }}</div>
<div class="blue text-box">{{ page.lorem }}</div>
</div>
<script src="../{{ site.jquery_js }}"></script>
<script src="../{{ site.isotope_js }}"></script>
<script src="../js/fake-element.js"></script>
<script>
$(function(){
var $container = $('#container');
$container.isotope({
});
$('#filters').find('a').click(function(){
// get href attribute, minus the #, plus a . to make it a class
var filterName = '.' + $(this).attr('href').slice(1);
filterName = filterName === '.show-all' ? '*' : filterName;
$container.isotope({ filter: filterName })
return false;
});
{% include option-buttons.js %}
});
</script>
Loading…
Cancel
Save