Skip to content

Commit

Permalink
Fix cover
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeah committed May 11, 2015
1 parent f9bf3b5 commit 0f1eb55
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
2 changes: 1 addition & 1 deletion _jade/layout.jade
Expand Up @@ -49,7 +49,7 @@ head
mixin cover()
section#hero.am-hero.am-hero-cover.cover(data-stellar-background-ratio='0.5' class!=attributes.class)
div(style='background-color: rgba(0,0,0,0.2)')
.am-content-container
.am-content-container.valigned
.pure-g.content-centered
.pure-u
block cover-text
Expand Down
11 changes: 11 additions & 0 deletions css/app.css
@@ -1,3 +1,8 @@
.valigned {
position: relative;
top: 50%;
transform: translateY(-50%);
}
.postdate {
color: #9EABB3;
float: right;
Expand Down Expand Up @@ -465,6 +470,12 @@ a .icon:hover {
nav {
height: auto;
}
/*.cover {
background-size:inherit;
}*/
.am-hero, .am-hero>div, .am-hero.am-hero-cover {
height:275px;
}
}

@media only all and (max-device-width: 780px) {
Expand Down
30 changes: 26 additions & 4 deletions js/app.js
Expand Up @@ -50,10 +50,32 @@

jQuery("time.timeago").timeago();

$.stellar({
horizontalScrolling: false,
verticalOffset:0
});
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};
if( !isMobile.any() ){
$.stellar({
horizontalScrolling: false,
verticalOffset:0
});
}

jQuery(function() {
$(".fancybox").fancybox({
Expand Down

0 comments on commit 0f1eb55

Please sign in to comment.