R/add_external_resources.R

Defines functions add_external_resources

Documented in add_external_resources

#' Add external Resources to the Application
#'
#' This function is internally used to add external
#' resources inside the Shiny application.
add_external_resources = function() {
  shiny::addResourcePath(
    "www", app_sys("app/www")
  )
  shiny::tags$head(
    shinyjs::useShinyjs(),
    shiny::tags$script(type = "text/javascript", src = "www/logo.js"),
    shiny::tags$script(shiny::HTML("Shiny.addCustomMessageHandler('changetitle', function(x) {document.title=x});")),
    shiny::tags$link(rel = "stylesheet", type = "text/css", href = "www/phw-style.css"),
    shiny::tags$style(type = "text/css",
                      ".shiny-output-error { visibility: hidden; }",
                      ".shiny-output-error:before { visibility: hidden; }",
    )
  )
}
WHESRi/whesApp documentation built on Dec. 18, 2021, 6:21 p.m.