😎 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.

333 lines
19KB

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