mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
photos archive cleanup
This commit is contained in:
parent
2620bdeef3
commit
61773d5fd7
@ -15,12 +15,6 @@ $(ASAP = function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).load(AfterLoad = function() {
|
|
||||||
|
|
||||||
photoGrid.init();
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
var siteNavigation = {
|
var siteNavigation = {
|
||||||
|
|
||||||
siteSearch: function() {
|
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() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
background: #000
|
background: #000
|
||||||
background: rgba(#000, .4)
|
background: rgba(#000, .4)
|
||||||
|
|
||||||
|
|
||||||
.photo-link
|
.photo-link
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
|
@ -182,40 +182,3 @@
|
|||||||
|
|
||||||
.btn
|
.btn
|
||||||
display: block
|
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%
|
|
||||||
|
@ -12,20 +12,10 @@ layout: base
|
|||||||
<h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1>
|
<h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.title == 'photos' %}
|
|
||||||
<div class="masonry">
|
|
||||||
<div class="grid-sizer"></div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for post in page.posts %}
|
{% for post in page.posts %}
|
||||||
{% include articles.html %}
|
{% include articles.html %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if page.title == 'photos' %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% include paginator.html %}
|
{% include paginator.html %}
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"imagesloaded": ">=3.1.8",
|
"imagesloaded": ">=3.1.8",
|
||||||
"jquery": ">=2.1.4",
|
"jquery": ">=2.1.4",
|
||||||
"masonry-layout": ">=3.3.0",
|
|
||||||
"normalize-css": ">=2.3.1",
|
"normalize-css": ">=2.3.1",
|
||||||
"normalize-opentype.css": ">=0.2.4",
|
"normalize-opentype.css": ">=0.2.4",
|
||||||
"picturefill": ">=2.3.1",
|
"picturefill": ">=2.3.1",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user