R/app_ui.R

Defines functions app_ui golem_add_external_resources

#' @rdname PACKAGE_NAME
#' @keywords internal
#'
#' @importFrom shiny tagList
#' @importFrom shinymaterial material_page
app_ui <- function() {
  tagList(
    # Leave this function for adding external resources
    golem_add_external_resources(),
    # List the first level UI elements here 
    material_page(
      title = "PACKAGE_TITLE",
      include_nav_bar = FALSE,
      uiOutput("ui")
    )
  )
}

#' @rdname PACKAGE_NAME
#' @keywords internal
#'
#' @importFrom shiny addResourcePath tags
#' @importFrom golem favicon
golem_add_external_resources <- function() {
  addResourcePath(prefix = "www", directoryPath = system.file("app/www", package = "PACKAGE_NAME"))
  tags$head(favicon())
}
lanceupton/shiny_template documentation built on Jan. 6, 2020, 12:44 a.m.