From 4dc32d7d2e750445976dfa40f69463636a06aa53 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 28 Oct 2016 10:55:04 +0800 Subject: [PATCH] fix metacodes page scrolling (#862) * fix metacodes page scrolling use scheme from http://brandonhilkert.com/blog/page-specific-javascript-in-rails/ * switch overflow:hidden to be on explicit controllers --- app/assets/stylesheets/application.scss.erb | 17 ++++++++++++----- app/views/layouts/application.html.erb | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/application.scss.erb b/app/assets/stylesheets/application.scss.erb index 72a49c90..1f9ef4f7 100644 --- a/app/assets/stylesheets/application.scss.erb +++ b/app/assets/stylesheets/application.scss.erb @@ -78,11 +78,18 @@ html { } body { - background: #d8d9da url(<%= asset_data_uri('shattered_@2X.png') %>); - font-family: 'din-medium', helvetica, sans-serif; - color: #424242; - -moz-osx-font-smoothing: grayscale; - overflow: hidden; + background: #d8d9da url(<%= asset_path('shattered_@2X.png') %>); + font-family: 'din-medium', helvetica, sans-serif; + color: #424242; + -moz-osx-font-smoothing: grayscale; + overflow-x: hidden; + + &.controller-main, + &.controller-maps, + &.controller-topics, + &.controller-explore { + overflow-y: hidden; + } } h1, h2, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 0b66ac85..231c76e3 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -7,7 +7,7 @@ <%= render :partial => 'layouts/head' %> -"> + controller-<%= controller_name %> action-<%= action_name %>">