😎 Give your xaringan slides some style
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

343 líneas
20KB

  1. # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand
  2. #' @param primary_color Duotone Primary Color. Defaults to #006747. Used in
  3. #' multiple CSS rules. The value of this variable is also stored as a CSS
  4. #' variable that can be referenced with `var(--primary)` in any argument of a
  5. #' style function or in custom CSS.
  6. #' @param secondary_color Duotone Secondary Color. Defaults to #CFC493. Used in
  7. #' multiple CSS rules. The value of this variable is also stored as a CSS
  8. #' variable that can be referenced with `var(--secondary)` in any argument of
  9. #' a style function or in custom CSS.
  10. #' @param white_color Brightest color used. Defaults to #FFFFFF. Used in
  11. #' multiple CSS rules. The value of this variable is also stored as a CSS
  12. #' variable that can be referenced with `var(--white)` in any argument of a
  13. #' style function or in custom CSS.
  14. #' @param black_color Darkest color used. Defaults to #000000. Used in multiple
  15. #' CSS rules. The value of this variable is also stored as a CSS variable
  16. #' that can be referenced with `var(--black)` in any argument of a style
  17. #' function or in custom CSS.
  18. #' @param text_color Text Color. Defaults to `black_color`. Modifies the `body`
  19. #' element. The value of this variable is also stored as a CSS variable that
  20. #' can be referenced with `var(--text_color)` in any argument of a style
  21. #' function or in custom CSS.
  22. #' @param header_color Header Color. Defaults to `primary_color`. Modifies the
  23. #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
  24. #' variable that can be referenced with `var(--header-color)` in any argument
  25. #' of a style function or in custom CSS.
  26. #' @param background_color Slide Background Color. Defaults to `white_color`.
  27. #' Modifies the `.remark-slide-content` class. The value of this variable is
  28. #' also stored as a CSS variable that can be referenced with
  29. #' `var(--background-color)` in any argument of a style function or in custom
  30. #' CSS.
  31. #' @param link_color Link Color. Defaults to
  32. #' `choose_dark_or_light(secondary_color, primary_color, secondary_color)`.
  33. #' Modifies the `a, a > code` elements. The value of this variable is also
  34. #' stored as a CSS variable that can be referenced with `var(--link-color)`
  35. #' in any argument of a style function or in custom CSS.
  36. #' @param text_bold_color Bold Text Color. Defaults to
  37. #' `choose_dark_or_light(secondary_color, primary_color, secondary_color)`.
  38. #' Modifies the `strong` element. The value of this variable is also stored
  39. #' as a CSS variable that can be referenced with `var(--text-bold-color)` in
  40. #' any argument of a style function or in custom CSS.
  41. #' @param text_slide_number_color Slide Number Color. Defaults to
  42. #' `primary_color`. Modifies the `.remark-slide-number` class.
  43. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults
  44. #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class.
  45. #' Accepts CSS
  46. #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)
  47. #' property values.
  48. #' @param background_image Background image applied to each *and every* slide.
  49. #' Set `title_slide_background_image = "none"` to remove the background image
  50. #' from the title slide. Defaults to `NULL`. Modifies the
  51. #' `.remark-slide-content` class.
  52. #' @param background_size Background image size, requires `background_image` to
  53. #' be set. If `background_image` is set, `background_size` will default to
  54. #' `cover` so the backround fills the screen. If both `background_image` and
  55. #' `background_position` are set, will default to 100 percent. Defaults to
  56. #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS
  57. #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)
  58. #' property values.
  59. #' @param background_position Background image position, requires
  60. #' `background_image` to be set, and it is recommended to adjust
  61. #' `background_size`. Defaults to `NULL`. Modifies the
  62. #' `.remark-slide-content` class. Accepts CSS
  63. #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)
  64. #' property values.
  65. #' @param code_highlight_color Code Line Highlight. Defaults to
  66. #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class.
  67. #' The value of this variable is also stored as a CSS variable that can be
  68. #' referenced with `var(--code-highlight-color)` in any argument of a style
  69. #' function or in custom CSS.
  70. #' @param code_inline_color Inline Code Color. Defaults to
  71. #' `choose_dark_or_light(secondary_color, primary_color, secondary_color)`.
  72. #' Modifies the `.remark-inline-code` class.
  73. #' @param code_inline_background_color Inline Code Background Color. Defaults
  74. #' to `NULL`. Modifies the `.remark-inline-code` class.
  75. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em.
  76. #' Modifies the `.remark-inline-code` class. Accepts CSS
  77. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  78. #' property values. The value of this variable is also stored as a CSS
  79. #' variable that can be referenced with `var(--code-inline-font-size)` in any
  80. #' argument of a style function or in custom CSS.
  81. #' @param inverse_background_color Inverse Background Color. Defaults to
  82. #' `secondary_color`. Modifies the `.inverse` class. The value of this
  83. #' variable is also stored as a CSS variable that can be referenced with
  84. #' `var(--inverse-background-color)` in any argument of a style function or
  85. #' in custom CSS.
  86. #' @param inverse_text_color Inverse Text Color. Defaults to
  87. #' `choose_dark_or_light(secondary_color, black_color, white_color)`.
  88. #' Modifies the `.inverse` class. The value of this variable is also stored
  89. #' as a CSS variable that can be referenced with `var(--inverse-text-color)`
  90. #' in any argument of a style function or in custom CSS.
  91. #' @param inverse_text_shadow Enables Shadow on text of inverse slides.
  92. #' Defaults to `FALSE`. Modifies the `.inverse` class.
  93. #' @param inverse_header_color Inverse Header Color. Defaults to
  94. #' `choose_dark_or_light(secondary_color, black_color, white_color)`.
  95. #' Modifies the `.inverse h1, .inverse h2, .inverse h3` classes. The value of
  96. #' this variable is also stored as a CSS variable that can be referenced with
  97. #' `var(--inverse-header-color)` in any argument of a style function or in
  98. #' custom CSS.
  99. #' @param title_slide_text_color Title Slide Text Color. Defaults to
  100. #' `choose_dark_or_light(primary_color, black_color, white_color)`. Modifies
  101. #' the `.title-slide` class. The value of this variable is also stored as a
  102. #' CSS variable that can be referenced with `var(--title-slide-text-color)`
  103. #' in any argument of a style function or in custom CSS.
  104. #' @param title_slide_background_color Title Slide Background Color. Defaults
  105. #' to `primary_color`. Modifies the `.title-slide` class. The value of this
  106. #' variable is also stored as a CSS variable that can be referenced with
  107. #' `var(--title-slide-background-color)` in any argument of a style function
  108. #' or in custom CSS.
  109. #' @param title_slide_background_image Title Slide Background Image URL.
  110. #' Defaults to `NULL`. Modifies the `.title-slide` class.
  111. #' @param title_slide_background_size Title Slide Background Image Size,
  112. #' defaults to "cover" if background image is set. Defaults to `NULL`.
  113. #' Modifies the `.title-slide` class. Accepts CSS
  114. #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)
  115. #' property values.
  116. #' @param title_slide_background_position Title Slide Background Image
  117. #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts
  118. #' CSS
  119. #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)
  120. #' property values.
  121. #' @param footnote_color Footnote text color (if `NA`, then it will be the same
  122. #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote`
  123. #' class.
  124. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies
  125. #' the `.footnote` class. Accepts CSS
  126. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  127. #' property values.
  128. #' @param footnote_position_bottom Footnote location from bottom of screen.
  129. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS
  130. #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value)
  131. #' property values.
  132. #' @param left_column_subtle_color Left Column Text (not last). Defaults to
  133. #' `apply_alpha(primary_color, 0.6)`. Modifies the
  134. #' `.left-column h2, .left-column h3` classes.
  135. #' @param left_column_selected_color Left Column Current Selection. Defaults to
  136. #' `primary_color`. Modifies the
  137. #' `.left-column h2:last-of-type, .left-column h3:last-child` classes.
  138. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults
  139. #' to `apply_alpha(secondary_color, 0.5)`. Modifies the `blockquote` element.
  140. #' @param table_border_color Table top/bottom border. Defaults to #666.
  141. #' Modifies the `table: border-top, border-bottom` elements.
  142. #' @param table_row_border_color Table row inner bottom border. Defaults to
  143. #' #ddd. Modifies the `table thead th: border-bottom` elements.
  144. #' @param table_row_even_background_color Table Even Row Background Color.
  145. #' Defaults to `lighten_color(secondary_color, 0.8)`. Modifies the
  146. #' `thead, tfoot, tr:nth-child(even)` elements.
  147. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`).
  148. #' Defaults to 20px. Modifies the `html` element. The value of this variable
  149. #' is also stored as a CSS variable that can be referenced with
  150. #' `var(--base-font-size)` in any argument of a style function or in custom
  151. #' CSS.
  152. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies
  153. #' the `.remark-slide-content` class. Accepts CSS
  154. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  155. #' property values. The value of this variable is also stored as a CSS
  156. #' variable that can be referenced with `var(--text-font-size)` in any
  157. #' argument of a style function or in custom CSS.
  158. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem.
  159. #' Modifies the `.remark-slide-content h1` class. Accepts CSS
  160. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  161. #' property values. The value of this variable is also stored as a CSS
  162. #' variable that can be referenced with `var(--header-h1-font-size)` in any
  163. #' argument of a style function or in custom CSS.
  164. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem.
  165. #' Modifies the `.remark-slide-content h2` class. Accepts CSS
  166. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  167. #' property values. The value of this variable is also stored as a CSS
  168. #' variable that can be referenced with `var(--header-h2-font-size)` in any
  169. #' argument of a style function or in custom CSS.
  170. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem.
  171. #' Modifies the `.remark-slide-content h3` class. Accepts CSS
  172. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  173. #' property values. The value of this variable is also stored as a CSS
  174. #' variable that can be referenced with `var(--header-h3-font-size)` in any
  175. #' argument of a style function or in custom CSS.
  176. #' @param header_background_auto Add background under slide title automatically
  177. #' for h1 header elements. If not enabled, use `class: header_background` to
  178. #' enable. Defaults to `FALSE`.
  179. #' @param header_background_color Background Color for h1 Header with
  180. #' Background. Defaults to `header_color`. Modifies the
  181. #' `.remark-slide-content h1` class. The value of this variable is also
  182. #' stored as a CSS variable that can be referenced with
  183. #' `var(--header-background-color)` in any argument of a style function or in
  184. #' custom CSS.
  185. #' @param header_background_text_color Text Color for h1 Header with
  186. #' Background. Defaults to `background_color`. Modifies the
  187. #' `.remark-slide-content h1` class. The value of this variable is also
  188. #' stored as a CSS variable that can be referenced with
  189. #' `var(--header-background-text-color)` in any argument of a style function
  190. #' or in custom CSS.
  191. #' @param header_background_padding Padding for h1 Header with Background.
  192. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts
  193. #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)
  194. #' property values.
  195. #' @param header_background_content_padding_top Top Padding for Content in
  196. #' Slide with Header with Background. Defaults to 7rem. Modifies the
  197. #' `.remark-slide-content` class.
  198. #' @param header_background_ignore_classes Slide Classes Where Header with
  199. #' Background will not be Applied. Defaults to
  200. #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the
  201. #' `.remark-slide-content` class.
  202. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to
  203. #' 0.9em. Modifies the `.remark-slide-number` class. Accepts CSS
  204. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  205. #' property values.
  206. #' @param text_font_google Use `google_font()` to specify body font. Defaults
  207. #' to `NULL`. Modifies the `body` element.
  208. #' @param text_font_family Body Text Font Family (xaringan default is
  209. #' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
  210. #' value of this variable is also stored as a CSS variable that can be
  211. #' referenced with `var(--text-font-family)` in any argument of a style
  212. #' function or in custom CSS.
  213. #' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
  214. #' the `body` element. Accepts CSS
  215. #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
  216. #' property values.
  217. #' @param text_font_url Body Text Font URL(s). Defaults to
  218. #' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
  219. #' Modifies the `@import url()` elements.
  220. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
  221. #' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
  222. #' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
  223. #' element. The value of this variable is also stored as a CSS variable that
  224. #' can be referenced with `var(--text-font-family-fallback)` in any argument
  225. #' of a style function or in custom CSS.
  226. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
  227. #' to sans-serif. Modifies the `body` element. The value of this variable is
  228. #' also stored as a CSS variable that can be referenced with
  229. #' `var(--text-font-base)` in any argument of a style function or in custom
  230. #' CSS.
  231. #' @param header_font_google Use `google_font()` to specify header font.
  232. #' Defaults to `NULL`. Modifies the `body` element.
  233. #' @param header_font_family Header Font Family (xaringan default is
  234. #' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
  235. #' elements. The value of this variable is also stored as a CSS variable that
  236. #' can be referenced with `var(--header-font-family)` in any argument of a
  237. #' style function or in custom CSS.
  238. #' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
  239. #' `h1, h2, h3` elements. Accepts CSS
  240. #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
  241. #' property values.
  242. #' @param header_font_url Header Font URL. Defaults to
  243. #' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
  244. #' Modifies the `@import url` elements.
  245. #' @param code_font_google Use `google_font()` to specify code font. Defaults
  246. #' to `NULL`. Modifies the `body` element.
  247. #' @param code_font_family Code Font Family. Defaults to Source Code Pro.
  248. #' Modifies the `.remark-code, .remark-inline-code` classes. The value of
  249. #' this variable is also stored as a CSS variable that can be referenced with
  250. #' `var(--code-font-family)` in any argument of a style function or in custom
  251. #' CSS.
  252. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
  253. #' `.remark-inline` class. Accepts CSS
  254. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  255. #' property values. The value of this variable is also stored as a CSS
  256. #' variable that can be referenced with `var(--code-font-size)` in any
  257. #' argument of a style function or in custom CSS.
  258. #' @param code_font_url Code Font URL. Defaults to
  259. #' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
  260. #' Modifies the `@import url` elements.
  261. #' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
  262. #' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
  263. #' `.remark-code, .remark-inline-code` classes.
  264. #' @template theme_params
  265. #' @template style-usage
  266. #' @template style_duo_accent
  267. #' @family Duotone themes
  268. #' @export
  269. style_duo_accent <- function(
  270. primary_color = "#006747",
  271. secondary_color = "#CFC493",
  272. white_color = "#FFFFFF",
  273. black_color = "#000000",
  274. text_color = black_color,
  275. header_color = primary_color,
  276. background_color = white_color,
  277. link_color = choose_dark_or_light(secondary_color, primary_color, secondary_color),
  278. text_bold_color = choose_dark_or_light(secondary_color, primary_color, secondary_color),
  279. text_slide_number_color = primary_color,
  280. padding = "16px 64px 16px 64px",
  281. background_image = NULL,
  282. background_size = NULL,
  283. background_position = NULL,
  284. code_highlight_color = "rgba(255,255,0,0.5)",
  285. code_inline_color = choose_dark_or_light(secondary_color, primary_color, secondary_color),
  286. code_inline_background_color = NULL,
  287. code_inline_font_size = "1em",
  288. inverse_background_color = secondary_color,
  289. inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color),
  290. inverse_text_shadow = FALSE,
  291. inverse_header_color = choose_dark_or_light(secondary_color, black_color, white_color),
  292. title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color),
  293. title_slide_background_color = primary_color,
  294. title_slide_background_image = NULL,
  295. title_slide_background_size = NULL,
  296. title_slide_background_position = NULL,
  297. footnote_color = NULL,
  298. footnote_font_size = "0.9em",
  299. footnote_position_bottom = "60px",
  300. left_column_subtle_color = apply_alpha(primary_color, 0.6),
  301. left_column_selected_color = primary_color,
  302. blockquote_left_border_color = apply_alpha(secondary_color, 0.5),
  303. table_border_color = "#666",
  304. table_row_border_color = "#ddd",
  305. table_row_even_background_color = lighten_color(secondary_color, 0.8),
  306. base_font_size = "20px",
  307. text_font_size = "1rem",
  308. header_h1_font_size = "2.75rem",
  309. header_h2_font_size = "2.25rem",
  310. header_h3_font_size = "1.75rem",
  311. header_background_auto = FALSE,
  312. header_background_color = header_color,
  313. header_background_text_color = background_color,
  314. header_background_padding = NULL,
  315. header_background_content_padding_top = "7rem",
  316. header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
  317. text_slide_number_font_size = "0.9em",
  318. text_font_google = NULL,
  319. text_font_family = "Noto Sans",
  320. text_font_weight = "normal",
  321. text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
  322. text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
  323. text_font_base = "sans-serif",
  324. header_font_google = NULL,
  325. header_font_family = "Cabin",
  326. header_font_weight = "600",
  327. header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
  328. code_font_google = NULL,
  329. code_font_family = "Source Code Pro",
  330. code_font_size = "0.9rem",
  331. code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
  332. code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
  333. colors = NULL,
  334. extra_css = NULL,
  335. extra_fonts = NULL,
  336. outfile = "xaringan-themer.css"
  337. ) {
  338. # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
  339. colors <- c(primary = primary_color, secondary = secondary_color, white = white_color, black = black_color, colors)
  340. eval(parse(text = call_style_xaringan()))
  341. }