discourse/app/views/common/_special_font_face.html.erb

25 lines
1 KiB
Text
Raw Normal View History

2015-03-27 08:08:58 -04:00
<%#
The fonts are loaded outside of the stylesheet so that we can dynamically change the path.
This is to get around CDN caching on the Origin:
2013-02-11 06:41:23 -05:00
2015-03-27 08:08:58 -04:00
https://forums.aws.amazon.com/thread.jspa?threadID=114646
2013-02-11 06:41:23 -05:00
2015-03-27 08:08:58 -04:00
Also added a cache breaker there in case we have breaking config changes
&1 was added last when the nginx sample config changed
%>
2013-02-11 06:41:23 -05:00
2015-03-27 11:33:15 -04:00
<% font_domain = "#{request.protocol}#{request.host_with_port}&2" %>
2013-02-11 06:41:23 -05:00
<style>
@font-face {
font-family: 'FontAwesome';
2015-12-10 17:19:23 -05:00
src: url('<%=asset_path "fontawesome-webfont.eot" %>?<%= font_domain %>&v=4.5.0');
src: url('<%=asset_path "fontawesome-webfont.eot" %>?<%= font_domain %>&v=4.5.0#iefix') format('embedded-opentype'),
url('<%=asset_path "fontawesome-webfont.woff2" %>?<%= font_domain %>&v=4.5.0') format('woff2'),
url('<%=asset_path "fontawesome-webfont.woff" %>?<%= font_domain %>&v=4.5.0') format('woff'),
url('<%=asset_path "fontawesome-webfont.ttf" %>?<%= font_domain %>&v=4.5.0') format('truetype');
2013-02-11 06:41:23 -05:00
font-weight: normal;
font-style: normal;
}
2013-02-25 11:42:20 -05:00
</style>