| fig.path = "man/figures/README-", | fig.path = "man/figures/README-", | ||||
| out.width = "100%" | out.width = "100%" | ||||
| ) | ) | ||||
| IS_README <- TRUE | |||||
| library(xaringanthemer) | library(xaringanthemer) | ||||
| ``` | ``` | ||||
| # xaringanthemer | # xaringanthemer | ||||
| ```{r child="vignettes/rmdchunks/_thanks.Rmd"} | ```{r child="vignettes/rmdchunks/_thanks.Rmd"} | ||||
| ``` | ``` | ||||
| ```{r include=FALSE} | |||||
| rm("IS_README") | |||||
| ``` |
| (much) | (much) | ||||
| CSS. | CSS. | ||||
| <img src="vignettes/images/examples.gif" width="100%" /> | |||||
| <img src="/Users/garrickaden-buie/Dropbox/R/xaringanthemer/vignettes/images/examples.gif" width="100%" /> | |||||
| - [Installation](#installation) | - [Installation](#installation) | ||||
| - [Quick Intro](#quick-intro) | - [Quick Intro](#quick-intro) | ||||
| ## Installation | ## Installation | ||||
| **xaringanthemer** lives here on GitHub. | |||||
| **xaringanthemer** currently lives on GitHub. | |||||
| ``` r | ``` r | ||||
| # install.packages("devtools") | # install.packages("devtools") | ||||
| <center> | <center> | ||||
| <img src="vignettes/images/rmarkdown-template-screenshot.png" width="350px" /> | |||||
| <img src="/Users/garrickaden-buie/Dropbox/R/xaringanthemer/vignettes/images/rmarkdown-template-screenshot.png" width="350px" /> | |||||
| </center> | </center> | ||||
| #### `mono_light()` | #### `mono_light()` | ||||
| A light theme based around a single | |||||
| color. | |||||
| A light theme based around a single color. | |||||
| ``` r | ``` r | ||||
| mono_light(base_color = "#23395b") | mono_light(base_color = "#23395b") | ||||
| #### `mono_dark()` | #### `mono_dark()` | ||||
| A dark theme based around a single | |||||
| color. | |||||
| A dark theme based around a single color. | |||||
| ``` r | ``` r | ||||
| mono_dark(base_color = "#cbf7ed") | mono_dark(base_color = "#cbf7ed") | ||||
| #### `mono_accent()` | #### `mono_accent()` | ||||
| The default xaringan theme with a single color used for color accents on | The default xaringan theme with a single color used for color accents on | ||||
| select elements (headers, bold text, | |||||
| etc.). | |||||
| select elements (headers, bold text, etc.). | |||||
| ``` r | ``` r | ||||
| mono_accent(base_color = "#43418A") | mono_accent(base_color = "#43418A") | ||||
| #### `duo()` | #### `duo()` | ||||
| A two-colored theme based on a primary and secondary | |||||
| color. | |||||
| A two-colored theme based on a primary and secondary color. | |||||
| ``` r | ``` r | ||||
| duo(primary_color = "#1F4257", secondary_color = "#F97B64") | duo(primary_color = "#1F4257", secondary_color = "#F97B64") | ||||
| #### `duo_accent()` | #### `duo_accent()` | ||||
| The default Xaringan theme with two accent | |||||
| colors. | |||||
| The default Xaringan theme with two accent colors. | |||||
| ``` r | ``` r | ||||
| duo_accent(primary_color = "#006747", secondary_color = "#CFC493") | duo_accent(primary_color = "#006747", secondary_color = "#CFC493") | ||||
| palette](http://ethanschoonover.com/solarized), `solarized_light()` and | palette](http://ethanschoonover.com/solarized), `solarized_light()` and | ||||
| `solarized_dark()`. For both themes, it is advisted to change the syntax | `solarized_dark()`. For both themes, it is advisted to change the syntax | ||||
| highlighting theme to `solarized-light` or `solarized-dark` (looks great | highlighting theme to `solarized-light` or `solarized-dark` (looks great | ||||
| paired or | |||||
| constrasted). | |||||
| paired or constrasted). | |||||
| #### `solarized_light()` | #### `solarized_light()` | ||||
| **xaringanthemer** lives here on GitHub. | |||||
| **xaringanthemer** currently lives on GitHub. | |||||
| ```r | ```r | ||||
| # install.packages("devtools") | # install.packages("devtools") |
| ``` | ``` | ||||
| ```` | ```` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_mono_light_1c5253.png"))` | |||||
| ```{r echo=FALSE} | |||||
| if (exists('IS_README') && IS_README) { | |||||
| knitr::include_graphics("vignettes/images/example_mono_light_1c5253.png") | |||||
| } else { | |||||
| knitr::include_graphics(here::here("vignettes/images/example_mono_light_1c5253.png")) | |||||
| } | |||||
| ``` | |||||
| **xaringanthemer** is <kbd>Tab</kbd> friendly -- [use autocomplete to explore][theme-settings] the [template variables][template-variables] that you can adjust in each of the themes! | **xaringanthemer** is <kbd>Tab</kbd> friendly -- [use autocomplete to explore][theme-settings] the [template variables][template-variables] that you can adjust in each of the themes! | ||||
| ### Monotone | ### Monotone | ||||
| ```{r include=FALSE} | |||||
| IS_README <- exists("IS_README") && IS_README | |||||
| include_graphic <- function(img_path, is_readme = IS_README) { | |||||
| if (is_readme) knitr::include_graphics(img_path) | |||||
| else knitr::include_graphics(here::here(img_path)) | |||||
| } | |||||
| ``` | |||||
| Use these functions to automatically create a consistent color palette for your slides, based around a single color. | Use these functions to automatically create a consistent color palette for your slides, based around a single color. | ||||
| #### `mono_light()` | #### `mono_light()` | ||||
| demo_function_call(mono_light, 1) | demo_function_call(mono_light, 1) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_mono_light.png"))` | |||||
| `r include_graphic("vignettes/images/example_mono_light.png")` | |||||
| #### `mono_dark()` | #### `mono_dark()` | ||||
| demo_function_call(mono_dark, 1) | demo_function_call(mono_dark, 1) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_mono_dark.png"))` | |||||
| `r include_graphic("vignettes/images/example_mono_dark.png")` | |||||
| #### `mono_accent()` | #### `mono_accent()` | ||||
| demo_function_call(mono_accent, 1) | demo_function_call(mono_accent, 1) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_mono_accent.png"))` | |||||
| `r include_graphic("vignettes/images/example_mono_accent.png")` | |||||
| #### `mono_accent_inverse()` | #### `mono_accent_inverse()` | ||||
| demo_function_call(mono_accent_inverse, 1) | demo_function_call(mono_accent_inverse, 1) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_mono_accent_inverse.png"))` | |||||
| `r include_graphic("vignettes/images/example_mono_accent_inverse.png")` | |||||
| ### Duotone | ### Duotone | ||||
| demo_function_call(duo, 2) | demo_function_call(duo, 2) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_duo.png"))` | |||||
| `r include_graphic("vignettes/images/example_duo.png")` | |||||
| #### `duo_accent()` | #### `duo_accent()` | ||||
| demo_function_call(duo_accent, 2) | demo_function_call(duo_accent, 2) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_duo_accent.png"))` | |||||
| `r include_graphic("vignettes/images/example_duo_accent.png")` | |||||
| #### `duo_accent_inverse()` | #### `duo_accent_inverse()` | ||||
| demo_function_call(duo_accent_inverse, 2) | demo_function_call(duo_accent_inverse, 2) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_duo_accent_inverse.png"))` | |||||
| `r include_graphic("vignettes/images/example_duo_accent_inverse.png")` | |||||
| ### Solarized | ### Solarized | ||||
| demo_function_call(solarized_light, 0) | demo_function_call(solarized_light, 0) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_solarized_light.png"))` | |||||
| `r include_graphic("vignettes/images/example_solarized_light.png")` | |||||
| #### `solarized_dark()` | #### `solarized_dark()` | ||||
| demo_function_call(solarized_dark, 0) | demo_function_call(solarized_dark, 0) | ||||
| ``` | ``` | ||||
| `r knitr::include_graphics(here::here("vignettes/images/example_solarized_dark.png"))` | |||||
| `r include_graphic("vignettes/images/example_solarized_dark.png")` | |||||
| To do this, your YAML header should look more-or-less like this: | To do this, your YAML header should look more-or-less like this: |