From 25c395465a9a2763f172b85d861b94a20065513c Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 11 Feb 2012 03:34:13 +0100 Subject: [PATCH] Fade navigation in --- couchpotato/static/scripts/couchpotato.js | 10 ++++++++++ couchpotato/static/style/main.css | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/couchpotato/static/scripts/couchpotato.js b/couchpotato/static/scripts/couchpotato.js index fd34a245..00a89458 100644 --- a/couchpotato/static/scripts/couchpotato.js +++ b/couchpotato/static/scripts/couchpotato.js @@ -65,6 +65,16 @@ var CouchPotato = new Class({ self.content = new Element('div.content'), self.block.footer = new Block.Footer(self, {}) ); + + new ScrollSpy({ + min: 10, + onLeave: function(){ + $(self.block.header).removeClass('with_shadow') + }, + onEnter: function(){ + $(self.block.header).addClass('with_shadow') + } + }) }, createPages: function(){ diff --git a/couchpotato/static/style/main.css b/couchpotato/static/style/main.css index b0adee38..ed253d56 100644 --- a/couchpotato/static/style/main.css +++ b/couchpotato/static/style/main.css @@ -168,7 +168,12 @@ body > .spinner, .mask{ position: fixed; width: 99%; z-index: 2; + box-shadow: 0 0 5px rgba(0,0,0,0.1); + transition: box-shadow .4s cubic-bezier(0.9,0,0.1,1); } + .header.with_shadow { + box-shadow: 0 0 50px rgba(0,0,0,0.3); + } .header > div { width: 960px;