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

112 lines
7.2KB

  1. #' @param primary_color Duotone Primary Color, defaults to #006747
  2. #' @param secondary_color Duotone Secondary Color, defaults to #CFC493
  3. #' @param white_color Brightest color used, defaults to #FFFFFF
  4. #' @param black_color Darkest color used, defaults to #000000
  5. #' @param text_color Text Color, defaults to `white_color`
  6. #' @param header_color Header Color, defaults to `primary_color`
  7. #' @param background_color Slide Background Color, defaults to `black_color`
  8. #' @param link_color Link Color, defaults to `choose_dark_or_light(secondary_color, secondary_color, primary_color)`
  9. #' @param text_bold_color Bold Text Color, defaults to `choose_dark_or_light(secondary_color, secondary_color, primary_color)`
  10. #' @param text_slide_number_color Slide Number Color, defaults to `primary_color`
  11. #' @param code_highlight_color Code Line Highlight, defaults to rgba(255,255,0,0.5)
  12. #' @param code_inline_color Inline Code Color, defaults to `choose_dark_or_light(secondary_color, secondary_color, primary_color)`
  13. #' @param code_inline_background_color Inline Code Background Color, defaults to NA
  14. #' @param inverse_background_color Inverse Background Color, defaults to `secondary_color`
  15. #' @param inverse_text_color Inverse Text Color, defaults to `choose_dark_or_light(secondary_color, black_color, white_color)`
  16. #' @param inverse_text_shadow Enables Shadow on text of inverse slides, defaults to `FALSE`
  17. #' @param inverse_header_color Inverse Header Color, defaults to `choose_dark_or_light(secondary_color, black_color, white_color)`
  18. #' @param title_slide_text_color Title Slide Text Color, defaults to `choose_dark_or_light(primary_color, black_color, white_color)`
  19. #' @param title_slide_background_color Title Slide Background Color, defaults to `primary_color`
  20. #' @param title_slide_background_image Title Slide Background Image URL, defaults to NA
  21. #' @param title_slide_background_size Title Slide Background Image Size, defaults to "cover" if background image is set, defaults to NA
  22. #' @param title_slide_background_position Title Slide Background Image Position, defaults to NA
  23. #' @param left_column_subtle_color Left Column Text (not last), defaults to `apply_alpha(primary_color, 0.6)`
  24. #' @param left_column_selected_color Left Column Current Selection, defaults to `primary_color`
  25. #' @param blockquote_left_color Blockquote Left Border Color, defaults to `apply_alpha(secondary_color, 0.5)`
  26. #' @param table_border_color Table top/bottom border, defaults to #666
  27. #' @param table_row_border_color Table row inner bottom border, defaults to #ddd
  28. #' @param table_row_even_background_color Table Even Row Background Color, defaults to `darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.3)`
  29. #' @param text_font_size Slide Body Text Font Size, defaults to 20px
  30. #' @param header_h1_font_size h1 Header Text Font Size, defaults to 55px
  31. #' @param header_h2_font_size h2 Header Text Font Size, defaults to 45px
  32. #' @param header_h3_font_size h3 Header Text Font Size, defaults to 35px
  33. #' @param text_slide_number_font_size Slide Number Text Font Size, defaults to 0.9em
  34. #' @param code_inline_font_size Inline Code Text Font Size, defaults to 1em
  35. #' @param code_font_size Code Text Font Size, defaults to 0.9em
  36. #' @param text_font_google Use `google_font()` to specify body font, defaults to `NULL`
  37. #' @param text_font_family Body Text Font Family, defaults to 'Droid Serif'
  38. #' @param text_font_weight Body Text Font Weight, defaults to normal
  39. #' @param text_font_url Body Text Font URL(s), defaults to https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic
  40. #' @param text_font_family_fallback Body Text Font Fallbacks, defaults to 'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC'
  41. #' @param text_font_base Body Text Base Font (Total Failure Fallback), defaults to serif
  42. #' @param header_font_google Use `google_font()` to specify header font, defaults to `NULL`
  43. #' @param header_font_family Header Font Family, defaults to 'Yanone Kaffeesatz'
  44. #' @param header_font_weight Header Font Weight, defaults to normal
  45. #' @param header_font_url Header Font URL, defaults to https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz
  46. #' @param code_font_google Use `google_font()` to specify code font, defaults to `NULL`
  47. #' @param code_font_family Code Font Family, defaults to 'Source Code Pro'
  48. #' @param code_font_url Code Font URL, defaults to https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700
  49. #' @param code_font_family_fallback Code Font Fallback, defaults to 'Lucida Console', Monaco
  50. #' @template extra_css
  51. #' @param outfile Customized xaringan CSS output file name, default is "xaringan-themer.css"
  52. #' @template duo_accent_inverse
  53. #' @family Duotone themes
  54. #' @export
  55. duo_accent_inverse <- function(
  56. primary_color = "#006747",
  57. secondary_color = "#CFC493",
  58. white_color = "#FFFFFF",
  59. black_color = "#000000",
  60. text_color = white_color,
  61. header_color = primary_color,
  62. background_color = black_color,
  63. link_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  64. text_bold_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  65. text_slide_number_color = primary_color,
  66. code_highlight_color = "rgba(255,255,0,0.5)",
  67. code_inline_color = choose_dark_or_light(secondary_color, secondary_color, primary_color),
  68. code_inline_background_color = NA,
  69. inverse_background_color = secondary_color,
  70. inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color),
  71. inverse_text_shadow = FALSE,
  72. inverse_header_color = choose_dark_or_light(secondary_color, black_color, white_color),
  73. title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color),
  74. title_slide_background_color = primary_color,
  75. title_slide_background_image = NA,
  76. title_slide_background_size = NA,
  77. title_slide_background_position = NA,
  78. left_column_subtle_color = apply_alpha(primary_color, 0.6),
  79. left_column_selected_color = primary_color,
  80. blockquote_left_color = apply_alpha(secondary_color, 0.5),
  81. table_border_color = "#666",
  82. table_row_border_color = "#ddd",
  83. table_row_even_background_color = darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.3),
  84. text_font_size = "20px",
  85. header_h1_font_size = "55px",
  86. header_h2_font_size = "45px",
  87. header_h3_font_size = "35px",
  88. text_slide_number_font_size = "0.9em",
  89. code_inline_font_size = "1em",
  90. code_font_size = "0.9em",
  91. text_font_google = NULL,
  92. text_font_family = "'Droid Serif'",
  93. text_font_weight = "normal",
  94. text_font_url = "https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic",
  95. text_font_family_fallback = "'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC'",
  96. text_font_base = "serif",
  97. header_font_google = NULL,
  98. header_font_family = "'Yanone Kaffeesatz'",
  99. header_font_weight = "normal",
  100. header_font_url = "https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz",
  101. code_font_google = NULL,
  102. code_font_family = "'Source Code Pro'",
  103. code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
  104. code_font_family_fallback = "'Lucida Console', Monaco",
  105. extra_css = NULL,
  106. extra_fonts = NULL,
  107. outfile = "xaringan-themer.css"
  108. ) {
  109. # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
  110. eval(parse(text = call_write_xaringan_theme()))
  111. }