😎 Give your xaringan slides some style
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

226 行
12KB

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