SVG fix for IE 9+

This commit is contained in:
Godwin 2014-07-12 23:25:33 -06:00
parent 43351b0044
commit cbb3164c6a
4 changed files with 25 additions and 10 deletions

View File

@ -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;
}

View File

@ -436,7 +436,7 @@ module ApplicationHelper
end
def icon(id, attributes = nil)
('<svg' + hash_to_html_attributes(attributes) + '><use xlink:href="/assets/icons.svg#bb-icon-' + id + '"></use></svg>').html_safe
('<svg' + hash_to_html_attributes(attributes) + '><use xlink:href="' + cdn('/assets/icons.svg') + '#bb-icon-' + id + '"></use></svg>').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

View File

@ -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('<div class="hide">'+a+"</div>"),$("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

View File

@ -7,10 +7,4 @@
%a{href: '/conferences/'}='Zine'
.columns.medium-3.large-3.text-right
&copy;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