From cbb3164c6aa4da2f5ab00eaae76646eaa8ca5f4f Mon Sep 17 00:00:00 2001 From: Godwin Date: Sat, 12 Jul 2014 23:25:33 -0600 Subject: [PATCH] SVG fix for IE 9+ --- app/assets/stylesheets/sass/_layout.scss | 10 +++++++++- app/helpers/application_helper.rb | 8 ++++++-- app/views/layouts/application.html.haml | 9 +++++++++ app/views/shared/_footer.html.haml | 8 +------- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/sass/_layout.scss b/app/assets/stylesheets/sass/_layout.scss index aec78d6..c9061b6 100644 --- a/app/assets/stylesheets/sass/_layout.scss +++ b/app/assets/stylesheets/sass/_layout.scss @@ -9,7 +9,6 @@ html { } body { - background-color: $primary-color; height: auto; } @@ -254,6 +253,10 @@ main { @include breakpoint(large) { overflow: auto; + + footer { + @include clearfix; + } } } @@ -489,6 +492,7 @@ main { border-radius: 0; } + &:before, &:after { border-bottom-left-radius: inherit; } @@ -548,6 +552,7 @@ main { min-height: 5em; background-color: inherit; z-index: 1; + background-color: $primary-color; i { display: inline-block; @@ -982,3 +987,6 @@ table { } */ +.clearfix { + @include clearfix; +} diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a55a3ce..72fff3a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -436,7 +436,7 @@ module ApplicationHelper end def icon(id, attributes = nil) - ('').html_safe + ('').html_safe end def static_map(location, zoom, width, height) @@ -452,7 +452,11 @@ module ApplicationHelper end end - (Rails.application.config.action_controller.asset_host || '')+"/maps/#{local_file_name}" + cdn("/maps/#{local_file_name}") + end + + def cdn(file) + (Rails.application.config.action_controller.asset_host || '') + file end private diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index c2c4561..d3463fd 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -49,5 +49,14 @@ #content=yield - else = yield + %footer #footer .container= render 'shared/footer' + = javascript_include_tag '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js' + :javascript + #{yield :scripts} + !function(a,b,c,d){d&&a.addEventListener("DOMContentLoaded",function(){$.ajax({url:$("use").first().attr("xlink:href").replace(/^(.*)\#.*$/,"$1"),dataType:"text",success:function(a){$("body").append('
'+a+"
"),$("use").each(function(){$(this).attr("xlink:href",function(a,b){return b.replace(/^.*(#.*)$/,"$1")})})}})})}(document,navigator,{},/Trident\/[567]\b/.test(navigator.userAgent)); + $(function(){ + #{yield :dom_ready} + }); + = yield :footer_scripts diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index 62ea8dd..15cc8e6 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -7,10 +7,4 @@ %a{href: '/conferences/'}='Zine' .columns.medium-3.large-3.text-right ©2014 Bike!Bike! -= javascript_include_tag '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js' -:javascript - #{yield :scripts} - $(function(){ - #{yield :dom_ready} - }); -= yield :footer_scripts +