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

Rename CSS output file to xaringan-themer.css

tags/v0.1.1
Garrick Aden-Buie 8 лет назад
Родитель
Сommit
57ab178af5
23 измененных файлов: 39 добавлений и 37 удалений
  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 Просмотреть файл

@@ -93,7 +93,7 @@ duo <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/duo_accent.R Просмотреть файл

@@ -97,7 +97,7 @@ duo_accent <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/duo_accent_inverse.R Просмотреть файл

@@ -97,7 +97,7 @@ duo_accent_inverse <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/mono_accent.R Просмотреть файл

@@ -95,7 +95,7 @@ mono_accent <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/mono_accent_inverse.R Просмотреть файл

@@ -95,7 +95,7 @@ mono_accent_inverse <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/mono_dark.R Просмотреть файл

@@ -95,7 +95,7 @@ mono_dark <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/mono_light.R Просмотреть файл

@@ -95,7 +95,7 @@ mono_light <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/solarized_dark.R Просмотреть файл

@@ -89,7 +89,7 @@ solarized_dark <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/solarized_light.R Просмотреть файл

@@ -89,7 +89,7 @@ solarized_light <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
eval(parse(text = call_write_xaringan_theme()))

+ 1
- 1
R/write_theme.R Просмотреть файл

@@ -88,7 +88,7 @@ write_xaringan_theme <- function(
code_font_family = "'Source Code Pro'",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
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
f_args <- names(formals(sys.function()))

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

@@ -37,20 +37,21 @@ devtools::install_github("gadenbuie/xaringanthemer")

## 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
output:
xaringan::moon_reader:
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
```{r setup, include = FALSE}`r ""`
options(htmltools.dir.version = FALSE)

library(xaringanthemer)
mono_light(
base_color = "#1c5253",
@@ -73,25 +74,25 @@ Use these functions to automatically create a consistent color palette for your

#### `mono_light()`

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

![](docs/example_mono_light.png)

#### `mono_dark()`

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

![](docs/example_mono_dark.png)

#### `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)

#### `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)
@@ -138,7 +139,7 @@ To do this, your YAML header should look more-or-less like this:
output:
xaringan::moon_reader:
lib_dir: libs
css: ["xaringan-themed.css"]
css: ["xaringan-themer.css"]
nature:
highlightStyle: solarized-dark
highlightLines: true

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

@@ -28,22 +28,23 @@ devtools::install_github("gadenbuie/xaringanthemer")

## 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:`.

``` yaml
output:
xaringan::moon_reader:
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).

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

library(xaringanthemer)
mono_light(
base_color = "#1c5253",
@@ -68,27 +69,27 @@ for your slides, based around a single color.

#### `mono_light()`

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

![](docs/example_mono_light.png)

#### `mono_dark()`

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

![](docs/example_mono_dark.png)

#### `mono_accent()`

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)

#### `mono_accent_inverse()`

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)

@@ -136,7 +137,7 @@ To do this, your YAML header should look more-or-less like this:
output:
xaringan::moon_reader:
lib_dir: libs
css: ["xaringan-themed.css"]
css: ["xaringan-themer.css"]
nature:
highlightStyle: solarized-dark
highlightLines: true

+ 1
- 1
inst/scripts/generate_theme_functions.R Просмотреть файл

@@ -21,7 +21,7 @@ setup_theme_function <- function(
glue::glue("{f_name} <- function(") %,%
as.character(glue::glue_data(
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 (file == "clip") {

+ 1
- 1
man/duo.Rd Просмотреть файл

@@ -35,7 +35,7 @@ duo(primary_color = "#1F4257", secondary_color = "#F97B64",
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{primary_color}{Duotone Primary Color, defaults to #1F4257}

+ 1
- 1
man/duo_accent.Rd Просмотреть файл

@@ -39,7 +39,7 @@ duo_accent(primary_color = "#006747", secondary_color = "#CFC493",
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{primary_color}{Duotone Primary Color, defaults to #006747}

+ 1
- 1
man/duo_accent_inverse.Rd Просмотреть файл

@@ -39,7 +39,7 @@ duo_accent_inverse(primary_color = "#006747", secondary_color = "#CFC493",
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{primary_color}{Duotone Primary Color, defaults to #006747}

+ 1
- 1
man/mono_accent.Rd Просмотреть файл

@@ -34,7 +34,7 @@ mono_accent(base_color = "#43418A", white_color = "#FFFFFF",
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{base_color}{Monotone Base Color, works best with a strong color., defaults to #43418A}

+ 1
- 1
man/mono_accent_inverse.Rd Просмотреть файл

@@ -34,7 +34,7 @@ mono_accent_inverse(base_color = "#3C989E", white_color = "#FFFFFF",
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{base_color}{Monotone Base Color, works best with a light color., defaults to #3C989E}

+ 1
- 1
man/mono_dark.Rd Просмотреть файл

@@ -34,7 +34,7 @@ mono_dark(base_color = "#cbf7ed", white_color = lighten_color(base_color,
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{base_color}{Monotone Base Color, works best with a light color., defaults to #cbf7ed}

+ 1
- 1
man/mono_light.Rd Просмотреть файл

@@ -34,7 +34,7 @@ mono_light(base_color = "#23395b", white_color = lighten_color(base_color,
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{base_color}{Monotone base color, works best with a strong color, defaults to #23395b}

+ 1
- 1
man/solarized_dark.Rd Просмотреть файл

@@ -29,7 +29,7 @@ solarized_dark(text_color = "#839496", header_color = "#dc322f",
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{text_color}{Text Color, defaults to #839496}

+ 1
- 1
man/solarized_light.Rd Просмотреть файл

@@ -29,7 +29,7 @@ solarized_light(text_color = "#657b83", header_color = "#dc322f",
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{text_color}{Text Color, defaults to #657b83}

+ 1
- 1
man/write_xaringan_theme.Rd Просмотреть файл

@@ -29,7 +29,7 @@ write_xaringan_theme(text_color = "#000", header_color = "#000",
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_family_fallback = "'Lucida Console', Monaco",
outfile = "xaringan-themed.css")
outfile = "xaringan-themer.css")
}
\arguments{
\item{text_color}{Text Color, defaults to #000}

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