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

370 lines
21KB

  1. # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand
  2. #' @param primary_color Duotone Primary Color. Defaults to #035AA6. 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 #03A696. 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 background 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. #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3`
  95. #' classes. The value of this variable is also stored as a CSS variable that
  96. #' can be referenced with `var(--inverse-header-color)` in any argument of a
  97. #' style function or in custom CSS.
  98. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`.
  99. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this
  100. #' variable is also stored as a CSS variable that can be referenced with
  101. #' `var(--inverse-link-color)` in any argument of a style function or in
  102. #' custom CSS.
  103. #' @param title_slide_text_color Title Slide Text Color. Defaults to
  104. #' `choose_dark_or_light(primary_color, black_color, white_color)`. Modifies
  105. #' the `.title-slide` class. The value of this variable is also stored as a
  106. #' CSS variable that can be referenced with `var(--title-slide-text-color)`
  107. #' in any argument of a style function or in custom CSS.
  108. #' @param title_slide_background_color Title Slide Background Color. Defaults
  109. #' to `primary_color`. Modifies the `.title-slide` class. The value of this
  110. #' variable is also stored as a CSS variable that can be referenced with
  111. #' `var(--title-slide-background-color)` in any argument of a style function
  112. #' or in custom CSS.
  113. #' @param title_slide_background_image Title Slide Background Image URL.
  114. #' Defaults to `NULL`. Modifies the `.title-slide` class.
  115. #' @param title_slide_background_size Title Slide Background Image Size,
  116. #' defaults to "cover" if background image is set. Defaults to `NULL`.
  117. #' Modifies the `.title-slide` class. Accepts CSS
  118. #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)
  119. #' property values.
  120. #' @param title_slide_background_position Title Slide Background Image
  121. #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts
  122. #' CSS
  123. #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)
  124. #' property values.
  125. #' @param footnote_color Footnote text color (if `NA`, then it will be the same
  126. #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote`
  127. #' class.
  128. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies
  129. #' the `.footnote` class. Accepts CSS
  130. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  131. #' property values.
  132. #' @param footnote_position_bottom Footnote location from bottom of screen.
  133. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS
  134. #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value)
  135. #' property values.
  136. #' @param left_column_subtle_color Left Column Text (not last). Defaults to
  137. #' `apply_alpha(primary_color, 0.6)`. Modifies the
  138. #' `.left-column h2, .left-column h3` classes.
  139. #' @param left_column_selected_color Left Column Current Selection. Defaults to
  140. #' `primary_color`. Modifies the
  141. #' `.left-column h2:last-of-type, .left-column h3:last-child` classes.
  142. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults
  143. #' to `apply_alpha(secondary_color, 0.5)`. Modifies the `blockquote` element.
  144. #' @param table_border_color Table top/bottom border. Defaults to #666.
  145. #' Modifies the `table: border-top, border-bottom` elements.
  146. #' @param table_row_border_color Table row inner bottom border. Defaults to
  147. #' #ddd. Modifies the `table thead th: border-bottom` elements.
  148. #' @param table_row_even_background_color Table Even Row Background Color.
  149. #' Defaults to `lighten_color(secondary_color, 0.8)`. Modifies the
  150. #' `thead, tfoot, tr:nth-child(even)` elements.
  151. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`).
  152. #' Defaults to 20px. Modifies the `html` element. The value of this variable
  153. #' is also stored as a CSS variable that can be referenced with
  154. #' `var(--base-font-size)` in any argument of a style function or in custom
  155. #' CSS.
  156. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies
  157. #' the `.remark-slide-content` class. Accepts CSS
  158. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  159. #' property values. The value of this variable is also stored as a CSS
  160. #' variable that can be referenced with `var(--text-font-size)` in any
  161. #' argument of a style function or in custom CSS.
  162. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem.
  163. #' Modifies the `.remark-slide-content h1` class. Accepts CSS
  164. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  165. #' property values. The value of this variable is also stored as a CSS
  166. #' variable that can be referenced with `var(--header-h1-font-size)` in any
  167. #' argument of a style function or in custom CSS.
  168. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem.
  169. #' Modifies the `.remark-slide-content h2` class. Accepts CSS
  170. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  171. #' property values. The value of this variable is also stored as a CSS
  172. #' variable that can be referenced with `var(--header-h2-font-size)` in any
  173. #' argument of a style function or in custom CSS.
  174. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem.
  175. #' Modifies the `.remark-slide-content h3` class. Accepts CSS
  176. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  177. #' property values. The value of this variable is also stored as a CSS
  178. #' variable that can be referenced with `var(--header-h3-font-size)` in any
  179. #' argument of a style function or in custom CSS.
  180. #' @param header_background_auto Add background under slide title automatically
  181. #' for h1 header elements. If not enabled, use `class: header_background` to
  182. #' enable. Defaults to `FALSE`.
  183. #' @param header_background_color Background Color for h1 Header with
  184. #' Background. Defaults to `header_color`. Modifies the
  185. #' `.remark-slide-content h1` class. The value of this variable is also
  186. #' stored as a CSS variable that can be referenced with
  187. #' `var(--header-background-color)` in any argument of a style function or in
  188. #' custom CSS.
  189. #' @param header_background_text_color Text Color for h1 Header with
  190. #' Background. Defaults to `background_color`. Modifies the
  191. #' `.remark-slide-content h1` class. The value of this variable is also
  192. #' stored as a CSS variable that can be referenced with
  193. #' `var(--header-background-text-color)` in any argument of a style function
  194. #' or in custom CSS.
  195. #' @param header_background_padding Padding for h1 Header with Background.
  196. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts
  197. #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)
  198. #' property values.
  199. #' @param header_background_content_padding_top Top Padding for Content in
  200. #' Slide with Header with Background. Defaults to 7rem. Modifies the
  201. #' `.remark-slide-content` class.
  202. #' @param header_background_ignore_classes Slide Classes Where Header with
  203. #' Background will not be Applied. Defaults to
  204. #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the
  205. #' `.remark-slide-content` class.
  206. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to
  207. #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS
  208. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  209. #' property values.
  210. #' @param text_font_google Use `google_font()` to specify body font. Defaults
  211. #' to `NULL`. Modifies the `body` element.
  212. #' @param text_font_family Body Text Font Family (xaringan default is
  213. #' `'Droid Serif'`). Defaults to
  214. #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
  215. #' element. The value of this variable is also stored as a CSS variable that
  216. #' can be referenced with `var(--text-font-family)` in any argument of a
  217. #' style function or in custom CSS.
  218. #' @param text_font_weight Body Text Font Weight. Defaults to
  219. #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
  220. #' element. Accepts CSS
  221. #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
  222. #' property values.
  223. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold.
  224. #' Modifies the `strong` element.
  225. #' @param text_font_url Body Text Font URL(s). Defaults to
  226. #' `xaringanthemer_font_default("text_font_url")`. Modifies the
  227. #' `@import url()` elements.
  228. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
  229. #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
  230. #' `body` element. The value of this variable is also stored as a CSS
  231. #' variable that can be referenced with `var(--text-font-family-fallback)` in
  232. #' any argument of a style function or in custom CSS.
  233. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
  234. #' to sans-serif. Modifies the `body` element. The value of this variable is
  235. #' also stored as a CSS variable that can be referenced with
  236. #' `var(--text-font-base)` in any argument of a style function or in custom
  237. #' CSS.
  238. #' @param header_font_google Use `google_font()` to specify header font.
  239. #' Defaults to `NULL`. Modifies the `body` element.
  240. #' @param header_font_family Header Font Family (xaringan default is
  241. #' `'Yanone Kaffeesatz'`). Defaults to
  242. #' `xaringanthemer_font_default("header_font_family")`. Modifies the
  243. #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
  244. #' variable that can be referenced with `var(--header-font-family)` in any
  245. #' argument of a style function or in custom CSS.
  246. #' @param header_font_weight Header Font Weight. Defaults to
  247. #' `xaringanthemer_font_default("header_font_weight")`. Modifies the
  248. #' `h1, h2, h3` elements. Accepts CSS
  249. #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
  250. #' property values.
  251. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to
  252. #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this
  253. #' variable is also stored as a CSS variable that can be referenced with
  254. #' `var(--header-font-family-fallback)` in any argument of a style function
  255. #' or in custom CSS.
  256. #' @param header_font_url Header Font URL. Defaults to
  257. #' `xaringanthemer_font_default("header_font_url")`. Modifies the
  258. #' `@import url` elements.
  259. #' @param code_font_google Use `google_font()` to specify code font. Defaults
  260. #' to `NULL`. Modifies the `body` element.
  261. #' @param code_font_family Code Font Family. Defaults to
  262. #' `xaringanthemer_font_default("code_font_family")`. Modifies the
  263. #' `.remark-code, .remark-inline-code` classes. The value of this variable is
  264. #' also stored as a CSS variable that can be referenced with
  265. #' `var(--code-font-family)` in any argument of a style function or in custom
  266. #' CSS.
  267. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
  268. #' `.remark-inline` class. Accepts CSS
  269. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  270. #' property values. The value of this variable is also stored as a CSS
  271. #' variable that can be referenced with `var(--code-font-size)` in any
  272. #' argument of a style function or in custom CSS.
  273. #' @param code_font_url Code Font URL. Defaults to
  274. #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
  275. #' elements.
  276. #' @param code_font_family_fallback Code Font Fallback. Defaults to
  277. #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
  278. #' `.remark-code, .remark-inline-code` classes.
  279. #' @param link_decoration Text decoration of links. Defaults to none. Modifies
  280. #' the `a, a > code` elements. Accepts CSS
  281. #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration)
  282. #' property values.
  283. #' @template theme_params
  284. #' @template style-usage
  285. #' @template style_duo_accent
  286. #' @family Duotone themes
  287. #' @export
  288. style_duo_accent <- function(
  289. primary_color = "#035AA6",
  290. secondary_color = "#03A696",
  291. white_color = "#FFFFFF",
  292. black_color = "#000000",
  293. text_color = black_color,
  294. header_color = primary_color,
  295. background_color = white_color,
  296. link_color = choose_dark_or_light(secondary_color, primary_color, secondary_color),
  297. text_bold_color = choose_dark_or_light(secondary_color, primary_color, secondary_color),
  298. text_slide_number_color = primary_color,
  299. padding = "16px 64px 16px 64px",
  300. background_image = NULL,
  301. background_size = NULL,
  302. background_position = NULL,
  303. code_highlight_color = "rgba(255,255,0,0.5)",
  304. code_inline_color = choose_dark_or_light(secondary_color, primary_color, secondary_color),
  305. code_inline_background_color = NULL,
  306. code_inline_font_size = "1em",
  307. inverse_background_color = secondary_color,
  308. inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color),
  309. inverse_text_shadow = FALSE,
  310. inverse_header_color = inverse_text_color,
  311. inverse_link_color = link_color,
  312. title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color),
  313. title_slide_background_color = primary_color,
  314. title_slide_background_image = NULL,
  315. title_slide_background_size = NULL,
  316. title_slide_background_position = NULL,
  317. footnote_color = NULL,
  318. footnote_font_size = "0.9em",
  319. footnote_position_bottom = "60px",
  320. left_column_subtle_color = apply_alpha(primary_color, 0.6),
  321. left_column_selected_color = primary_color,
  322. blockquote_left_border_color = apply_alpha(secondary_color, 0.5),
  323. table_border_color = "#666",
  324. table_row_border_color = "#ddd",
  325. table_row_even_background_color = lighten_color(secondary_color, 0.8),
  326. base_font_size = "20px",
  327. text_font_size = "1rem",
  328. header_h1_font_size = "2.75rem",
  329. header_h2_font_size = "2.25rem",
  330. header_h3_font_size = "1.75rem",
  331. header_background_auto = FALSE,
  332. header_background_color = header_color,
  333. header_background_text_color = background_color,
  334. header_background_padding = NULL,
  335. header_background_content_padding_top = "7rem",
  336. header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
  337. text_slide_number_font_size = "0.9rem",
  338. text_font_google = NULL,
  339. text_font_family = xaringanthemer_font_default("text_font_family"),
  340. text_font_weight = xaringanthemer_font_default("text_font_weight"),
  341. text_bold_font_weight = "bold",
  342. text_font_url = xaringanthemer_font_default("text_font_url"),
  343. text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
  344. text_font_base = "sans-serif",
  345. header_font_google = NULL,
  346. header_font_family = xaringanthemer_font_default("header_font_family"),
  347. header_font_weight = xaringanthemer_font_default("header_font_weight"),
  348. header_font_family_fallback = "Georgia, serif",
  349. header_font_url = xaringanthemer_font_default("header_font_url"),
  350. code_font_google = NULL,
  351. code_font_family = xaringanthemer_font_default("code_font_family"),
  352. code_font_size = "0.9rem",
  353. code_font_url = xaringanthemer_font_default("code_font_url"),
  354. code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
  355. link_decoration = "none",
  356. colors = NULL,
  357. extra_css = NULL,
  358. extra_fonts = NULL,
  359. outfile = "xaringan-themer.css"
  360. ) {
  361. # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
  362. primary_color <- unname(primary_color)
  363. secondary_color <- unname(secondary_color)
  364. white_color <- unname(white_color)
  365. black_color <- unname(black_color)
  366. colors <- c(primary = primary_color, secondary = secondary_color, white = white_color, black = black_color, colors)
  367. eval(parse(text = call_style_xaringan()))
  368. }