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

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