Explorar el Código

Rename CSS output file to xaringan-themer.css

tags/v0.1.1
Garrick Aden-Buie hace 8 años
padre
commit
57ab178af5
Se han modificado 23 ficheros con 39 adiciones y 37 borrados
  1. +1
    -1
      R/duo.R
  2. +1
    -1
      R/duo_accent.R
  3. +1
    -1
      R/duo_accent_inverse.R
  4. +1
    -1
      R/mono_accent.R
  5. +1
    -1
      R/mono_accent_inverse.R
  6. +1
    -1
      R/mono_dark.R
  7. +1
    -1
      R/mono_light.R
  8. +1
    -1
      R/solarized_dark.R
  9. +1
    -1
      R/solarized_light.R
  10. +1
    -1
      R/write_theme.R
  11. +9
    -8
      README.Rmd
  12. +9
    -8
      README.md
  13. +1
    -1
      inst/scripts/generate_theme_functions.R
  14. +1
    -1
      man/duo.Rd
  15. +1
    -1
      man/duo_accent.Rd
  16. +1
    -1
      man/duo_accent_inverse.Rd
  17. +1
    -1
      man/mono_accent.Rd
  18. +1
    -1
      man/mono_accent_inverse.Rd
  19. +1
    -1
      man/mono_dark.Rd
  20. +1
    -1
      man/mono_light.Rd
  21. +1
    -1
      man/solarized_dark.Rd
  22. +1
    -1
      man/solarized_light.Rd
  23. +1
    -1
      man/write_xaringan_theme.Rd

+ 1
- 1
R/duo.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/duo_accent.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/duo_accent_inverse.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/mono_accent.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/mono_accent_inverse.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/mono_dark.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/mono_light.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/solarized_dark.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/solarized_light.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
eval(parse(text = call_write_xaringan_theme())) eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/write_theme.R Ver fichero

code_font_family = "'Source Code Pro'", code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css"
outfile = "xaringan-themer.css"
) { ) {
# Make sure font names are wrapped in quotes if they have spaces # Make sure font names are wrapped in quotes if they have spaces
f_args <- names(formals(sys.function())) f_args <- names(formals(sys.function()))

+ 9
- 8
README.Rmd Ver fichero



## Quick Intro ## Quick Intro


First, add `css: xaringan-themed.css` to your xaringan slides YAML header under `xaringan::moonreader:`.
First, add `css: xaringan-themer.css` to your xaringan slides YAML header under `xaringan::moonreader:`.


```yaml ```yaml
output: output:
xaringan::moon_reader: xaringan::moon_reader:
lib_dir: libs lib_dir: libs
css: xaringan-themed.css
css: xaringan-themer.css
``` ```


Then, in the first knitr chunk, load **xaringanthemer** and try one of the [theme functions](#themes).
Then, in the knitr setup chunk, load **xaringanthemer** and try one of the [theme functions](#themes).


````markdown ````markdown
```{r setup, include = FALSE}`r ""` ```{r setup, include = FALSE}`r ""`
options(htmltools.dir.version = FALSE) options(htmltools.dir.version = FALSE)

library(xaringanthemer) library(xaringanthemer)
mono_light( mono_light(
base_color = "#1c5253", base_color = "#1c5253",


#### `mono_light()` #### `mono_light()`


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


![](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.


![](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.).


![](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.).


![](docs/example_mono_accent_inverse.png) ![](docs/example_mono_accent_inverse.png)
output: output:
xaringan::moon_reader: xaringan::moon_reader:
lib_dir: libs lib_dir: libs
css: ["xaringan-themed.css"]
css: ["xaringan-themer.css"]
nature: nature:
highlightStyle: solarized-dark highlightStyle: solarized-dark
highlightLines: true highlightLines: true

+ 9
- 8
README.md Ver fichero



## Quick Intro ## Quick Intro


First, add `css: xaringan-themed.css` to your xaringan slides YAML
First, add `css: xaringan-themer.css` to your xaringan slides YAML
header under `xaringan::moonreader:`. header under `xaringan::moonreader:`.


``` yaml ``` yaml
output: output:
xaringan::moon_reader: xaringan::moon_reader:
lib_dir: libs lib_dir: libs
css: xaringan-themed.css
css: xaringan-themer.css
``` ```


Then, in the first knitr chunk, load **xaringanthemer** and try one of
Then, in the knitr setup chunk, load **xaringanthemer** and try one of
the [theme functions](#themes). the [theme functions](#themes).


```` markdown ```` markdown
```{r setup, include = FALSE} ```{r setup, include = FALSE}
options(htmltools.dir.version = FALSE) options(htmltools.dir.version = FALSE)

library(xaringanthemer) library(xaringanthemer)
mono_light( mono_light(
base_color = "#1c5253", base_color = "#1c5253",


#### `mono_light()` #### `mono_light()`


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


![](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.


![](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.).


![](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.).


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


output: output:
xaringan::moon_reader: xaringan::moon_reader:
lib_dir: libs lib_dir: libs
css: ["xaringan-themed.css"]
css: ["xaringan-themer.css"]
nature: nature:
highlightStyle: solarized-dark highlightStyle: solarized-dark
highlightLines: true highlightLines: true

+ 1
- 1
inst/scripts/generate_theme_functions.R Ver fichero

glue::glue("{f_name} <- function(") %,% glue::glue("{f_name} <- function(") %,%
as.character(glue::glue_data( as.character(glue::glue_data(
tv, " {variable} = {ifelse(!stringr::str_detect(default, '^[{].+[}]$'), paste0('\"', default, '\"'), stringr::str_replace_all(default, '[{}]', ''))},")) %,% tv, " {variable} = {ifelse(!stringr::str_detect(default, '^[{].+[}]$'), paste0('\"', default, '\"'), stringr::str_replace_all(default, '[{}]', ''))},")) %,%
" outfile = \"xaringan-themed.css\"" %,%
" outfile = \"xaringan-themer.css\"" %,%
") {" ") {"
if (!is.null(body)) x <- c(x, body, "}") if (!is.null(body)) x <- c(x, body, "}")
if (file == "clip") { if (file == "clip") {

+ 1
- 1
man/duo.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{primary_color}{Duotone Primary Color, defaults to #1F4257} \item{primary_color}{Duotone Primary Color, defaults to #1F4257}

+ 1
- 1
man/duo_accent.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{primary_color}{Duotone Primary Color, defaults to #006747} \item{primary_color}{Duotone Primary Color, defaults to #006747}

+ 1
- 1
man/duo_accent_inverse.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{primary_color}{Duotone Primary Color, defaults to #006747} \item{primary_color}{Duotone Primary Color, defaults to #006747}

+ 1
- 1
man/mono_accent.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{base_color}{Monotone Base Color, works best with a strong color., defaults to #43418A} \item{base_color}{Monotone Base Color, works best with a strong color., defaults to #43418A}

+ 1
- 1
man/mono_accent_inverse.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{base_color}{Monotone Base Color, works best with a light color., defaults to #3C989E} \item{base_color}{Monotone Base Color, works best with a light color., defaults to #3C989E}

+ 1
- 1
man/mono_dark.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{base_color}{Monotone Base Color, works best with a light color., defaults to #cbf7ed} \item{base_color}{Monotone Base Color, works best with a light color., defaults to #cbf7ed}

+ 1
- 1
man/mono_light.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{base_color}{Monotone base color, works best with a strong color, defaults to #23395b} \item{base_color}{Monotone base color, works best with a strong color, defaults to #23395b}

+ 1
- 1
man/solarized_dark.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{text_color}{Text Color, defaults to #839496} \item{text_color}{Text Color, defaults to #839496}

+ 1
- 1
man/solarized_light.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{text_color}{Text Color, defaults to #657b83} \item{text_color}{Text Color, defaults to #657b83}

+ 1
- 1
man/write_xaringan_theme.Rd Ver fichero

code_font_google = NULL, code_font_family = "'Source Code Pro'", code_font_google = NULL, code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
code_font_family_fallback = "'Lucida Console', Monaco", code_font_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
} }
\arguments{ \arguments{
\item{text_color}{Text Color, defaults to #000} \item{text_color}{Text Color, defaults to #000}

Cargando…
Cancelar
Guardar