From ffa9893a101b23c2cff001a26d1c31e267cb2245 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Fri, 14 Aug 2015 15:53:56 +0200 Subject: [PATCH] main overflow based in a class instead of css inline --- assets/js/src/cover.coffee | 18 +++++++----------- assets/scss/modules/_global.scss | 4 ++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/assets/js/src/cover.coffee b/assets/js/src/cover.coffee index 73505a29..146d02e2 100755 --- a/assets/js/src/cover.coffee +++ b/assets/js/src/cover.coffee @@ -9,21 +9,17 @@ $ -> $('.cover').addClass 'animated' , 1000) - _expand = (options = {})-> - method = if options.toggle is 'hide' then 'addClass' else 'toggleClass' - $('.cover')[method] 'expanded' - $('.link-item')[method] 'expanded' - Uno.search.form options.form if options.form? + _expand = (options)-> + $('main, .cover, .link-item').toggleClass 'expanded' + Uno.search.form options.form $('#blog-button, #avatar-link').click -> - return $('#menu-button').trigger('click') unless Uno.is 'device', 'desktop' - _expand(hide: 'toggle', form: 'toggle') + return $('#menu-button').trigger 'click' unless Uno.is 'device', 'desktop' + _expand form: 'toggle' $("#menu-button").click -> - $('.cover').toggleClass 'expanded' - $('.main').toggleClass 'expanded' - $('#menu-button').toggleClass 'expanded' + $('main, .cover, #menu-button').toggleClass 'expanded' if (Uno.is 'device', 'desktop') and (Uno.is 'page', 'home') _animate() - _expand(aside: 'hide', form: 'hide') if !isOpen + _expand form: 'hide' if !isOpen diff --git a/assets/scss/modules/_global.scss b/assets/scss/modules/_global.scss index f0efcf95..22a29c3c 100755 --- a/assets/scss/modules/_global.scss +++ b/assets/scss/modules/_global.scss @@ -191,6 +191,10 @@ main { left: 22.5rem; padding: 2rem 3rem; + &.expanded { + overflow: hidden + } + > .content { padding: 2rem 0; margin: 0 3.7rem;