Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nathanbiller
Copy link
Contributor

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.

position: relative;
display: block;
top: 50%;
-webkit-transform: translateY(-55%);
transform: translateY(-55%);
font-weight: 900;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why setting the weight?

Copy link
Contributor Author

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">
Copy link
Owner

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?

Copy link
Contributor Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font awesome gitlab icon not displayed in footer
2 participants