R/app_ui.R

Defines functions golem_add_external_resources app_ui

#' @import shiny
app_ui <- function() {
  tagList(
    # Leave this function for adding external resources
    golem_add_external_resources(),
    # List the first level UI elements here 
    
    shinydashboard::dashboardPage(
    shinydashboard::dashboardHeader(title = paste0("STUDY NAME PARAMETER","(", "STATUS PARAMETER",")") ), 
    shinydashboard::dashboardSidebar(
      shinydashboard::sidebarMenu(
        shinydashboard::menuItem("Home",    tabName = "Home",     icon = icon("dashboard")),
        shinydashboard::menuItem("Overview",tabName = "OVERVIEW", icon = icon("th")) ,
        shinydashboard::menuItem("LOPO",    tabName = "LOPO",     icon = icon("th")) 
      )
    ),
    
    shinydashboard::dashboardBody(
      shinydashboard::tabItems(
        m_home_ui("home1"),
        m_overview_ui("overview1"),
        m_lopo_ui("lopo1")
      )
    )
  ) #dashboardPage
  ) #tagList
}

#' @import shiny
golem_add_external_resources <- function(){
  
  addResourcePath(
    'www', system.file('app/www', package = 'lopo3000')
  )
 
  tags$head(
    golem::activate_js(),
    golem::favicon()
    # Add here all the external resources
    # If you have a custom.css in the inst/app/www
    # Or for example, you can add shinyalert::useShinyalert() here
    #tags$link(rel="stylesheet", type="text/css", href="www/custom.css")
  )
}
kismet303/lopo3000 documentation built on Dec. 5, 2019, 8:40 a.m.