Просмотр исходного кода

Update Readme to show primary args of theme functions

tags/v0.1.1
Garrick Aden-Buie 8 лет назад
Родитель
Сommit
473c38f839
2 измененных файлов: 87 добавлений и 2 удалений
  1. +48
    -0
      README.Rmd
  2. +39
    -2
      README.md

+ 48
- 0
README.Rmd Просмотреть файл

```{r setup, include = FALSE} ```{r setup, include = FALSE}
knitr::opts_chunk$set( knitr::opts_chunk$set(
collapse = TRUE, collapse = TRUE,
results = "asis",
echo = FALSE,
comment = "#>", comment = "#>",
fig.path = "man/figures/README-", fig.path = "man/figures/README-",
out.width = "100%" out.width = "100%"


A light theme based around a single color. A light theme based around a single color.


```{r mono_light}
demo_function_call <- function(f, n_params = 1) {
cat(sep = "",
"```r\n",
paste(substitute(f)), "(",
if (n_params > 0) paste(collapse = ", ",
sapply(1:n_params, function(i) {
paste0(names(formals(f))[i], ' = "', formals(f)[[i]], '"')})),
")\n```"
)
}
demo_function_call(mono_light, 1)
```

![](docs/example_mono_light.png) ![](docs/example_mono_light.png)


#### `mono_dark()` #### `mono_dark()`


A dark theme based around a single color. A dark theme based around a single color.


```{r mono_dark}
demo_function_call(mono_dark, 1)
```

![](docs/example_mono_dark.png) ![](docs/example_mono_dark.png)


#### `mono_accent()` #### `mono_accent()`


The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.). The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).


```{r mono_accent}
demo_function_call(mono_accent, 1)
```

![](docs/example_mono_accent.png) ![](docs/example_mono_accent.png)


#### `mono_accent_inverse()` #### `mono_accent_inverse()`


An "inverted" default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.). An "inverted" default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).


```{r mono_accent_inverse}
demo_function_call(mono_accent_inverse, 1)
```

![](docs/example_mono_accent_inverse.png) ![](docs/example_mono_accent_inverse.png)




A two-colored theme based on a primary and secondary color. A two-colored theme based on a primary and secondary color.


```{r duo}
demo_function_call(duo, 2)
```

![](docs/example_duo.png) ![](docs/example_duo.png)


#### `duo_accent()` #### `duo_accent()`


The default Xaringan theme with two accent colors. The default Xaringan theme with two accent colors.


```{r duo_accent}
demo_function_call(duo_accent, 2)
```

![](docs/example_duo_accent.png) ![](docs/example_duo_accent.png)


#### `duo_accent_inverse()` #### `duo_accent_inverse()`


An "inverted" default Xaringan theme with two accent colors. An "inverted" default Xaringan theme with two accent colors.


```{r duo_accent_inverse}
demo_function_call(duo_accent_inverse, 2)
```

![](docs/example_duo_accent_inverse.png) ![](docs/example_duo_accent_inverse.png)


### Solarized ### Solarized


#### `solarized_light()` #### `solarized_light()`


```{r solarized_light}
demo_function_call(solarized_light, 0)
```

![](docs/example_solarized_light.png) ![](docs/example_solarized_light.png)


#### `solarized_dark()` #### `solarized_dark()`


```{r solarized_dark}
demo_function_call(solarized_dark, 0)
```

![](docs/example_solarized_dark.png) ![](docs/example_solarized_dark.png)





+ 39
- 2
README.md Просмотреть файл



A light theme based around a single color. A light theme based around a single color.


``` r
mono_light(base_color = "#23395b")
```

![](docs/example_mono_light.png) ![](docs/example_mono_light.png)


#### `mono_dark()` #### `mono_dark()`


A dark theme based around a single color. A dark theme based around a single color.


``` r
mono_dark(base_color = "#cbf7ed")
```

![](docs/example_mono_dark.png) ![](docs/example_mono_dark.png)


#### `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
mono_accent(base_color = "#43418A")
```

![](docs/example_mono_accent.png) ![](docs/example_mono_accent.png)


#### `mono_accent_inverse()` #### `mono_accent_inverse()`
An “inverted” default xaringan theme with a single color used for color An “inverted” default xaringan theme with a single color used for color
accents on select elements (headers, bold text, etc.). accents on select elements (headers, bold text, etc.).


``` r
mono_accent_inverse(base_color = "#3C989E")
```

![](docs/example_mono_accent_inverse.png) ![](docs/example_mono_accent_inverse.png)


### Duotone ### Duotone


A two-colored theme based on a primary and secondary color. A two-colored theme based on a primary and secondary color.


``` r
duo(primary_color = "#1F4257", secondary_color = "#F97B64")
```

![](docs/example_duo.png) ![](docs/example_duo.png)


#### `duo_accent()` #### `duo_accent()`


The default Xaringan theme with two accent colors. The default Xaringan theme with two accent colors.


``` r
duo_accent(primary_color = "#006747", secondary_color = "#CFC493")
```

![](docs/example_duo_accent.png) ![](docs/example_duo_accent.png)


#### `duo_accent_inverse()` #### `duo_accent_inverse()`


An “inverted” default Xaringan theme with two accent colors.
An “inverted” default Xaringan theme with two accent
colors.

``` r
duo_accent_inverse(primary_color = "#006747", secondary_color = "#CFC493")
```


![](docs/example_duo_accent_inverse.png) ![](docs/example_duo_accent_inverse.png)




#### `solarized_light()` #### `solarized_light()`


``` r
solarized_light()
```

![](docs/example_solarized_light.png) ![](docs/example_solarized_light.png)


#### `solarized_dark()` #### `solarized_dark()`


``` r
solarized_dark()
```

![](docs/example_solarized_dark.png) ![](docs/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:
- `text_color` - `text_color`
- `text_bold_color` - `text_bold_color`
- `text_slide_number_color` - `text_slide_number_color`
- `text_size`
- `text_font_size`
- `text_slide_number_font_size` - `text_slide_number_font_size`
- *and more …* - *and more …*



Загрузка…
Отмена
Сохранить