😎 Give your xaringan slides some style
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

462 lines
21KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/style_mono_accent.R
  3. \name{style_mono_accent}
  4. \alias{style_mono_accent}
  5. \title{Monotone Accent Theme}
  6. \usage{
  7. style_mono_accent(
  8. base_color = "#43418A",
  9. white_color = "#FFFFFF",
  10. black_color = "#272822",
  11. text_color = black_color,
  12. header_color = base_color,
  13. background_color = white_color,
  14. link_color = base_color,
  15. text_bold_color = base_color,
  16. text_slide_number_color = base_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 = base_color,
  23. code_inline_background_color = NULL,
  24. code_inline_font_size = "1em",
  25. inverse_background_color = base_color,
  26. inverse_text_color = white_color,
  27. inverse_text_shadow = FALSE,
  28. inverse_header_color = white_color,
  29. title_slide_text_color = inverse_text_color,
  30. title_slide_background_color = inverse_background_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(base_color, 0.6),
  38. left_column_selected_color = base_color,
  39. blockquote_left_border_color = apply_alpha(base_color, 0.5),
  40. table_border_color = "#666",
  41. table_row_border_color = "#ddd",
  42. table_row_even_background_color = lighten_color(base_color, 0.8),
  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{base_color}{Monotone Base Color, works best with a strong color.
  78. Defaults to #43418A. Used in multiple CSS rules. The value of this
  79. variable is also stored as a CSS variable that can be referenced with
  80. \code{var(--base)} in any argument of a style function or in custom CSS.}
  81. \item{white_color}{Brightest color used. Defaults to #FFFFFF. Used in
  82. multiple CSS rules. The value of this variable is also stored as a CSS
  83. variable that can be referenced with \code{var(--white)} in any argument of a
  84. style function or in custom CSS.}
  85. \item{black_color}{Darkest color used. Defaults to #272822. Used in multiple
  86. CSS rules. The value of this variable is also stored as a CSS variable
  87. that can be referenced with \code{var(--black)} in any argument of a style
  88. function or in custom CSS.}
  89. \item{text_color}{Text Color. Defaults to \code{black_color}. Modifies the \code{body}
  90. element. The value of this variable is also stored as a CSS variable that
  91. can be referenced with \code{var(--text_color)} in any argument of a style
  92. function or in custom CSS.}
  93. \item{header_color}{Header Color. Defaults to \code{base_color}. Modifies the
  94. \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
  95. variable that can be referenced with \code{var(--header-color)} in any argument
  96. of a style function or in custom CSS.}
  97. \item{background_color}{Slide Background Color. Defaults to \code{white_color}.
  98. Modifies the \code{.remark-slide-content} class. The value of this variable is
  99. also stored as a CSS variable that can be referenced with
  100. \code{var(--background-color)} in any argument of a style function or in custom
  101. CSS.}
  102. \item{link_color}{Link Color. Defaults to \code{base_color}. Modifies the
  103. \verb{a, a > code} elements. The value of this variable is also stored as a CSS
  104. variable that can be referenced with \code{var(--link-color)} in any argument
  105. of a style function or in custom CSS.}
  106. \item{text_bold_color}{Bold Text Color. Defaults to \code{base_color}. Modifies
  107. the \code{strong} element. The value of this variable is also stored as a CSS
  108. variable that can be referenced with \code{var(--text-bold-color)} in any
  109. argument of a style function or in custom CSS.}
  110. \item{text_slide_number_color}{Slide Number Color. Defaults to \code{base_color}.
  111. Modifies the \code{.remark-slide-number} class.}
  112. \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults
  113. to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class.
  114. Accepts CSS
  115. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding}
  116. property values.}
  117. \item{background_image}{Background image applied to each \emph{and every} slide.
  118. Set \code{title_slide_background_image = "none"} to remove the background image
  119. from the title slide. Defaults to \code{NULL}. Modifies the
  120. \code{.remark-slide-content} class.}
  121. \item{background_size}{Background image size, requires \code{background_image} to
  122. be set. If \code{background_image} is set, \code{background_size} will default to
  123. \code{cover} so the backround fills the screen. If both \code{background_image} and
  124. \code{background_position} are set, will default to 100 percent. Defaults to
  125. \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS
  126. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size}
  127. property values.}
  128. \item{background_position}{Background image position, requires
  129. \code{background_image} to be set, and it is recommended to adjust
  130. \code{background_size}. Defaults to \code{NULL}. Modifies the
  131. \code{.remark-slide-content} class. Accepts CSS
  132. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position}
  133. property values.}
  134. \item{code_highlight_color}{Code Line Highlight. Defaults to
  135. rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class.
  136. The value of this variable is also stored as a CSS variable that can be
  137. referenced with \code{var(--code-highlight-color)} in any argument of a style
  138. function or in custom CSS.}
  139. \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}.
  140. Modifies the \code{.remark-inline-code} class.}
  141. \item{code_inline_background_color}{Inline Code Background Color. Defaults
  142. to \code{NULL}. Modifies the \code{.remark-inline-code} class.}
  143. \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em.
  144. Modifies the \code{.remark-inline-code} class. Accepts CSS
  145. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  146. property values. The value of this variable is also stored as a CSS
  147. variable that can be referenced with \code{var(--code-inline-font-size)} in any
  148. argument of a style function or in custom CSS.}
  149. \item{inverse_background_color}{Inverse Background Color. Defaults to
  150. \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is
  151. also stored as a CSS variable that can be referenced with
  152. \code{var(--inverse-background-color)} in any argument of a style function or
  153. in custom CSS.}
  154. \item{inverse_text_color}{Inverse Text Color. Defaults to \code{white_color}.
  155. Modifies the \code{.inverse} class. The value of this variable is also stored
  156. as a CSS variable that can be referenced with \code{var(--inverse-text-color)}
  157. in any argument of a style function or in custom CSS.}
  158. \item{inverse_text_shadow}{Enables Shadow on text of inverse slides.
  159. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.}
  160. \item{inverse_header_color}{Inverse Header Color. Defaults to \code{white_color}.
  161. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of
  162. this variable is also stored as a CSS variable that can be referenced with
  163. \code{var(--inverse-header-color)} in any argument of a style function or in
  164. custom CSS.}
  165. \item{title_slide_text_color}{Title Slide Text Color. Defaults to
  166. \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this
  167. variable is also stored as a CSS variable that can be referenced with
  168. \code{var(--title-slide-text-color)} in any argument of a style function or in
  169. custom CSS.}
  170. \item{title_slide_background_color}{Title Slide Background Color. Defaults
  171. to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The
  172. value of this variable is also stored as a CSS variable that can be
  173. referenced with \code{var(--title-slide-background-color)} in any argument of a
  174. style function or in custom CSS.}
  175. \item{title_slide_background_image}{Title Slide Background Image URL.
  176. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  177. \item{title_slide_background_size}{Title Slide Background Image Size,
  178. defaults to "cover" if background image is set. Defaults to \code{NULL}.
  179. Modifies the \code{.title-slide} class. Accepts CSS
  180. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size}
  181. property values.}
  182. \item{title_slide_background_position}{Title Slide Background Image
  183. Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts
  184. CSS
  185. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position}
  186. property values.}
  187. \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same
  188. color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote}
  189. class.}
  190. \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies
  191. the \code{.footnote} class. Accepts CSS
  192. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  193. property values.}
  194. \item{footnote_position_bottom}{Footnote location from bottom of screen.
  195. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS
  196. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position}
  197. property values.}
  198. \item{left_column_subtle_color}{Left Column Text (not last). Defaults to
  199. \code{apply_alpha(base_color, 0.6)}. Modifies the
  200. \verb{.left-column h2, .left-column h3} classes.}
  201. \item{left_column_selected_color}{Left Column Current Selection. Defaults to
  202. \code{base_color}. Modifies the
  203. \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.}
  204. \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults
  205. to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.}
  206. \item{table_border_color}{Table top/bottom border. Defaults to #666.
  207. Modifies the \verb{table: border-top, border-bottom} elements.}
  208. \item{table_row_border_color}{Table row inner bottom border. Defaults to
  209. #ddd. Modifies the \verb{table thead th: border-bottom} elements.}
  210. \item{table_row_even_background_color}{Table Even Row Background Color.
  211. Defaults to \code{lighten_color(base_color, 0.8)}. Modifies the
  212. \verb{thead, tfoot, tr:nth-child(even)} elements.}
  213. \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}).
  214. Defaults to 20px. Modifies the \code{html} element. The value of this variable
  215. is also stored as a CSS variable that can be referenced with
  216. \code{var(--base-font-size)} in any argument of a style function or in custom
  217. CSS.}
  218. \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies
  219. the \code{.remark-slide-content} class. Accepts CSS
  220. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  221. property values. The value of this variable is also stored as a CSS
  222. variable that can be referenced with \code{var(--text-font-size)} in any
  223. argument of a style function or in custom CSS.}
  224. \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem.
  225. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS
  226. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  227. property values. The value of this variable is also stored as a CSS
  228. variable that can be referenced with \code{var(--header-h1-font-size)} in any
  229. argument of a style function or in custom CSS.}
  230. \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem.
  231. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS
  232. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  233. property values. The value of this variable is also stored as a CSS
  234. variable that can be referenced with \code{var(--header-h2-font-size)} in any
  235. argument of a style function or in custom CSS.}
  236. \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem.
  237. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS
  238. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  239. property values. The value of this variable is also stored as a CSS
  240. variable that can be referenced with \code{var(--header-h3-font-size)} in any
  241. argument of a style function or in custom CSS.}
  242. \item{header_background_auto}{Add background under slide title automatically
  243. for h1 header elements. If not enabled, use \code{class: header_background} to
  244. enable. Defaults to \code{FALSE}.}
  245. \item{header_background_color}{Background Color for h1 Header with
  246. Background. Defaults to \code{header_color}. Modifies the
  247. \verb{.remark-slide-content h1} class. The value of this variable is also
  248. stored as a CSS variable that can be referenced with
  249. \code{var(--header-background-color)} in any argument of a style function or in
  250. custom CSS.}
  251. \item{header_background_text_color}{Text Color for h1 Header with
  252. Background. Defaults to \code{background_color}. Modifies the
  253. \verb{.remark-slide-content h1} class. The value of this variable is also
  254. stored as a CSS variable that can be referenced with
  255. \code{var(--header-background-text-color)} in any argument of a style function
  256. or in custom CSS.}
  257. \item{header_background_padding}{Padding for h1 Header with Background.
  258. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts
  259. CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding}
  260. property values.}
  261. \item{header_background_content_padding_top}{Top Padding for Content in
  262. Slide with Header with Background. Defaults to 7rem. Modifies the
  263. \code{.remark-slide-content} class.}
  264. \item{header_background_ignore_classes}{Slide Classes Where Header with
  265. Background will not be Applied. Defaults to
  266. \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the
  267. \code{.remark-slide-content} class.}
  268. \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to
  269. 0.9em. Modifies the \code{.remark-slide-number} class. Accepts CSS
  270. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  271. property values.}
  272. \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults
  273. to \code{NULL}. Modifies the \code{body} element.}
  274. \item{text_font_family}{Body Text Font Family (xaringan default is
  275. \code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
  276. value of this variable is also stored as a CSS variable that can be
  277. referenced with \code{var(--text-font-family)} in any argument of a style
  278. function or in custom CSS.}
  279. \item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
  280. the \code{body} element. Accepts CSS
  281. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
  282. property values.}
  283. \item{text_font_url}{Body Text Font URL(s). Defaults to
  284. https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
  285. Modifies the \verb{@import url()} elements.}
  286. \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
  287. -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
  288. helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
  289. element. The value of this variable is also stored as a CSS variable that
  290. can be referenced with \code{var(--text-font-family-fallback)} in any argument
  291. of a style function or in custom CSS.}
  292. \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
  293. to sans-serif. Modifies the \code{body} element. The value of this variable is
  294. also stored as a CSS variable that can be referenced with
  295. \code{var(--text-font-base)} in any argument of a style function or in custom
  296. CSS.}
  297. \item{header_font_google}{Use \code{google_font()} to specify header font.
  298. Defaults to \code{NULL}. Modifies the \code{body} element.}
  299. \item{header_font_family}{Header Font Family (xaringan default is
  300. \code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
  301. elements. The value of this variable is also stored as a CSS variable that
  302. can be referenced with \code{var(--header-font-family)} in any argument of a
  303. style function or in custom CSS.}
  304. \item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
  305. \verb{h1, h2, h3} elements. Accepts CSS
  306. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
  307. property values.}
  308. \item{header_font_url}{Header Font URL. Defaults to
  309. https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
  310. Modifies the \verb{@import url} elements.}
  311. \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
  312. to \code{NULL}. Modifies the \code{body} element.}
  313. \item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
  314. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
  315. this variable is also stored as a CSS variable that can be referenced with
  316. \code{var(--code-font-family)} in any argument of a style function or in custom
  317. CSS.}
  318. \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the
  319. \code{.remark-inline} class. Accepts CSS
  320. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  321. property values. The value of this variable is also stored as a CSS
  322. variable that can be referenced with \code{var(--code-font-size)} in any
  323. argument of a style function or in custom CSS.}
  324. \item{code_font_url}{Code Font URL. Defaults to
  325. https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
  326. Modifies the \verb{@import url} elements.}
  327. \item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
  328. Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
  329. \verb{.remark-code, .remark-inline-code} classes.}
  330. \item{colors}{A named vector of custom colors. The names of the colors
  331. become CSS variables and classes that can be used within your slides.
  332. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable
  333. \code{--blue}, a \code{.blue} CSS class that applies the color to the text or
  334. foreground color, and a \code{.bg-blue} CSS class that applies the color
  335. to the background.}
  336. \item{extra_css}{A named list of CSS definitions each containing a named list
  337. of CSS property-value pairs, i.e.
  338. \code{list(".class-id" = list("css-property" = "value"))}.}
  339. \item{extra_fonts}{A list of additional fonts to import, each list element
  340. can be either a URL as a character string or a call to
  341. \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you
  342. will need to write custom CSS rules that apply the font to an element or
  343. class with the \code{font-family} property. See the \strong{Fonts} section of
  344. \code{vignette("xaringanthemer")} for an example.}
  345. \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
  346. }
  347. \description{
  348. The default xaringan theme with a single color used for color
  349. accents on select elements (headers, bold text, etc.).
  350. }
  351. \section{Usage}{
  352. To use the styles created by this theme function, make sure
  353. that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML
  354. header. If you change the name of the output file using the \code{outfile}
  355. argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output:
  356. xaringan::moon_reader:
  357. css: xaringan-themer.css`
  358. }\if{html}{\out{</div>}}
  359. }
  360. \examples{
  361. # Create a xaringan style in a temporary file
  362. xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css")
  363. style_mono_accent(
  364. base_color = "#43418A",
  365. outfile = xaringan_themer_css # omit in your slides to write the
  366. # styles to xaringan-themer.css
  367. )
  368. # View the CSS:
  369. # file.edit(xaringan_themer_css)
  370. }
  371. \seealso{
  372. Other themes:
  373. \code{\link{style_duo_accent_inverse}()},
  374. \code{\link{style_duo_accent}()},
  375. \code{\link{style_duo}()},
  376. \code{\link{style_mono_accent_inverse}()},
  377. \code{\link{style_mono_dark}()},
  378. \code{\link{style_mono_light}()},
  379. \code{\link{style_solarized_dark}()},
  380. \code{\link{style_solarized_light}()},
  381. \code{\link{style_xaringan}()}
  382. Other Monotone themes:
  383. \code{\link{style_mono_accent_inverse}()},
  384. \code{\link{style_mono_dark}()},
  385. \code{\link{style_mono_light}()}
  386. }
  387. \concept{Monotone themes}
  388. \concept{themes}