😎 Give your xaringan slides some style
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

38 lines
1.5KB

  1. ---
  2. title: "Template Variables"
  3. author: "Garrick Aden-Buie"
  4. date: "2018-05-08"
  5. output:
  6. rmarkdown::html_vignette: default
  7. vignette: >
  8. %\VignetteIndexEntry{Template Variables}
  9. %\VignetteEncoding{UTF-8}
  10. %\VignetteEngine{knitr::rmarkdown}
  11. ---
  12. ```{r setup, include = FALSE}
  13. knitr::opts_chunk$set(
  14. collapse = TRUE,
  15. comment = "#>"
  16. )
  17. ```
  18. The following table shows the template variables, their default values in the standard `xaringan` theme, the primary element to which the property is applied, and a brief description of the template variable.
  19. For example, `background_color` by default sets the `background-color` CSS property of the `.remark-slide-content` class to `#FFF`.
  20. Use this table to find the template variable you would like to modify.
  21. You can also use this table to find the CSS class or element associated with a particular template item.
  22. Note that themes, like `mono_accent()`, have additional parameters, but with any theme function you can override the theme by directly setting the arguments below when calling the theme function.
  23. For example, to use `mono_accent()` with a different slide background color, you can call `mono_accent(background_color = "#abc123")`.
  24. ```{r table, results = "asis", echo=FALSE}
  25. source("../R/theme_settings.R")
  26. template_variables$variable <- glue::glue_data(template_variables, "`{variable}`")
  27. template_variables$default <- gsub("[{}]", "", template_variables$default)
  28. template_variables$default <- glue::glue_data(template_variables, "`{default}`")
  29. knitr::kable(template_variables)
  30. ```