R/app_ui.R

Defines functions app_ui golem_add_external_resources

#' @import shiny
app_ui <- function() {
  tagList(# Leave this function for adding external resources
    golem_add_external_resources(),
    
    fluidPage(
      h1("Les métiers en tension"),
      
      sidebarLayout(
        sidebarPanel(
          p(
            "Les différents onglets vous permettent d’explorer les principales dimensions des métiers en tension.

            \nChaque métier, à sélectionner ci-dessous, est comparé à la moyenne de l’ensemble des métiers."
          ),
          
          mod_input_fap_ui("input_fap_ui_1"),
          width = 4
        ),
        mainPanel(
          tabsetPanel(
            tabPanel("Radar", mod_radar_ui("radar_ui_1")),
            tabPanel("Tableau", mod_tableau_ui("tableau_ui_1")),
            tabPanel("Evolutions", mod_evolutions_ui("evolutions_ui_1")),
            tabPanel(
              "Cartes" ,
              tabsetPanel(
                tabPanel("Tension",
                         mod_carto_ui("carto_ui_1")),
                tabPanel("Intensité d'embauches",
                         mod_carto_ui("carto_ui_2")),
                tabPanel("Main d'oeuvre disponible",
                         mod_carto_ui("carto_ui_3")),
                tabPanel("Conditions d'emploi",
                         mod_carto_ui("carto_ui_4"))
              )
            ),
            tabPanel("Méthodologie", mod_methode_ui("methode_ui_1"))
          ),
          width = 8
        )
      )
    ))
}

#' @import shiny
golem_add_external_resources <- function() {
  addResourcePath('www', system.file('app/www', package = 'gravitype'))
  
  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_pe.css"),
    
    tags$img(src = "www/logo_pe.png")
  )
}
tvroylandt/gravitype documentation built on Feb. 7, 2020, 2:37 a.m.