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

333 lines
14KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/style_duo.R
  3. \name{style_duo}
  4. \alias{style_duo}
  5. \title{Duotone Theme}
  6. \usage{
  7. style_duo(
  8. primary_color = "#1F4257",
  9. secondary_color = "#F97B64",
  10. text_color = choose_dark_or_light(primary_color, darken_color(primary_color, 0.9),
  11. lighten_color(secondary_color, 0.99)),
  12. header_color = secondary_color,
  13. background_color = primary_color,
  14. link_color = secondary_color,
  15. text_bold_color = secondary_color,
  16. text_slide_number_color = text_color,
  17. padding = "16px 64px 16px 64px",
  18. background_image = NULL,
  19. background_size = NULL,
  20. background_position = NULL,
  21. code_highlight_color = "rgba(255,255,0,0.5)",
  22. code_inline_color = secondary_color,
  23. code_inline_background_color = NULL,
  24. code_inline_font_size = "1em",
  25. inverse_background_color = secondary_color,
  26. inverse_text_color = primary_color,
  27. inverse_text_shadow = FALSE,
  28. inverse_header_color = primary_color,
  29. title_slide_text_color = secondary_color,
  30. title_slide_background_color = primary_color,
  31. title_slide_background_image = NULL,
  32. title_slide_background_size = NULL,
  33. title_slide_background_position = NULL,
  34. footnote_color = NULL,
  35. footnote_font_size = "0.9em",
  36. footnote_position_bottom = "60px",
  37. left_column_subtle_color = apply_alpha(secondary_color, 0.6),
  38. left_column_selected_color = secondary_color,
  39. blockquote_left_border_color = apply_alpha(secondary_color, 0.5),
  40. table_border_color = "#666",
  41. table_row_border_color = "#ddd",
  42. table_row_even_background_color = lighten_color(primary_color, 0.9),
  43. base_font_size = "20px",
  44. text_font_size = "1rem",
  45. header_h1_font_size = "2.75rem",
  46. header_h2_font_size = "2.25rem",
  47. header_h3_font_size = "1.75rem",
  48. header_background_auto = FALSE,
  49. header_background_color = header_color,
  50. header_background_text_color = background_color,
  51. header_background_padding = NULL,
  52. header_background_content_padding_top = "7rem",
  53. header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
  54. text_slide_number_font_size = "0.9em",
  55. text_font_google = NULL,
  56. text_font_family = "Noto Sans",
  57. text_font_weight = "normal",
  58. text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
  59. text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
  60. text_font_base = "sans-serif",
  61. header_font_google = NULL,
  62. header_font_family = "Cabin",
  63. header_font_weight = "600",
  64. header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
  65. code_font_google = NULL,
  66. code_font_family = "Source Code Pro",
  67. code_font_size = "0.9rem",
  68. code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
  69. code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
  70. colors = NULL,
  71. extra_css = NULL,
  72. extra_fonts = NULL,
  73. outfile = "xaringan-themer.css"
  74. )
  75. }
  76. \arguments{
  77. \item{primary_color}{Duotone Primary Color. Defaults to #1F4257. Used in
  78. multiple CSS rules.}
  79. \item{secondary_color}{Duotone Secondary Color. Defaults to #F97B64. Used in
  80. multiple CSS rules.}
  81. \item{text_color}{Text Color. Defaults to
  82. \code{choose_dark_or_light(primary_color, darken_color(primary_color, 0.9), lighten_color(secondary_color, 0.99))}.
  83. Modifies the \code{body} element.}
  84. \item{header_color}{Header Color. Defaults to \code{secondary_color}. Modifies
  85. the \verb{h1, h2, h3} elements.}
  86. \item{background_color}{Slide Background Color. Defaults to \code{primary_color}.
  87. Modifies the \code{.remark-slide-content} class.}
  88. \item{link_color}{Link Color. Defaults to \code{secondary_color}. Modifies the
  89. \verb{a, a > code} elements.}
  90. \item{text_bold_color}{Bold Text Color. Defaults to \code{secondary_color}.
  91. Modifies the \code{strong} element.}
  92. \item{text_slide_number_color}{Slide Number Color. Defaults to \code{text_color}.
  93. Modifies the \code{.remark-slide-number} class.}
  94. \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults
  95. to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class.}
  96. \item{background_image}{Background image applied to each \emph{and every} slide.
  97. Set \code{title_slide_background_image = "none"} to remove the background image
  98. from the title slide. Defaults to \code{NULL}. Modifies the
  99. \code{.remark-slide-content} class.}
  100. \item{background_size}{Background image size, requires \code{background_image} to
  101. be set. If \code{background_image} is set, \code{background_size} will default to
  102. \code{cover} so the backround fills the screen. If both \code{background_image} and
  103. \code{background_position} are set, will default to 100 percent. Defaults to
  104. \code{NULL}. Modifies the \code{.remark-slide-content} class.}
  105. \item{background_position}{Background image position, requires
  106. \code{background_image} to be set, and it is recommended to adjust
  107. \code{background_size}. Defaults to \code{NULL}. Modifies the
  108. \code{.remark-slide-content} class.}
  109. \item{code_highlight_color}{Code Line Highlight. Defaults to
  110. rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class.}
  111. \item{code_inline_color}{Inline Code Color. Defaults to \code{secondary_color}.
  112. Modifies the \code{.remark-inline-code} class.}
  113. \item{code_inline_background_color}{Inline Code Background Color. Defaults
  114. to \code{NULL}. Modifies the \code{.remark-inline-code} class.}
  115. \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em.
  116. Modifies the \code{.remark-inline-code} class.}
  117. \item{inverse_background_color}{Inverse Background Color. Defaults to
  118. \code{secondary_color}. Modifies the \code{.inverse} class.}
  119. \item{inverse_text_color}{Inverse Text Color. Defaults to \code{primary_color}.
  120. Modifies the \code{.inverse} class.}
  121. \item{inverse_text_shadow}{Enables Shadow on text of inverse slides.
  122. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.}
  123. \item{inverse_header_color}{Inverse Header Color. Defaults to
  124. \code{primary_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3}
  125. classes.}
  126. \item{title_slide_text_color}{Title Slide Text Color. Defaults to
  127. \code{secondary_color}. Modifies the \code{.title-slide} class.}
  128. \item{title_slide_background_color}{Title Slide Background Color. Defaults
  129. to \code{primary_color}. Modifies the \code{.title-slide} class.}
  130. \item{title_slide_background_image}{Title Slide Background Image URL.
  131. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  132. \item{title_slide_background_size}{Title Slide Background Image Size,
  133. defaults to "cover" if background image is set. Defaults to \code{NULL}.
  134. Modifies the \code{.title-slide} class.}
  135. \item{title_slide_background_position}{Title Slide Background Image
  136. Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  137. \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same
  138. color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote}
  139. class.}
  140. \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies
  141. the \code{.footnote} class.}
  142. \item{footnote_position_bottom}{Footnote location from bottom of screen.
  143. Defaults to 60px. Modifies the \code{.footnote} class.}
  144. \item{left_column_subtle_color}{Left Column Text (not last). Defaults to
  145. \code{apply_alpha(secondary_color, 0.6)}. Modifies the
  146. \verb{.left-column h2, .left-column h3} classes.}
  147. \item{left_column_selected_color}{Left Column Current Selection. Defaults to
  148. \code{secondary_color}. Modifies the
  149. \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.}
  150. \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults
  151. to \code{apply_alpha(secondary_color, 0.5)}. Modifies the \code{blockquote} element.}
  152. \item{table_border_color}{Table top/bottom border. Defaults to #666.
  153. Modifies the \verb{table: border-top, border-bottom} elements.}
  154. \item{table_row_border_color}{Table row inner bottom border. Defaults to
  155. #ddd. Modifies the \verb{table thead th: border-bottom} elements.}
  156. \item{table_row_even_background_color}{Table Even Row Background Color.
  157. Defaults to \code{lighten_color(primary_color, 0.9)}. Modifies the
  158. \verb{thead, tfoot, tr:nth-child(even)} elements.}
  159. \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}).
  160. Defaults to 20px. Modifies the \code{html} element.}
  161. \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies
  162. the \code{.remark-slide-content} class.}
  163. \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem.
  164. Modifies the \verb{.remark-slide-content h1} class.}
  165. \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem.
  166. Modifies the \verb{.remark-slide-content h2} class.}
  167. \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem.
  168. Modifies the \verb{.remark-slide-content h3} class.}
  169. \item{header_background_auto}{Add background under slide title automatically
  170. for h1 header elements. If not enabled, use \code{class: header_background} to
  171. enable. Defaults to \code{FALSE}.}
  172. \item{header_background_color}{Background Color for h1 Header with
  173. Background. Defaults to \code{header_color}. Modifies the
  174. \verb{.remark-slide-content h1} class.}
  175. \item{header_background_text_color}{Text Color for h1 Header with
  176. Background. Defaults to \code{background_color}. Modifies the
  177. \verb{.remark-slide-content h1} class.}
  178. \item{header_background_padding}{Padding for h1 Header with Background.
  179. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class.}
  180. \item{header_background_content_padding_top}{Top Padding for Content in
  181. Slide with Header with Background. Defaults to 7rem. Modifies the
  182. \code{.remark-slide-content} class.}
  183. \item{header_background_ignore_classes}{Slide Classes Where Header with
  184. Background will not be Applied. Defaults to
  185. \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the
  186. \code{.remark-slide-content} class.}
  187. \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to
  188. 0.9em. Modifies the \code{.remark-slide-number} class.}
  189. \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults
  190. to \code{NULL}. Modifies the \code{body} element.}
  191. \item{text_font_family}{Body Text Font Family (xaringan default is
  192. \code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element.}
  193. \item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
  194. the \code{body} element.}
  195. \item{text_font_url}{Body Text Font URL(s). Defaults to
  196. https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
  197. Modifies the \verb{@import url()} elements.}
  198. \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
  199. -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
  200. helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
  201. element.}
  202. \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
  203. to sans-serif. Modifies the \code{body} element.}
  204. \item{header_font_google}{Use \code{google_font()} to specify header font.
  205. Defaults to \code{NULL}. Modifies the \code{body} element.}
  206. \item{header_font_family}{Header Font Family (xaringan default is
  207. \code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
  208. elements.}
  209. \item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
  210. \verb{h1, h2, h3} elements.}
  211. \item{header_font_url}{Header Font URL. Defaults to
  212. https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
  213. Modifies the \verb{@import url} elements.}
  214. \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
  215. to \code{NULL}. Modifies the \code{body} element.}
  216. \item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
  217. Modifies the \verb{.remark-code, .remark-inline-code} classes.}
  218. \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the
  219. \code{.remark-inline} class.}
  220. \item{code_font_url}{Code Font URL. Defaults to
  221. https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
  222. Modifies the \verb{@import url} elements.}
  223. \item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
  224. Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
  225. \verb{.remark-code, .remark-inline-code} classes.}
  226. \item{colors}{A named vector of custom colors. The names of the colors
  227. become CSS variables and classes that can be used within your slides.
  228. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable
  229. \code{--blue}, a \code{.blue} CSS class that applies the color to the text or
  230. foreground color, and a \code{.bg-blue} CSS class that applies the color
  231. to the background.}
  232. \item{extra_css}{A named list of CSS definitions each containing a named list
  233. of CSS property-value pairs, i.e.
  234. \code{list(".class-id" = list("css-property" = "value"))}.}
  235. \item{extra_fonts}{A list of additional fonts to import, each list element
  236. can be either a URL as a character string or a call to
  237. \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you
  238. will need to write custom CSS rules that apply the font to an element or
  239. class with the \code{font-family} property. See the \strong{Fonts} section of
  240. \code{vignette("xaringanthemer")} for an example.}
  241. \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
  242. }
  243. \description{
  244. A duotone theme designed to work well with two complementary
  245. colors.
  246. }
  247. \seealso{
  248. Other themes:
  249. \code{\link{style_duo_accent_inverse}()},
  250. \code{\link{style_duo_accent}()},
  251. \code{\link{style_mono_accent_inverse}()},
  252. \code{\link{style_mono_accent}()},
  253. \code{\link{style_mono_dark}()},
  254. \code{\link{style_mono_light}()},
  255. \code{\link{style_solarized_dark}()},
  256. \code{\link{style_solarized_light}()},
  257. \code{\link{style_xaringan}()}
  258. Other Duotone themes:
  259. \code{\link{style_duo_accent_inverse}()},
  260. \code{\link{style_duo_accent}()}
  261. }
  262. \concept{Duotone themes}
  263. \concept{themes}