diff --git a/_jade/layout.jade b/_jade/layout.jade index a2f74ba..d785446 100644 --- a/_jade/layout.jade +++ b/_jade/layout.jade @@ -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 diff --git a/css/app.css b/css/app.css index 96a400e..1896bea 100644 --- a/css/app.css +++ b/css/app.css @@ -1,3 +1,8 @@ +.valigned { + position: relative; + top: 50%; + transform: translateY(-50%); +} .postdate { color: #9EABB3; float: right; @@ -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) { diff --git a/js/app.js b/js/app.js index 866c421..0530d63 100644 --- a/js/app.js +++ b/js/app.js @@ -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({