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

293 lines
17KB

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