Fix #4058: FontAwesome CDN is slow/blocking.
Switch to the free self-hosted version of FontAwesome. We're not using any Pro icons, so the Pro version isn't necessary.
This commit is contained in:
@@ -25,6 +25,9 @@ require("jquery-ui/themes/base/draggable.css");
|
|||||||
require("jquery-ui/themes/base/resizable.css");
|
require("jquery-ui/themes/base/resizable.css");
|
||||||
require("jquery-ui/themes/base/theme.css");
|
require("jquery-ui/themes/base/theme.css");
|
||||||
|
|
||||||
|
require("@fortawesome/fontawesome-free/css/all.css");
|
||||||
|
require("@fortawesome/fontawesome-free/js/all.js");
|
||||||
|
|
||||||
importAll(require.context('../src/javascripts', true, /\.js(\.erb)?$/));
|
importAll(require.context('../src/javascripts', true, /\.js(\.erb)?$/));
|
||||||
importAll(require.context('../src/styles', true, /\.s?css(?:\.erb)?$/));
|
importAll(require.context('../src/styles', true, /\.s?css(?:\.erb)?$/));
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
|
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
|
||||||
<%= raw Danbooru.config.custom_html_header_content %>
|
<%= raw Danbooru.config.custom_html_header_content %>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
|
|
||||||
<%= javascript_pack_tag "application" %>
|
<%= javascript_pack_tag "application" %>
|
||||||
<%= stylesheet_pack_tag "application" %>
|
<%= stylesheet_pack_tag "application" %>
|
||||||
<%= yield :html_header %>
|
<%= yield :html_header %>
|
||||||
|
|||||||
@@ -68,12 +68,6 @@
|
|||||||
"url" : "<%= root_url %>"
|
"url" : "<%= root_url %>"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<% if request.domain =~ /donmai\.us/ %>
|
|
||||||
<!-- this is only usable on danbooru.donmai.us -->
|
|
||||||
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-6jHF7Z3XI3fF4XZixAuSu0gGKrXwoX/w3uFPxC56OtjChio7wtTGJWRW53Nhx6Ev" crossorigin="anonymous">
|
|
||||||
<% else %>
|
|
||||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
|
|
||||||
<% end %>
|
|
||||||
<script>
|
<script>
|
||||||
if (typeof window.Danbooru !== "object") {
|
if (typeof window.Danbooru !== "object") {
|
||||||
window.Danbooru = {};
|
window.Danbooru = {};
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@fortawesome/fontawesome-free": "^5.11.2",
|
||||||
"@rails/webpacker": "^4.0.0",
|
"@rails/webpacker": "^4.0.0",
|
||||||
"debug-loader": "^0.0.1",
|
"debug-loader": "^0.0.1",
|
||||||
"dropzone": "^5.5.1",
|
"dropzone": "^5.5.1",
|
||||||
|
|||||||
@@ -757,6 +757,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
|
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
|
||||||
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
|
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
|
||||||
|
|
||||||
|
"@fortawesome/fontawesome-free@^5.11.2":
|
||||||
|
version "5.11.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.11.2.tgz#8644bc25b19475779a7b7c1fc104bc0a794f4465"
|
||||||
|
integrity sha512-XiUPoS79r1G7PcpnNtq85TJ7inJWe0v+b5oZJZKb0pGHNIV6+UiNeQWiFGmuQ0aj7GEhnD/v9iqxIsjuRKtEnQ==
|
||||||
|
|
||||||
"@mrmlnc/readdir-enhanced@^2.2.1":
|
"@mrmlnc/readdir-enhanced@^2.2.1":
|
||||||
version "2.2.1"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
|
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
|
||||||
|
|||||||
Reference in New Issue
Block a user