Skip to content

Commit

Permalink
Remove exercise icons (#436)
Browse files Browse the repository at this point in the history
Co-authored-by: Barret Schloerke <schloerke@gmail.com>
Co-authored-by: James J Balamuta <coatless@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 29, 2020
1 parent 357e7f0 commit be2a234
Show file tree
Hide file tree
Showing 25 changed files with 31 additions and 124 deletions.
32 changes: 31 additions & 1 deletion R/knitr-hooks.R
Expand Up @@ -317,14 +317,44 @@ install_knitr_hooks <- function() {
} else {
cap_engine <- knitr_engine(options$engine)

# use logo shipped within learnr pkg (currently none)
cap_engine_file <- system.file(file.path("internals", "icons", paste0(cap_engine, ".svg")), package = "learnr")
if (file.exists(cap_engine_file)) {
as.character(htmltools::div(
class = "tutorial_engine_icon",
htmltools::HTML(readLines(cap_engine_file))
))
} else {
paste0(options$engine, " code")
cap_engine_val <-
switch(cap_engine,
"bash" = "Bash",
"c" = "C",
"coffee" = "CoffeeScript",
"cc" = "C++",
"css" = "CSS",
"go" = "Go",
"groovy" = "Groovy",
"haskell" = "Haskell",
"js" = "JavaScript",
"mysql" = "MySQL",
"node" = "Node.js",
"octave" = "Octave",
"psql" = "PostgreSQL",
"python" = "Python",
"r" = "R",
"rcpp" = "Rcpp",
"cpp11" = "cpp11",
"rscript" = "Rscript",
"ruby" = "Ruby",
"perl" = "Perl",
"sass" = "Sass",
"scala" = "Scala",
"scss" = "SCSS",
"sql" = "SQL",
# else, return as the user provided
options$engine
)
paste0(cap_engine_val, " code")
}
}
ui_options <- list(
Expand Down
1 change: 0 additions & 1 deletion inst/internals/icons/bash.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/c.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/cc.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/coffee.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/css.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/go.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/groovy.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/haskell.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/js.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/mysql.svg

This file was deleted.

1 change: 0 additions & 1 deletion inst/internals/icons/node.svg

This file was deleted.

0 comments on commit be2a234

Please sign in to comment.