Skip to content

Commit 6da1bb6

Browse files
committed
migrate to reveal 3.2; add tests for all themes
1 parent cff9e7c commit 6da1bb6

File tree

131 files changed

+51
-20213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+51
-20213
lines changed

DESCRIPTION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ Depends:
1111
R (>= 3.0)
1212
Imports:
1313
rmarkdown(>= 0.3.3)
14+
Suggests:
15+
testthat

R/revealjs_presentation.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' @inheritParams rmarkdown::html_document
88
#'
99
#' @param center \code{TRUE} to vertically center content on slides
10-
#' @param theme Visual theme ("default", "simple", "sky", "beige", "serif",
10+
#' @param theme Visual theme ("simple", "sky", "beige", "serif",
1111
#' "solarized", "blood", "moon", "night", "black", "league" or "white").
1212
#' @param transition Slide transition ("default", "none", "fade", "slide",
1313
#' "convex", "concave" or "zoom")
@@ -80,7 +80,7 @@ revealjs_presentation <- function(incremental = FALSE,
8080
fig_caption = FALSE,
8181
smart = TRUE,
8282
self_contained = TRUE,
83-
theme = "default",
83+
theme = "simple",
8484
transition = "default",
8585
background_transition = "default",
8686
highlight = "default",
@@ -122,8 +122,8 @@ revealjs_presentation <- function(incremental = FALSE,
122122
if (identical(theme, "default"))
123123
theme <- "simple"
124124
else if (identical(theme, "dark"))
125-
theme <- "default"
126-
if (theme %in% c("default", "blood", "moon", "night"))
125+
theme <- "black"
126+
if (theme %in% c("blood", "moon", "night", "black"))
127127
args <- c(args, "--variable", "theme-dark")
128128
args <- c(args, "--variable", paste("theme=", theme, sep=""))
129129

@@ -156,7 +156,7 @@ revealjs_presentation <- function(incremental = FALSE,
156156
args <- c()
157157

158158
# reveal.js
159-
revealjs_path <- file.path(reveal_resources(), "reveal-3.0.0")
159+
revealjs_path <- file.path(reveal_resources(), "reveal.js-3.2.0")
160160
if (!self_contained || identical(.Platform$OS.type, "windows"))
161161
revealjs_path <- relative_to(
162162
output_dir, render_supporting_files(revealjs_path, lib_dir))
@@ -189,6 +189,7 @@ revealjs_presentation <- function(incremental = FALSE,
189189

190190
revealjs_themes <- function() {
191191
c("default",
192+
"dark",
192193
"simple",
193194
"sky",
194195
"beige",

examples/simple.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Untitled"
33
output:
44
revealjs::revealjs_presentation:
5-
self_contained: false
5+
self_contained: true
66
---
77

88
```{r setup, include=FALSE}

inst/rmarkdown/templates/revealjs_presentation/resources/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<meta name="apple-mobile-web-app-capable" content="yes" />
1414
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
1515
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
16-
<link rel="stylesheet" href="$revealjs-url$/css/reveal.min.css"/>
16+
<link rel="stylesheet" href="$revealjs-url$/css/reveal.css"/>
1717

1818
$if(highlightjs)$
1919
<link rel="stylesheet"
@@ -145,7 +145,7 @@ <h3 class="date">$date$</h3>
145145
$endfor$
146146

147147
<script src="$revealjs-url$/lib/js/head.min.js"></script>
148-
<script src="$revealjs-url$/js/reveal.min.js"></script>
148+
<script src="$revealjs-url$/js/reveal.js"></script>
149149

150150
<script>
151151

inst/rmarkdown/templates/revealjs_presentation/resources/reveal-3.0.0/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

inst/rmarkdown/templates/revealjs_presentation/resources/reveal-3.0.0/Gruntfile.js

Lines changed: 0 additions & 174 deletions
This file was deleted.

inst/rmarkdown/templates/revealjs_presentation/resources/reveal-3.0.0/LICENSE

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)