-
-
Notifications
You must be signed in to change notification settings - Fork 17
feat: Use fontsource instead of restribution of fonts and icons #96
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for fipguide ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
549a6ab to
62d9c9d
Compare
62d9c9d to
ec9d6bb
Compare
2 tasks
Member
|
We've already used this way of icon and font integration in an earlier development stage. So we should discuss it with @lenderom. |
Member
Author
ec9d6bb to
a7b5e15
Compare
a7b5e15 to
40d51c2
Compare
Member
Author
|
@therobrob I changed it to rounded symbols 👍 |
40d51c2 to
91c90cd
Compare
therobrob
requested changes
May 5, 2025
8a21212 to
7237b48
Compare
therobrob
approved these changes
May 6, 2025
lenderom
pushed a commit
that referenced
this pull request
May 7, 2025
## Description Add a link to report issues directly in the sidemenu. Corresponding labels are auto-added to the report. Depends on #96. Do not merge before #96 is merged! The content was modified in the following languages: <!-- Der Inhalt wurde für die folgenden Sprachen angepasst --> - [x] English - [x] German
MoritzWeber0
added a commit
that referenced
this pull request
May 18, 2025
The icon usage was replaced by fontsource in #96. The remaining icon infrastructure was only used for the logos of operators. This commit simplifies the code by replacing the "ico" partial with a "logo" partial.
MoritzWeber0
added a commit
that referenced
this pull request
May 18, 2025
The icon usage was replaced by fontsource in #96. The remaining icon infrastructure was only used for the logos of operators. This commit simplifies the code by replacing the "ico" partial with a "logo" partial.
MoritzWeber0
added a commit
that referenced
this pull request
May 18, 2025
The icon usage was replaced by fontsource in #96. The remaining icon infrastructure was only used for the logos of operators. This commit simplifies the code by replacing the "ico" partial with a "logo" partial.
lenderom
added a commit
that referenced
this pull request
May 27, 2025
The icon usage was replaced by fontsource in #96. The remaining icon infrastructure was only used for the logos of operators. This PR simplifies the code by replacing the "ico" partial with a "logo" partial. In addition to the high complexity of the old "_ico.html", it had some issues: - Multiple return statements were used in one partial. This is not allowed as per docs ("Only one return statement is allowed per partial file."): https://gohugo.io/templates/partial/#example-getimage - The whole build process broke when an operator was added without related logo. --------- Signed-off-by: lennartrommeiss <[email protected]> Co-authored-by: Lennart Rommeiss <[email protected]> Co-authored-by: lennartrommeiss <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Use fontsource to install the fonts via npm instead of manually redistributing the fonts and icons. The benefit is that fonts can receive updates and icons don't have to be uploaded manually.
To use icons, you have to find out the name of the icon (https://fonts.google.com/icons). Then, there are two different ways:
{{ partial "icon" "<icon-name>" }}{{< icon <icon-name> >}}The only disadvantage is the size of 270kB, but it's lazy-loaded and we have all icons.
It might be good to add the shortcut to the contribution wiki after the PR has been merged.
For the Roboto font, the improvement is even more significant (esp. for Chrome users). It recognizes the font as actual Roboto font and loads it from chrome resources, reducing the size of ~300kB to ~200 bytes.
TODO: