Skip to content

Commit 607d040

Browse files
authored
Tidy Font Awesome implementation (hestiacp#3055)
* Tidy Font Awesome implementation - Replace modified v5.something Font Awesome CSS with LTS v5.15.4 loaded from npm - Only load core and "solid" Font Awesome CSS instead of everything - Update/remove unused Font Awesome webfont files * Bump ESLint version
1 parent 37434e5 commit 607d040

22 files changed

+2256
-5797
lines changed

web/css/dependencies/fontawesome.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*!
2+
* Modified Font Awesome css/fa-solid.css to adjust webfonts path
3+
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
4+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
5+
*/
6+
@font-face {
7+
font-family: "Font Awesome 5 Free";
8+
font-style: normal;
9+
font-weight: 900;
10+
font-display: block;
11+
src: url("/webfonts/fa-solid-900.eot");
12+
src: url("/webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("/webfonts/fa-solid-900.woff2") format("woff2"), url("/webfonts/fa-solid-900.woff") format("woff"), url("/webfonts/fa-solid-900.ttf") format("truetype"), url("/webfonts/fa-solid-900.svg#fontawesome") format("svg");
13+
}
14+
15+
.fa,
16+
.fas {
17+
font-family: "Font Awesome 5 Free";
18+
font-weight: 900;
19+
}

web/css/src/themes/default.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
@import url("normalize.css");
2+
@import url("@fortawesome/fontawesome-free/css/fontawesome.css");
3+
@import url("../dependencies/fontawesome-solid.css");
24
@import url("../dependencies/animate.css");
35
@import url("../dependencies/jquery-ui.css");
46

web/css/themes/default.min.css

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
"lint": "eslint js --fix && stylelint css/src/themes/*.css --fix"
1010
},
1111
"dependencies": {
12+
"@fortawesome/fontawesome-free": "^5.15.4",
1213
"normalize.css": "^8.0.1"
1314
},
1415
"devDependencies": {
1516
"cssnano": "^5.1.14",
16-
"eslint": "^8.27.0",
17+
"eslint": "^8.28.0",
1718
"postcss": "^8.4.19",
1819
"postcss-cli": "^10.0.0",
1920
"postcss-import": "^15.0.0",

web/templates/includes/css.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@
2323
}
2424
}
2525
?>
26-
<link rel="stylesheet" href="/css/dependencies/fontawesome.min.css?<?=JS_LATEST_UPDATE?>">

web/webfonts/fa-brands-400.eot

-122 KB
Binary file not shown.

web/webfonts/fa-brands-400.svg

Lines changed: 0 additions & 3296 deletions
This file was deleted.

web/webfonts/fa-brands-400.ttf

-122 KB
Binary file not shown.

web/webfonts/fa-brands-400.woff

-82.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)