😎 Give your xaringan slides some style
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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