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

25 lines
1.0 KiB
Plaintext
Raw Normal View History

2015-03-27 20:08:58 +08: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 19:41:23 +08:00
2015-03-27 20:08:58 +08:00
https://forums.aws.amazon.com/thread.jspa?threadID=114646
2013-02-11 19:41:23 +08:00
2015-03-27 20:08:58 +08: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 19:41:23 +08:00
2015-03-27 23:33:15 +08:00
<% font_domain = "#{request.protocol}#{request.host_with_port}&2" %>
2013-02-11 19:41:23 +08:00
<style>
@font-face {
font-family: 'FontAwesome';
2015-09-21 10:46:58 +08:00
src: url('<%=asset_path "fontawesome-webfont.eot" %>?<%= font_domain %>&v=4.4.0');
src: url('<%=asset_path "fontawesome-webfont.eot" %>?<%= font_domain %>&v=4.4.0#iefix') format('embedded-opentype'),
url('<%=asset_path "fontawesome-webfont.woff2" %>?<%= font_domain %>&v=4.4.0') format('woff2'),
url('<%=asset_path "fontawesome-webfont.woff" %>?<%= font_domain %>&v=4.4.0') format('woff'),
url('<%=asset_path "fontawesome-webfont.ttf" %>?<%= font_domain %>&v=4.4.0') format('truetype');
2013-02-11 19:41:23 +08:00
font-weight: normal;
font-style: normal;
}
2013-02-26 00:42:20 +08:00
</style>