trabajo-afectivo/app/views/init/index.html.erb

36 lines
1.1 KiB
Text
Raw Normal View History

<!-- svgstore fallback -->
<%= javascript_tag nonce: true do -%>
2015-11-01 00:48:02 +00:00
/*
detect if browser is
- Chrome 14-20
- Android Browser 4.1+
- iOS 6-7
- Safari 6
- Edge 12
- IE 9-11
*/
2015-10-19 21:04:37 +00:00
window.svgPolyfill = /\bEdge\/12\b|\bTrident\/[567]\b|\bVersion\/7.0 Safari\b/.test(navigator.userAgent) || (navigator.userAgent.match(/AppleWebKit\/(\d+)/) || [])[1] < 537;
(function (doc) {
if(!svgPolyfill)
return
var scripts = doc.getElementsByTagName('script')
var script = scripts[scripts.length - 1]
var xhr = new XMLHttpRequest()
xhr.onload = function () {
var div = doc.createElement('div')
div.innerHTML = this.responseText
2015-11-01 00:48:02 +00:00
div.style.cssText = 'position: absolute; clip: rect(0, 0, 0, 0); z-index: -1;'
script.parentNode.insertBefore(div, script)
}
xhr.open('get', 'assets/images/icons.svg', true)
xhr.send()
})(document)
<% end -%>
<div id="app"></div>
2015-10-05 12:10:45 +00:00
<div class="splash">
<svg class="icon icon-logo"><use xlink:href="assets/images/icons.svg#icon-logo" /></svg>
2015-10-05 12:10:45 +00:00
<div class="splash-title">Loading...</div>
</div>