diff --git a/README.Rmd b/README.Rmd index 44372da..d4e9d89 100644 --- a/README.Rmd +++ b/README.Rmd @@ -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/icons@v0.1.0")`. diff --git a/README.md b/README.md index f8351b0..0776281 100644 --- a/README.md +++ b/README.md @@ -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) 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,18 +52,19 @@ 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")` `` - or -`` `r icons::fontawesome$solid$rocket` `` -. + +or `` `r icons::fontawesome$solid$rocket` `` +. Icons can also be inserted using usual R chunks. @@ -71,7 +72,8 @@ Icons can also be inserted using usual R chunks. fontawesome("rocket", style = "solid") # equivalent to icons::fontawesome$solid$rocket ``` - + 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" ``` - + 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") ``` - + 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 ``` - + 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/icons@v0.1.0")`.