Преглед изворни кода

Change header_background_enable to header_background_auto for #10

tags/v0.3.0
Garrick Aden-Buie пре 7 година
родитељ
комит
e7a1bfb206
36 измењених фајлова са 241 додато и 81 уклоњено
  1. +2
    -2
      R/duo.R
  2. +2
    -2
      R/duo_accent.R
  3. +2
    -2
      R/duo_accent_inverse.R
  4. +2
    -2
      R/mono_accent.R
  5. +2
    -2
      R/mono_accent_inverse.R
  6. +2
    -2
      R/mono_dark.R
  7. +2
    -2
      R/mono_light.R
  8. +2
    -2
      R/solarized_dark.R
  9. +2
    -2
      R/solarized_light.R
  10. +2
    -1
      R/theme_settings.R
  11. +18
    -19
      R/write_theme.R
  12. +4
    -2
      inst/resources/template.css
  13. +16
    -17
      inst/scripts/write_xaringan_theme_body.R
  14. +2
    -2
      man/duo.Rd
  15. +2
    -2
      man/duo_accent.Rd
  16. +2
    -2
      man/duo_accent_inverse.Rd
  17. +2
    -2
      man/mono_accent.Rd
  18. +2
    -2
      man/mono_accent_inverse.Rd
  19. +2
    -2
      man/mono_dark.Rd
  20. +2
    -2
      man/mono_light.Rd
  21. +2
    -2
      man/solarized_dark.Rd
  22. +2
    -2
      man/solarized_light.Rd
  23. +2
    -2
      man/write_xaringan_theme.Rd
  24. +2
    -0
      tests/testthat/css/duo-header_bg.css
  25. +17
    -0
      tests/testthat/css/duo.css
  26. +17
    -0
      tests/testthat/css/duo_accent.css
  27. +17
    -0
      tests/testthat/css/duo_accent_inverse.css
  28. +17
    -0
      tests/testthat/css/mono_accent.css
  29. +17
    -0
      tests/testthat/css/mono_accent_inverse.css
  30. +17
    -0
      tests/testthat/css/mono_dark.css
  31. +2
    -0
      tests/testthat/css/mono_light-header_bg.css
  32. +17
    -0
      tests/testthat/css/mono_light.css
  33. +2
    -0
      tests/testthat/css/solarized_dark-header_bg.css
  34. +17
    -0
      tests/testthat/css/solarized_dark.css
  35. +17
    -0
      tests/testthat/css/solarized_light.css
  36. +4
    -4
      tests/testthat/test-themes.R

+ 2
- 2
R/duo.R Прегледај датотеку

@@ -36,7 +36,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -103,7 +103,7 @@ duo <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 2
R/duo_accent.R Прегледај датотеку

@@ -38,7 +38,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -107,7 +107,7 @@ duo_accent <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 2
R/duo_accent_inverse.R Прегледај датотеку

@@ -38,7 +38,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -107,7 +107,7 @@ duo_accent_inverse <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 2
R/mono_accent.R Прегледај датотеку

@@ -37,7 +37,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -105,7 +105,7 @@ mono_accent <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 2
R/mono_accent_inverse.R Прегледај датотеку

@@ -37,7 +37,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -105,7 +105,7 @@ mono_accent_inverse <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 2
R/mono_dark.R Прегледај датотеку

@@ -37,7 +37,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -105,7 +105,7 @@ mono_dark <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 2
R/mono_light.R Прегледај датотеку

@@ -37,7 +37,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -105,7 +105,7 @@ mono_light <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 2
R/solarized_dark.R Прегледај датотеку

@@ -34,7 +34,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -99,7 +99,7 @@ solarized_dark <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 2
R/solarized_light.R Прегледај датотеку

@@ -34,7 +34,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -99,7 +99,7 @@ solarized_light <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",

+ 2
- 1
R/theme_settings.R Прегледај датотеку

@@ -36,7 +36,7 @@ template_variables <- tibble::tribble(
, "header_h1_font_size", "55px", ".remark-slide-content h1", "h1 Header Text Font Size"
, "header_h2_font_size", "45px", ".remark-slide-content h2", "h2 Header Text Font Size"
, "header_h3_font_size", "35px", ".remark-slide-content h3", "h3 Header Text Font Size"
, "header_background_enable", "{FALSE}", "", "Enable Header Background Under First h1 Slide Element"
, "header_background_auto", "{FALSE}", "", "Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable."
, "header_background_color", "{header_color}", ".remark-slide-content h1", "Background Color for h1 Header with Background"
, "header_background_text_color", "{background_color}", ".remark-slide-content h1", "Text Color for h1 Header with Background"
, "header_background_padding", "2rem 4rem 1.5rem 4rem", ".remark-slide-content h1", "Padding for h1 Header with Background"
@@ -348,3 +348,4 @@ element_description <- function(element) {
out,
glue::glue("Modifies the `{element}` {plural_element(element)}.")
)
}

+ 18
- 19
R/write_theme.R Прегледај датотеку

@@ -34,7 +34,7 @@
#' @param header_h1_font_size h1 Header Text Font Size. Defaults to 55px. Modifies the `.remark-slide-content h1` class.
#' @param header_h2_font_size h2 Header Text Font Size. Defaults to 45px. Modifies the `.remark-slide-content h2` class.
#' @param header_h3_font_size h3 Header Text Font Size. Defaults to 35px. Modifies the `.remark-slide-content h3` class.
#' @param header_background_enable Enable Header Background Under First h1 Slide Element. Defaults to `FALSE`. Modifies the `` element.
#' @param header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable.. Defaults to `FALSE`.
#' @param header_background_color Background Color for h1 Header with Background. Defaults to `header_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_text_color Text Color for h1 Header with Background. Defaults to `background_color`. Modifies the `.remark-slide-content h1` class.
#' @param header_background_padding Padding for h1 Header with Background. Defaults to 2rem 4rem 1.5rem 4rem. Modifies the `.remark-slide-content h1` class.
@@ -98,7 +98,7 @@ write_xaringan_theme <- function(
header_h1_font_size = "55px",
header_h2_font_size = "45px",
header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -177,23 +177,22 @@ write_xaringan_theme <- function(
xaringanthemer_version <- utils::packageVersion("xaringanthemer")
# prepare header background object
header_background <- if (header_background_enable) {
needs_leading_dot <- !grepl("^\\.", header_background_ignore_classes)
header_background_ignore_classes[needs_leading_dot] <- paste0(
".", header_background_ignore_classes[needs_leading_dot]
)
header_background_ignore_classes <- purrr::map(
header_background_ignore_classes,
~ list(class = .)
)
list(
background_color = header_background_color,
text_color = header_background_text_color,
padding = header_background_padding,
content_padding_top = header_background_content_padding_top,
ignore = header_background_ignore_classes
)
}
needs_leading_dot <- !grepl("^\\.", header_background_ignore_classes)
header_background_ignore_classes[needs_leading_dot] <- paste0(
".", header_background_ignore_classes[needs_leading_dot]
)
header_background_ignore_classes <- purrr::map(
header_background_ignore_classes,
~ list(class = .)
)
header_background <- list(
auto = header_background_auto,
background_color = header_background_color,
text_color = header_background_text_color,
padding = header_background_padding,
content_padding_top = header_background_content_padding_top,
ignore = header_background_ignore_classes
)
tf <- system.file("resources", "template.css", package = "xaringanthemer")
template <- readLines(tf, warn = FALSE)

+ 4
- 2
inst/resources/template.css Прегледај датотеку

@@ -179,7 +179,8 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {

{{#header_background}}
/* Slide Header Background for h1 elements */
.remark-slide-content{{#ignore}}:not({{class}}){{/ignore}} > h1 {
.remark-slide-content.header_background > h1{{#auto}},
.remark-slide-content{{#ignore}}:not({{class}}){{/ignore}} > h1{{/auto}} {
display: block;
position: absolute;
top: 0;
@@ -191,7 +192,8 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content{{#ignore}}:not({{class}}){{/ignore}} {
.remark-slide-content.header_background{{#auto}},
.remark-slide-content{{#ignore}}:not({{class}}){{/ignore}}{{/auto}} {
padding-top: {{content_padding_top}};
}


+ 16
- 17
inst/scripts/write_xaringan_theme_body.R Прегледај датотеку

@@ -51,23 +51,22 @@ table_row_even_background_color <- table_row_even_background_color %||% backgrou
xaringanthemer_version <- utils::packageVersion("xaringanthemer")

# prepare header background object
header_background <- if (header_background_enable) {
needs_leading_dot <- !grepl("^\\.", header_background_ignore_classes)
header_background_ignore_classes[needs_leading_dot] <- paste0(
".", header_background_ignore_classes[needs_leading_dot]
)
header_background_ignore_classes <- purrr::map(
header_background_ignore_classes,
~ list(class = .)
)
list(
background_color = header_background_color,
text_color = header_background_text_color,
padding = header_background_padding,
content_padding_top = header_background_content_padding_top,
ignore = header_background_ignore_classes
)
}
needs_leading_dot <- !grepl("^\\.", header_background_ignore_classes)
header_background_ignore_classes[needs_leading_dot] <- paste0(
".", header_background_ignore_classes[needs_leading_dot]
)
header_background_ignore_classes <- purrr::map(
header_background_ignore_classes,
~ list(class = .)
)
header_background <- list(
auto = header_background_auto,
background_color = header_background_color,
text_color = header_background_text_color,
padding = header_background_padding,
content_padding_top = header_background_content_padding_top,
ignore = header_background_ignore_classes
)

tf <- system.file("resources", "template.css", package = "xaringanthemer")
template <- readLines(tf, warn = FALSE)

+ 2
- 2
man/duo.Rd Прегледај датотеку

@@ -31,7 +31,7 @@ duo(primary_color = "#1F4257", secondary_color = "#F97B64",
table_row_even_background_color = lighten_color(primary_color, 0.3),
text_font_size = "20px", header_h1_font_size = "55px",
header_h2_font_size = "45px", header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -130,7 +130,7 @@ duo(primary_color = "#1F4257", secondary_color = "#F97B64",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/duo_accent.Rd Прегледај датотеку

@@ -37,7 +37,7 @@ duo_accent(primary_color = "#006747", secondary_color = "#CFC493",
table_row_even_background_color = lighten_color(secondary_color, 0.3),
text_font_size = "20px", header_h1_font_size = "55px",
header_h2_font_size = "45px", header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -140,7 +140,7 @@ duo_accent(primary_color = "#006747", secondary_color = "#CFC493",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/duo_accent_inverse.Rd Прегледај датотеку

@@ -37,7 +37,7 @@ duo_accent_inverse(primary_color = "#006747",
table_row_even_background_color = darken_color(choose_dark_or_light(primary_color,
secondary_color, primary_color), 0.3), text_font_size = "20px",
header_h1_font_size = "55px", header_h2_font_size = "45px",
header_h3_font_size = "35px", header_background_enable = FALSE,
header_h3_font_size = "35px", header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -140,7 +140,7 @@ duo_accent_inverse(primary_color = "#006747",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/mono_accent.Rd Прегледај датотеку

@@ -29,7 +29,7 @@ mono_accent(base_color = "#43418A", white_color = "#FFFFFF",
table_row_even_background_color = lighten_color(base_color, 0.7),
text_font_size = "20px", header_h1_font_size = "55px",
header_h2_font_size = "45px", header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -130,7 +130,7 @@ mono_accent(base_color = "#43418A", white_color = "#FFFFFF",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/mono_accent_inverse.Rd Прегледај датотеку

@@ -29,7 +29,7 @@ mono_accent_inverse(base_color = "#3C989E", white_color = "#FFFFFF",
table_row_even_background_color = darken_color(base_color, 0.7),
text_font_size = "20px", header_h1_font_size = "55px",
header_h2_font_size = "45px", header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -130,7 +130,7 @@ mono_accent_inverse(base_color = "#3C989E", white_color = "#FFFFFF",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/mono_dark.Rd Прегледај датотеку

@@ -30,7 +30,7 @@ mono_dark(base_color = "#cbf7ed",
table_row_even_background_color = darken_color(base_color, 0.7),
text_font_size = "20px", header_h1_font_size = "55px",
header_h2_font_size = "45px", header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -131,7 +131,7 @@ mono_dark(base_color = "#cbf7ed",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/mono_light.Rd Прегледај датотеку

@@ -30,7 +30,7 @@ mono_light(base_color = "#23395b",
table_row_even_background_color = lighten_color(base_color, 0.8),
text_font_size = "20px", header_h1_font_size = "55px",
header_h2_font_size = "45px", header_h3_font_size = "35px",
header_background_enable = FALSE,
header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -131,7 +131,7 @@ mono_light(base_color = "#23395b",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/solarized_dark.Rd Прегледај датотеку

@@ -26,7 +26,7 @@ solarized_dark(text_color = "#839496", header_color = "#dc322f",
table_border_color = "#657b83", table_row_border_color = "#657b83",
table_row_even_background_color = "#073642", text_font_size = "20px",
header_h1_font_size = "55px", header_h2_font_size = "45px",
header_h3_font_size = "35px", header_background_enable = FALSE,
header_h3_font_size = "35px", header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -121,7 +121,7 @@ solarized_dark(text_color = "#839496", header_color = "#dc322f",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/solarized_light.Rd Прегледај датотеку

@@ -26,7 +26,7 @@ solarized_light(text_color = "#657b83", header_color = "#dc322f",
table_border_color = "#839496", table_row_border_color = "#839496",
table_row_even_background_color = "#eee8d5", text_font_size = "20px",
header_h1_font_size = "55px", header_h2_font_size = "45px",
header_h3_font_size = "35px", header_background_enable = FALSE,
header_h3_font_size = "35px", header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -121,7 +121,7 @@ solarized_light(text_color = "#657b83", header_color = "#dc322f",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 2
man/write_xaringan_theme.Rd Прегледај датотеку

@@ -27,7 +27,7 @@ write_xaringan_theme(text_color = "#000", header_color = "#000",
table_border_color = "#666", table_row_border_color = "#ddd",
table_row_even_background_color = "#eee", text_font_size = "20px",
header_h1_font_size = "55px", header_h2_font_size = "45px",
header_h3_font_size = "35px", header_background_enable = FALSE,
header_h3_font_size = "35px", header_background_auto = FALSE,
header_background_color = header_color,
header_background_text_color = background_color,
header_background_padding = "2rem 4rem 1.5rem 4rem",
@@ -122,7 +122,7 @@ write_xaringan_theme(text_color = "#000", header_color = "#000",

\item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 35px. Modifies the \code{.remark-slide-content h3} class.}

\item{header_background_enable}{Enable Header Background Under First h1 Slide Element. Defaults to \code{FALSE}. Modifies the `` element.}
\item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable.. Defaults to \code{FALSE}.}

\item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \code{.remark-slide-content h1} class.}


+ 2
- 0
tests/testthat/css/duo-header_bg.css Прегледај датотеку

@@ -167,6 +167,7 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1,
.remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) > h1 {
display: block;
position: absolute;
@@ -179,6 +180,7 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background,
.remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) {
padding-top: 7rem;
}

+ 17
- 0
tests/testthat/css/duo.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #FEFDFD !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #F97B64;
color: #1F4257;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 17
- 0
tests/testthat/css/duo_accent.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #000000 !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #006747;
color: #FFFFFF;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 17
- 0
tests/testthat/css/duo_accent_inverse.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #FFFFFF !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #006747;
color: #000000;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 17
- 0
tests/testthat/css/mono_accent.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #272822 !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #43418A;
color: #FFFFFF;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 17
- 0
tests/testthat/css/mono_accent_inverse.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #FFFFFF !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #3C989E;
color: #050F0F;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 17
- 0
tests/testthat/css/mono_dark.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #F4FDFB !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #cbf7ed;
color: #1E2523;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 2
- 0
tests/testthat/css/mono_light-header_bg.css Прегледај датотеку

@@ -167,6 +167,7 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1,
.remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) > h1 {
display: block;
position: absolute;
@@ -179,6 +180,7 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background,
.remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) {
padding-top: 7rem;
}

+ 17
- 0
tests/testthat/css/mono_light.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #18273F !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #23395b;
color: #E9EBEE;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 2
- 0
tests/testthat/css/solarized_dark-header_bg.css Прегледај датотеку

@@ -167,6 +167,7 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1,
.remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) > h1 {
display: block;
position: absolute;
@@ -179,6 +180,7 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background,
.remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) {
padding-top: 7rem;
}

+ 17
- 0
tests/testthat/css/solarized_dark.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #839496 !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #dc322f;
color: #002b36;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 17
- 0
tests/testthat/css/solarized_light.css Прегледај датотеку

@@ -166,6 +166,23 @@ table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
color: #657b83 !important;
}

/* Slide Header Background for h1 elements */
.remark-slide-content.header_background > h1 {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: #dc322f;
color: #fdf6e3;
padding: 2rem 4rem 1.5rem 4rem;
margin-top: 0;
box-sizing: border-box;
}
.remark-slide-content.header_background {
padding-top: 7rem;
}

@page { margin: 0; }
@media print {
.remark-slide-scaler {

+ 4
- 4
tests/testthat/test-themes.R Прегледај датотеку

@@ -35,8 +35,8 @@ test_that("mono_light()", test_theme_file("mono_light"))
test_that("solarized_dark()", test_theme_file("solarized_dark"))
test_that("solarized_light()", test_theme_file("solarized_light"))

test_that("header_background_enable = TRUE", {
test_theme_file("duo", "duo-header_bg.css", header_background_enable = TRUE)
test_theme_file("mono_light", "mono_light-header_bg.css", header_background_enable = TRUE)
test_theme_file("solarized_dark", "solarized_dark-header_bg.css", header_background_enable = TRUE)
test_that("header_background_auto = TRUE", {
test_theme_file("duo", "duo-header_bg.css", header_background_auto = TRUE)
test_theme_file("mono_light", "mono_light-header_bg.css", header_background_auto = TRUE)
test_theme_file("solarized_dark", "solarized_dark-header_bg.css", header_background_auto = TRUE)
})

Loading…
Откажи
Сачувај