😎 Give your xaringan slides some style
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

355 rindas
20KB

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