😎 Give your xaringan slides some style
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

62 lines
2.0KB

  1. ---
  2. title: "Template Variables"
  3. output:
  4. rmarkdown::html_vignette: default
  5. vignette: >
  6. %\VignetteIndexEntry{Template Variables}
  7. %\VignetteEncoding{UTF-8}
  8. %\VignetteEngine{knitr::rmarkdown}
  9. ---
  10. ```{r setup, include = FALSE}
  11. knitr::opts_chunk$set(
  12. collapse = TRUE,
  13. comment = "#>"
  14. )
  15. ```
  16. The following table shows the template variables,
  17. their default values in the standard `xaringanthemer` theme,
  18. the primary element to which the property is applied,
  19. and a brief description of the template variable.
  20. For example, `background_color` by default sets the `background-color` CSS property of the `.remark-slide-content` class to `#FFF`.
  21. Use this table to find the template variable you would like to modify.
  22. You can also use this table to find the CSS class or element associated with a particular template item.
  23. Note that some theme functions,
  24. like `style_mono_accent()`,
  25. have additional parameters
  26. and a specific set of default values unique to the theme.
  27. However, with any theme function
  28. you can override the theme's defaults
  29. by directly setting any of the arguments listed below
  30. when calling the theme function.
  31. To be concrete,
  32. `style_mono_accent()` has three additional arguments:
  33. `base_color` (the accent color), `white_color`, and `black_color`.
  34. In this theme,
  35. the background slide color defaults to `white_color`,
  36. but you can choose a different slide background color
  37. by setting `background_color`,
  38. for example `background_color = "#EAEAEA"`.
  39. ```{r table, results = "asis", echo=FALSE}
  40. tv <- xaringanthemer:::template_variables
  41. tv$variable <- glue::glue_data(tv, "`{variable}`")
  42. tv[!is.na(tv$css_variable), "css_variable"] <- glue::glue("`{tv$css_variable[!is.na(tv$css_variable)]}`")
  43. tv[is.na(tv$css_variable), "css_variable"] <- ""
  44. tv[is.na(tv$css_property), "css_property"] <- ""
  45. tv$default <- gsub("[{}]", "", tv$default)
  46. tv <- tv[, c(
  47. "variable", "description", "element", "css_property", "default", "css_variable"
  48. )]
  49. knitr::kable(
  50. tv,
  51. col.names = c("Variable", "Description", "Element", "CSS Property", "Default", "CSS Variable")
  52. )
  53. ```