correct font preloading
This commit is contained in:
parent
8628a57f4e
commit
bbed29ba57
|
@ -9,12 +9,13 @@
|
|||
%>
|
||||
|
||||
<% font_domain = "#{request.protocol}#{request.host_with_port}&2" %>
|
||||
<% woff2_url = "#{asset_path("fontawesome-webfont.woff2")}?#{font_domain}&v=4.5.0".html_safe %>
|
||||
|
||||
<link rel="preload" href="<%=asset_path "fontawesome-webfont.woff2"%>" as="font" type="font/woff2" crossorigin />
|
||||
<link rel="preload" href="<%=woff2_url%>" as="font" type="font/woff2" crossorigin />
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'FontAwesome';
|
||||
src: url('<%=asset_path "fontawesome-webfont.woff2" %>?<%= font_domain %>&v=4.5.0') format('woff2'),
|
||||
src: url('<%=woff2_url %>') format('woff2'),
|
||||
url('<%=asset_path "fontawesome-webfont.woff" %>?<%= font_domain %>&v=4.5.0') format('woff');
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue