-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Font Awesome 5.11.2 #77
base: master
Are you sure you want to change the base?
Conversation
…version 5 fa is a deprecated class, replaced icons.css with fontawesome.min.css
…ced old font with 3 new fonts.
…amily and added a size due to Font Awesome 5 now requiring it.
position: relative; | ||
display: block; | ||
top: 50%; | ||
-webkit-transform: translateY(-55%); | ||
transform: translateY(-55%); | ||
font-weight: 900; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why setting the weight?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question: it wasn't working without it. I believe in the past Font Awesome had one font, but now that they've re-written it they have multiple fonts (I included the free ones which I'm guessing most people will use). The fonts have a particular weight that has to be set. Before I had that included some icons wouldn't render. Here's a little bit more information on it. I'm open to changing it if there's another option?
@@ -14,4 +14,4 @@ | |||
{{- $css := resources.Get $sass | toCSS $cssOpts | minify | fingerprint }} | |||
<link rel="stylesheet" type="text/css" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}"> | |||
{{- end }} | |||
<link rel="stylesheet" type="text/css" href="{{ "css/icons.css" | absURL }}"> | |||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" integrity="sha384-KA6wR/X5RY4zFAHpv/CnoG2UW1uogYfdnP67Uv7eULvTveboZJg0qUpmJZb5VqzN" crossorigin="anonymous"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to use a CDN instead of bundling it with the website?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, honestly. My rationale was this: downloading from a trusted third party seems like it would reduce the possibility of anything malicious being downloaded and seems to make updating things in the future easier because we just need to change a URL link instead of downloading a specific file and renaming it to icons.css If you would prefer to download the file and include it as part of the site that's fine by me. I just chose one path when I think there are several good ways to achieve it :)
7c769b3
to
1907474
Compare
Fixes #71 for @thomasboni BUT will break old configuration files. There may be a way to fail more elegantly, but that's beyond my capability. In FA5, Font Awesome 5 deprecates "fa" in "fa fa-gitlab". Brands now use "fab" (so fab fa-gitlab"), Solid now uses "fas", and Regular now uses "far". This meant adjusting the way the footer calls icons and requiring the config file to have the full name: "xxx xx-xxxxx". Tested using gitlab and it works.
Also required updating the the 'backtotop' button which was using a Font Awesome font family. The new FA5 now requires that css calls use font-weight which I updated.