| Package: xaringanthemer | |||||
| Type: Package | Type: Package | ||||
| Package: xaringanthemer | |||||
| Title: Xaringan CSS Theme Generator | Title: Xaringan CSS Theme Generator | ||||
| Version: 0.2.0.9000 | Version: 0.2.0.9000 | ||||
| Date: 2018-04-16 | Date: 2018-04-16 | ||||
| Authors@R: person("Garrick", "Aden-Buie", email = "g.adenbuie@gmail.com", role = c("aut", "cre")) | |||||
| Description: Create and edit your xaringan CSS files from within your R | |||||
| R Markdown slide source. More technically, this package actually creates | |||||
| valid remarkjs CSS themes that are easily used by xarangan. | |||||
| Authors@R: | |||||
| person(given = "Garrick", | |||||
| family = "Aden-Buie", | |||||
| role = c("aut", "cre"), | |||||
| email = "garrick@adenbuie.com") | |||||
| Description: Create and edit your xaringan CSS files from within | |||||
| your R R Markdown slide source. More technically, this package | |||||
| actually creates valid remarkjs CSS themes that are easily used by | |||||
| xarangan. | |||||
| License: MIT + file LICENSE | License: MIT + file LICENSE | ||||
| URL: https://github.com/gadenbuie/xaringanthemer | URL: https://github.com/gadenbuie/xaringanthemer | ||||
| BugReports: https://github.com/gadenbuie/xaringanthemer/issues | BugReports: https://github.com/gadenbuie/xaringanthemer/issues | ||||
| Encoding: UTF-8 | |||||
| LazyData: true | |||||
| RoxygenNote: 6.1.1 | |||||
| Roxygen: list(markdown = TRUE) | |||||
| Suggests: | |||||
| testthat, | |||||
| xaringan, | |||||
| here, | |||||
| knitr, | |||||
| rmarkdown | |||||
| Imports: | Imports: | ||||
| purrr, | |||||
| tibble, | |||||
| glue, | glue, | ||||
| purrr, | |||||
| stringr, | stringr, | ||||
| tibble, | |||||
| utils, | |||||
| whisker | whisker | ||||
| VignetteBuilder: knitr | |||||
| Suggests: | |||||
| here, | |||||
| knitr, | |||||
| rmarkdown, | |||||
| testthat, | |||||
| xaringan | |||||
| VignetteBuilder: | |||||
| knitr | |||||
| Encoding: UTF-8 | |||||
| LazyData: true | |||||
| Roxygen: list(markdown = TRUE) | |||||
| RoxygenNote: 6.1.1 |
| ) | ) | ||||
| table_row_even_background_color <- table_row_even_background_color %||% background_color | table_row_even_background_color <- table_row_even_background_color %||% background_color | ||||
| xaringanthemer_version <- utils::packageVersion("xaringanthemer") | |||||
| tf <- system.file("resources", "template.css", package = "xaringanthemer") | tf <- system.file("resources", "template.css", package = "xaringanthemer") | ||||
| template <- readLines(tf, warn = FALSE) | template <- readLines(tf, warn = FALSE) | ||||
| template <- paste(template, collapse = "\n") | template <- paste(template, collapse = "\n") |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| {{#xaringanthemer_version}} * Version: {{xaringanthemer_version}}{{/xaringanthemer_version}} | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url({{text_font_url}}); | @import url({{text_font_url}}); | ||||
| @import url({{header_font_url}}); | @import url({{header_font_url}}); |
| ) | ) | ||||
| table_row_even_background_color <- table_row_even_background_color %||% background_color | table_row_even_background_color <- table_row_even_background_color %||% background_color | ||||
| xaringanthemer_version <- utils::packageVersion("xaringanthemer") | |||||
| tf <- system.file("resources", "template.css", package = "xaringanthemer") | tf <- system.file("resources", "template.css", package = "xaringanthemer") | ||||
| template <- readLines(tf, warn = FALSE) | template <- readLines(tf, warn = FALSE) | ||||
| template <- paste(template, collapse = "\n") | template <- paste(template, collapse = "\n") |
| \alias{xaringanthemer-package} | \alias{xaringanthemer-package} | ||||
| \title{xaringanthemer: Xaringan CSS Theme Generator} | \title{xaringanthemer: Xaringan CSS Theme Generator} | ||||
| \description{ | \description{ | ||||
| Create and edit your xaringan CSS files from within your R | |||||
| R Markdown slide source. More technically, this package actually creates | |||||
| valid remarkjs CSS themes that are easily used by xarangan. | |||||
| Create and edit your xaringan CSS files from within | |||||
| your R R Markdown slide source. More technically, this package | |||||
| actually creates valid remarkjs CSS themes that are easily used by | |||||
| xarangan. | |||||
| } | } | ||||
| \seealso{ | \seealso{ | ||||
| Useful links: | Useful links: | ||||
| } | } | ||||
| \author{ | \author{ | ||||
| \strong{Maintainer}: Garrick Aden-Buie \email{g.adenbuie@gmail.com} | |||||
| \strong{Maintainer}: Garrick Aden-Buie \email{garrick@adenbuie.com} | |||||
| } | } | ||||
| \keyword{internal} | \keyword{internal} |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| * - xaringan wiki: https://github.com/yihui/xaringan/wiki | * - xaringan wiki: https://github.com/yihui/xaringan/wiki | ||||
| * - remarkjs wiki: https://github.com/gnab/remark/wiki | * - remarkjs wiki: https://github.com/gnab/remark/wiki | ||||
| * | * | ||||
| * Version: a.b.c.d.eeee | |||||
| * | |||||
| * ------------------------------------------------------- */ | * ------------------------------------------------------- */ | ||||
| @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | ||||
| @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| theme_file <- paste0(theme, ".css") | theme_file <- paste0(theme, ".css") | ||||
| theme_fun(outfile = tmpfile) | theme_fun(outfile = tmpfile) | ||||
| theme_css <- paste(readLines(tmpfile), collapse = "\n") | |||||
| theme_css <- readLines(tmpfile) | |||||
| # Mask package version in test files | |||||
| theme_css <- sub("( \\* Version: )[\\d.-]+", "\\1a.b.c.d.eeee", theme_css, perl = TRUE) | |||||
| theme_css <- paste(theme_css, collapse = "\n") | |||||
| expect_known_output(cat(theme_css), test_path("css", theme_file)) | expect_known_output(cat(theme_css), test_path("css", theme_file)) | ||||
| } | } | ||||