😎 Give your xaringan slides some style
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

87 Zeilen
5.4KB

  1. #' @param primary_color Duotone Primary Color, defaults to #1F4257
  2. #' @param secondary_color Duotone Secondary Color, defaults to #F97B64
  3. #' @param text_color Text Color, defaults to `choose_dark_or_light(primary_color, darken_color(primary_color, 0.9), lighten_color(secondary_color, 0.99))`
  4. #' @param header_color Header Color, defaults to `secondary_color`
  5. #' @param background_color Slide Background Color, defaults to `primary_color`
  6. #' @param link_color Link Color, defaults to `secondary_color`
  7. #' @param text_bold_color Bold Text Color, defaults to `secondary_color`
  8. #' @param text_slide_number_color Slide Number Color, defaults to `text_color`
  9. #' @param code_highlight_color Code Line Highlight, defaults to rgba(255,255,0,0.5)
  10. #' @param code_inline_color Inline Code Color, defaults to `secondary_color`
  11. #' @param code_inline_background_color Inline Code Background Color, defaults to NA
  12. #' @param inverse_background_color Inverse Background Color, defaults to `secondary_color`
  13. #' @param inverse_text_color Inverse Text Color, defaults to `primary_color`
  14. #' @param inverse_text_shadow Enables Shadow on text of inverse slides, defaults to `FALSE`
  15. #' @param inverse_header_color Inverse Header Color, defaults to `primary_color`
  16. #' @param title_slide_text_color Title Slide Text Color, defaults to `secondary_color`
  17. #' @param title_slide_background_color Title Slide Background Color, defaults to `primary_color`
  18. #' @param title_slide_background_image Title Slide Background Image URL, defaults to NA
  19. #' @param left_column_subtle_color Left Column Text (not last), defaults to `apply_alpha(secondary_color, 0.6)`
  20. #' @param left_column_selected_color Left Column Current Selection, defaults to `secondary_color`
  21. #' @param blockquote_left_color Blockquote Left Border Color, defaults to `apply_alpha(secondary_color, 0.5)`
  22. #' @param table_border_color Table top/bottom border, defaults to #666
  23. #' @param table_row_border_color Table row inner bottom border, defaults to #ddd
  24. #' @param table_row_even_background_color Table Even Row Background Color, defaults to `lighten_color(primary_color, 0.3)`
  25. #' @param text_font_google Use `google_font()` to specify body font, defaults to `NULL`
  26. #' @param text_font_family Body Text Font Family, defaults to 'Droid Serif'
  27. #' @param text_font_weight Body Text Font Weight, defaults to normal
  28. #' @param text_font_url Body Text Font URL(s), defaults to https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic
  29. #' @param text_font_family_fallback Body Text Font Fallbacks, defaults to 'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC'
  30. #' @param text_font_base Body Text Base Font (Total Failure Fallback), defaults to serif
  31. #' @param header_font_google Use `google_font()` to specify header font, defaults to `NULL`
  32. #' @param header_font_family Header Font Family, defaults to 'Yanone Kaffeesatz'
  33. #' @param header_font_weight Header Font Weight, defaults to normal
  34. #' @param header_font_url Header Font URL, defaults to https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz
  35. #' @param code_font_google Use `google_font()` to specify code font, defaults to `NULL`
  36. #' @param code_font_family Code Font Family, defaults to 'Source Code Pro'
  37. #' @param code_font_url Code Font URL, defaults to https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700
  38. #' @param code_font_family_fallback Code Font Fallback, defaults to 'Lucida Console', Monaco
  39. #' @param outfile Customized xaringan CSS output file name
  40. #' @template duo
  41. #' @family Duotone themes
  42. #' @export
  43. duo <- function(
  44. primary_color = "#1F4257",
  45. secondary_color = "#F97B64",
  46. text_color = choose_dark_or_light(primary_color, darken_color(primary_color, 0.9), lighten_color(secondary_color, 0.99)),
  47. header_color = secondary_color,
  48. background_color = primary_color,
  49. link_color = secondary_color,
  50. text_bold_color = secondary_color,
  51. text_slide_number_color = text_color,
  52. code_highlight_color = "rgba(255,255,0,0.5)",
  53. code_inline_color = secondary_color,
  54. code_inline_background_color = NA,
  55. inverse_background_color = secondary_color,
  56. inverse_text_color = primary_color,
  57. inverse_text_shadow = FALSE,
  58. inverse_header_color = primary_color,
  59. title_slide_text_color = secondary_color,
  60. title_slide_background_color = primary_color,
  61. title_slide_background_image = NA,
  62. left_column_subtle_color = apply_alpha(secondary_color, 0.6),
  63. left_column_selected_color = secondary_color,
  64. blockquote_left_color = apply_alpha(secondary_color, 0.5),
  65. table_border_color = "#666",
  66. table_row_border_color = "#ddd",
  67. table_row_even_background_color = lighten_color(primary_color, 0.3),
  68. text_font_google = NULL,
  69. text_font_family = "'Droid Serif'",
  70. text_font_weight = "normal",
  71. text_font_url = "https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic",
  72. text_font_family_fallback = "'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC'",
  73. text_font_base = "serif",
  74. header_font_google = NULL,
  75. header_font_family = "'Yanone Kaffeesatz'",
  76. header_font_weight = "normal",
  77. header_font_url = "https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz",
  78. code_font_google = NULL,
  79. code_font_family = "'Source Code Pro'",
  80. code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700",
  81. code_font_family_fallback = "'Lucida Console', Monaco",
  82. outfile = "xaringan-themed.css"
  83. ) {
  84. # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
  85. eval(parse(text = call_write_xaringan_theme()))
  86. }