R/app_ui.R

Defines functions golem_add_external_resources app_ui

#' The application User-Interface
#' 
#' @param request Internal parameter for `{shiny}`. 
#'     DO NOT REMOVE.
#' @import shiny
#' @noRd
app_ui <- function(request) {
  tagList(
    # Leave this function for adding external resources
    golem_add_external_resources(),
    
    # Your application UI logic 
    shinysky::busyIndicator(text = "Please wait ... ", wait = 0),
    
      navbarPage(
        id = "navbar",
        title = "COVID-19 in the United States",
        theme = "custom.css",
        mod_united_states_ui("united_states_ui_1"), 
        mod_states_ui("states_ui_1"), 
        mod_counties_ui("counties_ui_1"),
        mod_vaccinations_ui("vaccinations_ui_1"),
        mod_methodology_ui("methodology_ui_1")
        
      )
  )
    
  
}

#' Add external Resources to the Application
#' 
#' This function is internally used to add external 
#' resources inside the Shiny application. 
#' 
#' @import shiny
#' @importFrom golem add_resource_path activate_js favicon bundle_resources
#' @noRd
golem_add_external_resources <- function(){
  
  golem::add_resource_path(
    'www', app_sys('app/www')
  )
 
  tags$head(
   #favicon(),
    golem::bundle_resources(
      path = app_sys('app/www'),
      app_title = 'covidGolem'
    )
    # Add here other external resources
    # for example, you can add shinyalert::useShinyalert() 
  )
}
espors/covidGolem documentation built on April 25, 2022, 9:29 a.m.