mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
21 lines
808 B
Plaintext
21 lines
808 B
Plaintext
<%#
|
|
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
|
|
|
|
Also added a cache breaker there in case we have breaking config changes
|
|
&1 was added last when the nginx sample config changed
|
|
%>
|
|
|
|
<% font_domain = "#{request.protocol}#{request.host_with_port}&2" %>
|
|
|
|
<link rel="preload" href="<%=asset_path "fontawesome-webfont.woff2"%>" 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'),
|
|
url('<%=asset_path "fontawesome-webfont.woff" %>?<%= font_domain %>&v=4.5.0') format('woff');
|
|
}
|
|
</style>
|