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

35 lines
1.4 KiB
Plaintext
Raw Normal View History

2013-02-11 19:41:23 +08:00
2013-02-26 00:42:20 +08:00
<%#
2013-02-11 19:41:23 +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:
https://forums.aws.amazon.com/thread.jspa?threadID=114646
2013-12-01 12:34:32 +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
%>
2013-12-01 12:34:32 +08:00
<% font_domain = "#{request.protocol}#{request.host_with_port}&1" %>
2013-02-11 19:41:23 +08:00
<style>
@font-face {
font-family: 'FontAwesome';
2014-07-03 15:58:12 +08:00
src: url('<%=asset_path "fontawesome-webfont.eot" %>?<%= font_domain %>&v=4.0.4');
src: url('<%=asset_path "fontawesome-webfont.eot" %>?<%= font_domain %>&v=4.0.4#iefix') format('embedded-opentype'),
url('<%=asset_path "fontawesome-webfont.woff" %>?<%= font_domain %>&v=4.0.4') format('woff'),
url('<%=asset_path "fontawesome-webfont.ttf" %>?<%= font_domain %>&v=4.0.4') format('truetype');
2013-02-11 19:41:23 +08:00
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'zocial';
src: url('<%=asset_path "zocial-regular-webfont.woff" %>?<%= font_domain %>') format('woff'),
url('<%=asset_path "zocial-regular-webfont.ttf" %>?<%= font_domain %>') format('truetype'),
url('<%=asset_path "zocial-regular-webfont.svg" %>?<%= font_domain %>#zocialregular') format('svg');
2013-02-11 19:41:23 +08:00
font-weight: normal;
font-style: normal;
2013-02-26 00:42:20 +08:00
}
</style>