😎 Give your xaringan slides some style
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

236 lines
13KB

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