1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-13 16:45:14 +01:00

photos archive cleanup

This commit is contained in:
Matthias Kretschmann 2015-10-31 20:43:50 +01:00
parent 2620bdeef3
commit 61773d5fd7
5 changed files with 2 additions and 85 deletions

View File

@ -15,12 +15,6 @@ $(ASAP = function() {
});
$(window).load(AfterLoad = function() {
photoGrid.init();
});
var siteNavigation = {
siteSearch: function() {
@ -138,33 +132,3 @@ var siteNavigation = {
}
}
var photoGrid = {
masonryLayout: function() {
var $container = $('#main .masonry');
$container.imagesLoaded(function() {
$container.masonry({
itemSelector: 'article',
columnWidth: '.grid-sizer'
});
});
},
init: function() {
// only fire when photo page present and screen bigger than 480px
if ($('.page-photos').length > 0) {
this.masonryLayout();
}
}
}
var siteEffects = {
init: function() {
}
}

View File

@ -67,6 +67,7 @@
background: #000
background: rgba(#000, .4)
.photo-link
display: block

View File

@ -182,40 +182,3 @@
.btn
display: block
// Masonry
/////////////////////////////////////
.masonry
@media $breakpoint2
width: 100%
clearfix()
.hentry
@media $breakpoint1
width: 49%
float: left
clear: none
padding-top: 0
padding-bottom: 0
margin-bottom: .7em
margin-top: 0
margin-left: 0
margin-right: 1%
border: none
&:before
display: none
&:nth-child(2n+1)
margin-right: 0
&:last-child
margin-bottom: 3em
.grid-sizer
width: 100%
@media screen and (min-width: 480px)
width: 50%

View File

@ -3,7 +3,7 @@ layout: base
---
<section role="main" id="main" class="grid">
{% if page.type == 'category' %}
<h1 class="page-title">{{ page.title }}</h1>
{% elsif page.type == 'tag' %}
@ -12,20 +12,10 @@ layout: base
<h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1>
{% endif %}
{% if page.title == 'photos' %}
<div class="masonry">
<div class="grid-sizer"></div>
{% endif %}
{% for post in page.posts %}
{% include articles.html %}
{% endfor %}
{% if page.title == 'photos' %}
</div>
{% endif %}
</section>
{% include paginator.html %}

View File

@ -12,7 +12,6 @@
"dependencies": {
"imagesloaded": ">=3.1.8",
"jquery": ">=2.1.4",
"masonry-layout": ">=3.3.0",
"normalize-css": ">=2.3.1",
"normalize-opentype.css": ">=0.2.4",
"picturefill": ">=2.3.1",