-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔥 Add v0.1.0 install instructions to README
Resolves #66
- Loading branch information
1 parent
2dbcb3d
commit 34e2d96
Showing
2 changed files
with
32 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -106,3 +106,4 @@ icon_find("rocket") | |
|
||
This is the second iteration of the icon package, the [first icon package](https://github.com/ropenscilabs/icon) has been successful, but lacked a few features such as SVG icons, user defined libraries, and extensibility support. You can read the notes on the new API [here](https://github.com/ropenscilabs/icon/issues/19). It turns out that it was easier to build the new and improved icon from scratch, which is what this repository is. In the future this version of icon might just be merged into rOpenScilabs/icon, but for the mean time it will be developed here. We anticipate that there will only be any minor changes to the existing API, so hopefully this will be a seamless transition for users! Notably, the `icon_name` functions have been removed in favour of `icon$name`, and the interface for styling and animating has been removed/changed. | ||
|
||
If you need to use the first version of the package that was developed from the rOpenSci hackathon, you can install it with `remotes::install_github("mitchelloharawild/[email protected]")`. |
This file contains 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ status](https://github.com/mitchelloharawild/icons/workflows/R-CMD-check/badge.s | |
[![Coverage | ||
status](https://codecov.io/gh/mitchelloharawild/icons/branch/master/graph/badge.svg)](https://codecov.io/gh/mitchelloharawild/icon?branch=master) | ||
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) | ||
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/icon)](https://cran.r-project.org/package=icons) | ||
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/icon)](https://cran.r-project.org/package=icons) | ||
<!-- [![Downloads](http://cranlogs.r-pkg.org/badges/icons?color=brightgreen)](https://cran.r-project.org/package=icons) --> | ||
|
||
The `icons` package for R makes adding web icons to reports, | ||
|
@@ -23,16 +23,16 @@ what is possible with emoji. | |
The `icons` package currently provides helpful tools for downloading and | ||
using icons from these libraries: | ||
|
||
- [Font Awesome](https://github.com/FortAwesome/Font-Awesome/) (Pro | ||
icons can be used using custom icon sets) | ||
- [Ionicons](https://github.com/ionic-team/ionicons/) | ||
- [Academicons](https://github.com/jpswalsh/academicons) | ||
- [Simple Icons](https://github.com/simple-icons/simple-icons/) | ||
- [Google’s Material | ||
Design](https://github.com/google/material-design-icons) | ||
- [Octicons](https://github.com/primer/octicons) | ||
- [Feather Icons](https://github.com/feathericons/feather) | ||
- [Bioicons](https://github.com/duerrsimon/bioicons) | ||
- [Font Awesome](https://github.com/FortAwesome/Font-Awesome/) (Pro | ||
icons can be used using custom icon sets) | ||
- [Ionicons](https://github.com/ionic-team/ionicons/) | ||
- [Academicons](https://github.com/jpswalsh/academicons) | ||
- [Simple Icons](https://github.com/simple-icons/simple-icons/) | ||
- [Google’s Material | ||
Design](https://github.com/google/material-design-icons) | ||
- [Octicons](https://github.com/primer/octicons) | ||
- [Feather Icons](https://github.com/feathericons/feather) | ||
- [Bioicons](https://github.com/duerrsimon/bioicons) | ||
|
||
# Installation | ||
|
||
|
@@ -52,26 +52,28 @@ icons you would use `download_fontawesome()`. | |
|
||
``` r | ||
library(icons) | ||
#> ── Installed icons ─────────────────────────────────────────────── icon 0.2.0 ── | ||
#> ✓ ionicons 5.2.3 ✓ feather_icons v4.28.0 | ||
#> ✓ academicons 1.9.1 ✓ octicons 11.2.0 | ||
#> ✓ simple_icons 4.4.0 ✓ fontawesome 5.15.2 | ||
#> ✓ google_material 4.0.0 | ||
#> -- Installed icons ----------------------------------------------- icon 0.2.0 -- | ||
#> v ionicons 5.2.3 v google_material 4.0.0 | ||
#> v academicons 1.9.1 v feather_icons v4.28.0 | ||
#> v simple_icons 4.4.0 v octicons 11.2.0 | ||
#> v bioicons 1.0.0 v fontawesome 5.15.2 | ||
``` | ||
|
||
Icons can be inserted inline using inline code | ||
`` `r icons::fontawesome("rocket", style = "solid")` `` | ||
<img src="man/figures/load-1.svg" height="16px"/> or | ||
`` `r icons::fontawesome$solid$rocket` `` | ||
<img src="man/figures/load-1.svg" height="16px"/>. | ||
<img src="/tmp/Rtmpl6Yazw/file321ffb1f6442d.png" style="height:0.7em" /> | ||
or `` `r icons::fontawesome$solid$rocket` `` | ||
<img src="/tmp/Rtmpl6Yazw/file321ffb6addfad0.png" | ||
style="height:0.7em" />. | ||
|
||
Icons can also be inserted using usual R chunks. | ||
|
||
```{r icon-chunk} | ||
fontawesome("rocket", style = "solid") # equivalent to icons::fontawesome$solid$rocket | ||
``` | ||
|
||
<img src="man/figures/icon-chunk-1.svg" height="16px"/> | ||
<img src="/tmp/Rtmpl6Yazw/file321ffb1c8254ab.png" | ||
style="height:0.7em" /> | ||
|
||
If the icon name contains non-syntactic name characters like a `-` or | ||
`+`, you will need to quote the name with backticks, single or double | ||
|
@@ -81,7 +83,8 @@ quotes: | |
fontawesome$brands$`r-project` # or 'r-project' or "r-project" | ||
``` | ||
|
||
<img src="man/figures/icon-syntax-1.svg" height="16px"/> | ||
<img src="/tmp/Rtmpl6Yazw/file321ffb21882b13.png" | ||
style="height:0.7em" /> | ||
|
||
The appearance of an icon can be customised using the `icon_style()` | ||
function. | ||
|
@@ -90,7 +93,8 @@ function. | |
icon_style(fontawesome("rocket", style = "solid"), scale = 2, fill = "red") | ||
``` | ||
|
||
<img src="man/figures/icon-style-1.svg" height="32px"/> | ||
<img src="/tmp/Rtmpl6Yazw/file321ffb1191f165.png" | ||
style="height:1.4em" /> | ||
|
||
Custom icon sets can be created using the `icon_set()` function, which | ||
accepts a directory of SVG files and allows them to be used as icons. | ||
|
@@ -100,7 +104,7 @@ accepts a directory of SVG files and allows them to be used as icons. | |
custom$icons | ||
``` | ||
|
||
<img src="man/figures/icon-custom-1.svg" height="16px"/> | ||
<img src="/tmp/Rtmpl6Yazw/file321ffbeca7fa2.png" style="height:0.7em" /> | ||
|
||
You can also search for icons using the `icon_find()` function. | ||
|
||
|
@@ -140,3 +144,7 @@ changes to the existing API, so hopefully this will be a seamless | |
transition for users! Notably, the `icon_name` functions have been | ||
removed in favour of `icon$name`, and the interface for styling and | ||
animating has been removed/changed. | ||
|
||
If you need to use the first version of the package that was developed | ||
from the rOpenSci hackathon, you can install it with | ||
`remotes::install_github("mitchelloharawild/[email protected]")`. |