-
Notifications
You must be signed in to change notification settings - Fork 1
Update icon docs #449
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
Update icon docs #449
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,20 @@ | ||
| # Font-Awesome | ||
| # Font Awesome | ||
|
|
||
| You can either include font-awesome through their CDN or install it via npm/yarn. | ||
| You can either include Font Awesome through their CDN or install it via npm/yarn. | ||
|
|
||
| ## Installation with yarn | ||
|
|
||
| ### Set up | ||
| ### Pro version | ||
|
|
||
| #### PRO version | ||
| 1. Look up the auth token which can be found [here](https://fontawesome.com/account). The credentials can be found on 1Password. | ||
| 1. Follow [these steps](https://docs.fontawesome.com/web/setup/packages#installing-pro) to set up _font-awesome_ pro either per project or globally. | ||
|
|
||
| 1. Look up the auth token which can be found [here](https://fontawesome.com/account). The credentials can be found on passwork | ||
| 1. Follow [these steps](https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers#installing-pro) to set up _font-awesome_ pro either per project or globally. | ||
|
|
||
| #### Free | ||
| ### Free | ||
|
|
||
| For the free version of _font-awesome 5_ just run `yarn add @fortawesome/fontawesome-free` | ||
|
|
||
| ### Inclusion for Webpacker | ||
|
|
||
| Include this code in your `stylesheets.scss` | ||
| ``` | ||
| $fa-font-path: '~@fortawesome/fontawesome-free/webfonts'; | ||
| @import '~@fortawesome/fontawesome-free/scss/fontawesome'; | ||
| @import '~@fortawesome/fontawesome-free/scss/solid'; | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| 1. Navigate to the [font-awesome gallery list](https://fontawesome.com/icons?d=gallery) | ||
| 1. Navigate to the [Font Awesome gallery list](https://fontawesome.com/icons?d=gallery) | ||
| 1. Search for the icon that you wish to include and copy paste the `<i>` tag into your application: | ||
| For example for the Angular symbol I can just use this tag: `<i class="fab fa-angular"></i>` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Material Symbols | ||
|
|
||
| You can either include Material Symbols via the Google CDN, download the font, or download the SVGs separately. | ||
|
|
||
| ## Installation | ||
|
|
||
| 1. Insert the code from [fonts.googleapis.com](https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0) into your CSS file. | ||
| 1. Download the WOFF2 file from the `src` URL and rename it, for example `material_symbols_outlined.woff2`. | ||
| 1. Place the font file in the `app/assets/fonts/` directory. | ||
| 1. Replace the URL to fonts.gstatic.com with the filename: | ||
|
|
||
| ```css | ||
| @font-face { | ||
| font-family: Material Symbols Outlined; | ||
| src: url(material_symbols_outlined.woff2) format("woff2"); | ||
| } | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| 1. Navigate to the [Material Symbols icon list](https://fonts.google.com/icons?icon.set=Material+Symbols) | ||
| 1. Search for the icon that you want to include and copy paste it into the HTML. For example, the search icon uses this tag: `<span class="material-symbols-outlined">search</span>`. | ||
| 1. You can also add a helper method if you want to use the icons with `icon(:search)`: | ||
|
|
||
| ```rb | ||
| module ApplicationHelper | ||
| def icon(name) | ||
| tag.span(name, class: "material-symbols-outlined", "aria-hidden": true) | ||
| end | ||
| end | ||
| ``` | ||
Oops, something went wrong.
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.
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.
👍