😎 Give your xaringan slides some style
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

348 lines
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 `white_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 `black_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, secondary_color, primary_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, secondary_color, primary_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, secondary_color, primary_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
  146. #' `darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.2)`.
  147. #' Modifies the `thead, tfoot, tr:nth-child(even)` elements.
  148. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`).
  149. #' Defaults to 20px. Modifies the `html` element. The value of this variable
  150. #' is also stored as a CSS variable that can be referenced with
  151. #' `var(--base-font-size)` in any argument of a style function or in custom
  152. #' CSS.
  153. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies
  154. #' the `.remark-slide-content` class. Accepts CSS
  155. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  156. #' property values. The value of this variable is also stored as a CSS
  157. #' variable that can be referenced with `var(--text-font-size)` in any
  158. #' argument of a style function or in custom CSS.
  159. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem.
  160. #' Modifies the `.remark-slide-content h1` class. Accepts CSS
  161. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  162. #' property values. The value of this variable is also stored as a CSS
  163. #' variable that can be referenced with `var(--header-h1-font-size)` in any
  164. #' argument of a style function or in custom CSS.
  165. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem.
  166. #' Modifies the `.remark-slide-content h2` class. Accepts CSS
  167. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  168. #' property values. The value of this variable is also stored as a CSS
  169. #' variable that can be referenced with `var(--header-h2-font-size)` in any
  170. #' argument of a style function or in custom CSS.
  171. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem.
  172. #' Modifies the `.remark-slide-content h3` class. Accepts CSS
  173. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  174. #' property values. The value of this variable is also stored as a CSS
  175. #' variable that can be referenced with `var(--header-h3-font-size)` in any
  176. #' argument of a style function or in custom CSS.
  177. #' @param header_background_auto Add background under slide title automatically
  178. #' for h1 header elements. If not enabled, use `class: header_background` to
  179. #' enable. Defaults to `FALSE`.
  180. #' @param header_background_color Background Color for h1 Header with
  181. #' Background. Defaults to `header_color`. Modifies the
  182. #' `.remark-slide-content h1` class. The value of this variable is also
  183. #' stored as a CSS variable that can be referenced with
  184. #' `var(--header-background-color)` in any argument of a style function or in
  185. #' custom CSS.
  186. #' @param header_background_text_color Text Color for h1 Header with
  187. #' Background. Defaults to `background_color`. Modifies the
  188. #' `.remark-slide-content h1` class. The value of this variable is also
  189. #' stored as a CSS variable that can be referenced with
  190. #' `var(--header-background-text-color)` in any argument of a style function
  191. #' or in custom CSS.
  192. #' @param header_background_padding Padding for h1 Header with Background.
  193. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts
  194. #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)
  195. #' property values.
  196. #' @param header_background_content_padding_top Top Padding for Content in
  197. #' Slide with Header with Background. Defaults to 7rem. Modifies the
  198. #' `.remark-slide-content` class.
  199. #' @param header_background_ignore_classes Slide Classes Where Header with
  200. #' Background will not be Applied. Defaults to
  201. #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the
  202. #' `.remark-slide-content` class.
  203. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to
  204. #' 0.9em. Modifies the `.remark-slide-number` class. Accepts CSS
  205. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  206. #' property values.
  207. #' @param text_font_google Use `google_font()` to specify body font. Defaults
  208. #' to `NULL`. Modifies the `body` element.
  209. #' @param text_font_family Body Text Font Family (xaringan default is
  210. #' `'Droid Serif'`). Defaults to
  211. #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
  212. #' element. The value of this variable is also stored as a CSS variable that
  213. #' can be referenced with `var(--text-font-family)` in any argument of a
  214. #' style function or in custom CSS.
  215. #' @param text_font_weight Body Text Font Weight. Defaults to
  216. #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
  217. #' element. Accepts CSS
  218. #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
  219. #' property values.
  220. #' @param text_font_url Body Text Font URL(s). Defaults to
  221. #' `xaringanthemer_font_default("text_font_url")`. Modifies the
  222. #' `@import url()` elements.
  223. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
  224. #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
  225. #' `body` element. The value of this variable is also stored as a CSS
  226. #' variable that can be referenced with `var(--text-font-family-fallback)` in
  227. #' any argument of a style function or in custom CSS.
  228. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
  229. #' to sans-serif. Modifies the `body` element. The value of this variable is
  230. #' also stored as a CSS variable that can be referenced with
  231. #' `var(--text-font-base)` in any argument of a style function or in custom
  232. #' CSS.
  233. #' @param header_font_google Use `google_font()` to specify header font.
  234. #' Defaults to `NULL`. Modifies the `body` element.
  235. #' @param header_font_family Header Font Family (xaringan default is
  236. #' `'Yanone Kaffeesatz'`). Defaults to
  237. #' `xaringanthemer_font_default("header_font_family")`. Modifies the
  238. #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
  239. #' variable that can be referenced with `var(--header-font-family)` in any
  240. #' argument of a style function or in custom CSS.
  241. #' @param header_font_weight Header Font Weight. Defaults to
  242. #' `xaringanthemer_font_default("header_font_weight")`. Modifies the
  243. #' `h1, h2, h3` elements. Accepts CSS
  244. #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
  245. #' property values.
  246. #' @param header_font_url Header Font URL. Defaults to
  247. #' `xaringanthemer_font_default("header_font_url")`. Modifies the
  248. #' `@import url` elements.
  249. #' @param code_font_google Use `google_font()` to specify code font. Defaults
  250. #' to `NULL`. Modifies the `body` element.
  251. #' @param code_font_family Code Font Family. Defaults to
  252. #' `xaringanthemer_font_default("code_font_family")`. Modifies the
  253. #' `.remark-code, .remark-inline-code` classes. The value of this variable is
  254. #' also stored as a CSS variable that can be referenced with
  255. #' `var(--code-font-family)` in any argument of a style function or in custom
  256. #' CSS.
  257. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
  258. #' `.remark-inline` class. Accepts CSS
  259. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  260. #' property values. The value of this variable is also stored as a CSS
  261. #' variable that can be referenced with `var(--code-font-size)` in any
  262. #' argument of a style function or in custom CSS.
  263. #' @param code_font_url Code Font URL. Defaults to
  264. #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
  265. #' elements.
  266. #' @param code_font_family_fallback Code Font Fallback. Defaults to
  267. #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
  268. #' `.remark-code, .remark-inline-code` classes.
  269. #' @template theme_params
  270. #' @template style-usage
  271. #' @template style_duo_accent_inverse
  272. #' @family Duotone themes
  273. #' @export
  274. style_duo_accent_inverse <- function(
  275. primary_color = "#006747",
  276. secondary_color = "#CFC493",
  277. white_color = "#FFFFFF",
  278. black_color = "#000000",
  279. text_color = white_color,
  280. header_color = primary_color,
  281. background_color = black_color,
  282. link_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  283. text_bold_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  284. text_slide_number_color = primary_color,
  285. padding = "16px 64px 16px 64px",
  286. background_image = NULL,
  287. background_size = NULL,
  288. background_position = NULL,
  289. code_highlight_color = "rgba(255,255,0,0.5)",
  290. code_inline_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  291. code_inline_background_color = NULL,
  292. code_inline_font_size = "1em",
  293. inverse_background_color = secondary_color,
  294. inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color),
  295. inverse_text_shadow = FALSE,
  296. inverse_header_color = choose_dark_or_light(secondary_color, black_color, white_color),
  297. title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color),
  298. title_slide_background_color = primary_color,
  299. title_slide_background_image = NULL,
  300. title_slide_background_size = NULL,
  301. title_slide_background_position = NULL,
  302. footnote_color = NULL,
  303. footnote_font_size = "0.9em",
  304. footnote_position_bottom = "60px",
  305. left_column_subtle_color = apply_alpha(primary_color, 0.6),
  306. left_column_selected_color = primary_color,
  307. blockquote_left_border_color = apply_alpha(secondary_color, 0.5),
  308. table_border_color = "#666",
  309. table_row_border_color = "#ddd",
  310. table_row_even_background_color = darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.2),
  311. base_font_size = "20px",
  312. text_font_size = "1rem",
  313. header_h1_font_size = "2.75rem",
  314. header_h2_font_size = "2.25rem",
  315. header_h3_font_size = "1.75rem",
  316. header_background_auto = FALSE,
  317. header_background_color = header_color,
  318. header_background_text_color = background_color,
  319. header_background_padding = NULL,
  320. header_background_content_padding_top = "7rem",
  321. header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
  322. text_slide_number_font_size = "0.9em",
  323. text_font_google = NULL,
  324. text_font_family = xaringanthemer_font_default("text_font_family"),
  325. text_font_weight = xaringanthemer_font_default("text_font_weight"),
  326. text_font_url = xaringanthemer_font_default("text_font_url"),
  327. text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
  328. text_font_base = "sans-serif",
  329. header_font_google = NULL,
  330. header_font_family = xaringanthemer_font_default("header_font_family"),
  331. header_font_weight = xaringanthemer_font_default("header_font_weight"),
  332. header_font_url = xaringanthemer_font_default("header_font_url"),
  333. code_font_google = NULL,
  334. code_font_family = xaringanthemer_font_default("code_font_family"),
  335. code_font_size = "0.9rem",
  336. code_font_url = xaringanthemer_font_default("code_font_url"),
  337. code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
  338. colors = NULL,
  339. extra_css = NULL,
  340. extra_fonts = NULL,
  341. outfile = "xaringan-themer.css"
  342. ) {
  343. # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
  344. colors <- c(primary = primary_color, secondary = secondary_color, white = white_color, black = black_color, colors)
  345. eval(parse(text = call_style_xaringan()))
  346. }