Permalink
Browse files

better homepage render with masonry plugin

  • Loading branch information...
chemix committed Jun 22, 2014
1 parent 66ac917 commit d379b0d77c81c9718eadd32fc10b5da8c0181d98
Showing with 40 additions and 10 deletions.
  1. +1 −0 app/templates/@layout.latte
  2. +10 −8 app/templates/Homepage/default.latte
  3. +9 −0 www/css/screen.css
  4. +11 −2 www/js/main.js
  5. +9 −0 www/js/masonry.pkgd.min.js
@@ -62,6 +62,7 @@
{block scripts}
<script src="{$basePath}/js/jquery.js"></script>
<script src="{$basePath}/js/masonry.pkgd.min.js"></script>
<script src="{$basePath}/js/netteForms.js"></script>
<script src="{$basePath}/js/main.js"></script>
{/block}
@@ -2,15 +2,17 @@
<div n:if="$wallPosts" class="row facebook-posts">
<div n:foreach="$wallPosts as $post" class="large-4 small-6 columns {$post->type}">
<div class="panel">
<img n:if="$post->picture" src="{$post->picture}" />
<div id="wall" class="brick-container column">
<div n:foreach="$wallPosts as $post" class="brick {$post->type}">
<div class="panel">
<img n:if="$post->picture" src="{$post->picture}" />
<h4 n:if="$post->name">{$post->name}</h4>
<p>
{if $post->message}{$post->message|truncate:250:'...'}{/if}
<a href="{$post|fbPostLink}">více</a>
</p>
<h4 n:if="$post->name">{$post->name}</h4>
<p>
{if $post->message}{$post->message|truncate:250:'...'}{/if}
<a href="{$post|fbPostLink}">více</a>
</p>
</div>
</div>
</div>
</div>
View
@@ -41,3 +41,12 @@ form .error {
html.js .jshidden {
display: none;
}
.brick {
width: 300px;
margin: 10px;
float: left;
}
.brick-container {
width: 0 auto;
}
View
@@ -1,3 +1,12 @@
$(function(){
(function ($, undefined) {
});
// When Ready
$(function() {
$('#wall').masonry({
itemSelector: '.brick',
columnWidth: 320
});
console.log('ping');
});
})(jQuery);

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit d379b0d

Please sign in to comment.