😎 Give your xaringan slides some style
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
3.7KB

  1. @import url({{text_font_url}});
  2. @import url({{header_font_url}});
  3. @import url({{code_font_url}});
  4. body {
  5. font-family: {{paste(text_font_family, text_font_family_fallback, text_font_base, sep = ", ")}};
  6. font-weight: {{text_font_weight}};
  7. color: {{text_color}};
  8. }
  9. .remark-slide-content {
  10. background-color: {{background_color}};
  11. }
  12. h1, h2, h3 {
  13. font-family: {{header_font_family}};
  14. font-weight: {{header_font_weight}};
  15. color: {{header_color}};
  16. }
  17. .remark-code, .remark-inline-code {
  18. font-family: {{code_font_family}}, {{code_font_family_fallback}}, monospace;
  19. }
  20. .remark-inline-code {
  21. {{ifelse(!is.na(code_inline_color), paste0("color: ", code_inline_color, ";"), "")}}
  22. {{ifelse(!is.na(code_inline_background_color), paste0("background-color: ", code_inline_background_color, ";"), "")}}
  23. {{ifelse(!is.na(code_inline_background_color), "padding: 2px;", "")}}
  24. }
  25. .remark-slide-number {
  26. color: {{text_slide_number_color}};
  27. opacity: 1;
  28. }
  29. {{ifelse(!is.na(text_bold_color), paste0("strong{color:", text_bold_color,";}"), "")}}
  30. a, a > code {
  31. color: {{link_color}};
  32. text-decoration: none;
  33. }
  34. .footnote {
  35. position: absolute;
  36. bottom: 3em;
  37. padding-right: 4em;
  38. font-size: 90%;
  39. }
  40. .remark-code-line-highlighted {
  41. background-color: {{code_highlight_color}};
  42. }
  43. .inverse {
  44. background-color: {{inverse_background_color}};
  45. color: {{inverse_text_color}};
  46. {{ifelse(inverse_text_shadow, "text-shadow: 0 0 20px #333;", "")}}
  47. }
  48. .inverse h1, .inverse h2, .inverse h3 {
  49. color: {{inverse_header_color}};
  50. }
  51. .title-slide, .title-slide h1, ..title-slide h2, .title-slide h3 {
  52. background-color: {{title_slide_background_color}};
  53. color: {{title_slide_text_color}};
  54. {{ifelse(!is.na(title_slide_background_image), paste0("background-image: url(", title_slide_background_image, ");"), "")}}
  55. {{ifelse(!is.na(title_slide_background_image), "background-size: cover;", "")}}
  56. }
  57. /* Two-column layout */
  58. .left-column {
  59. width: 20%;
  60. height: 92%;
  61. float: left;
  62. }
  63. .left-column h2, .left-column h3 {
  64. color: {{left_column_subtle_color}};
  65. }
  66. .left-column h2:last-of-type, .left-column h3:last-child {
  67. color: {{left_column_selected_color}};
  68. }
  69. .right-column {
  70. width: 75%;
  71. float: right;
  72. padding-top: 1em;
  73. }
  74. .pull-left {
  75. float: left;
  76. width: 47%;
  77. }
  78. .pull-right {
  79. float: right;
  80. width: 47%;
  81. }
  82. .pull-right ~ * {
  83. clear: both;
  84. }
  85. img, video, iframe {
  86. max-width: 100%;
  87. }
  88. blockquote {
  89. border-left: solid 5px {{blockquote_left_color}};
  90. padding-left: 1em;
  91. }
  92. table {
  93. margin: auto;
  94. border-top: 1px solid {{table_border_color}};
  95. border-bottom: 1px solid {{table_border_color}};
  96. }
  97. table thead th { border-bottom: 1px solid {{table_row_border_color}}; }
  98. th, td { padding: 5px; }
  99. thead, tfoot, tr:nth-child(even) { background: {{table_row_even_background_color}} }
  100. table.dataTable tbody {
  101. background-color: {{background_color}};
  102. color: {{text_color}};
  103. }
  104. table.dataTable.display tbody tr.odd {
  105. background-color: {{background_color}};
  106. }
  107. table.dataTable.display tbody tr.even {
  108. background-color: {{ifelse(!is.na(table_row_even_background_color), table_row_even_background_color, background_color)}};
  109. }
  110. table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
  111. background-color: rgba(255, 255, 255, 0.5);
  112. }
  113. .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate {
  114. color: {{text_color}};
  115. }
  116. .dataTables_wrapper .dataTables_paginate .paginate_button {
  117. color: {{text_color}} !important;
  118. }
  119. @page { margin: 0; }
  120. @media print {
  121. .remark-slide-scaler {
  122. width: 100% !important;
  123. height: 100% !important;
  124. transform: scale(1) !important;
  125. top: 0 !important;
  126. left: 0 !important;
  127. }
  128. }