shiny/ui.R

##################################################################
# UI #############################################################
##################################################################
ui <- dashboardPage(
  title = "TGD prévisions",
  skin = "green",
  
  # HEADER #######################################################
  dashboardHeader(title = "TheGreenData"
  ),
  # LEFT PANEL ###################################################
  dashboardSidebar(
    sidebarMenu(
      id = "tabs",
      menuItem("MENU ITEM 1", 
               tabName = "FIRST_TAB", 
               icon = icon("flask")
               ),
      menuItem("MENU ITEM 2", 
               # tabName = "prelevements17", 
               icon = icon("flask"),
               menuSubItem("SECOND_TAB", 
                           tabName = "SECOND_TAB"
                           # icon = icon("map-marker")
                           ),
               # parcelles de prélèvement
               menuSubItem("THIRD_TAB", 
                           tabName = "THIRD_TAB"
                           # icon = icon("map-marker")
                           )
      )
    )
  ),

  # BODY PANEL ###################################################
  dashboardBody(
    # Introduce shinyJS
    useShinyjs(),
    
    # Define the CSS file
    tags$head(
      tags$link(rel = "stylesheet",
                type = "text/css", 
                href = "custom.css")
    ),
    
    # TAB : FIRST_TAB ##############################################
    tabItems(   
      # First tab content
      tabItem(tabName = "FIRST_TAB",
              fluidRow(
                # Space on the left of the main content
                column(width = 2),
                column(width = 8,
                       box(width = 12,
                           h2("XXXXXXXXXXXXXXXXXX",
                              align = "center"),
                           br(), br(),
                           hr(),
                           # Insert central image
                           div(img(src = "logoTGD.png",
                                   height = '100px', width = '150px'),
                               style = "text-align: center; "),
                           br(),
                           hr(),
                           br(),
                           "XXXXXXXXXXXXX",
                           br()
                       )),
                # Space on the right of the main content
                column(width = 2)
              )
      ),
      
      # TAB : SECOND_TAB #######################################
      tabItem(tabName = "SECOND_TAB",
              box(status = "primary",
                  title = tagList(shiny::icon("file-excel-o"),
                                  "TITLE"),
                  "XXXXXXXXXXXXXXXXXXX"
                  ),
              box(status = "primary",
                  title = tagList(shiny::icon("industry"),
                                  "TITLE"),
                  "XXXXXXXXXXXXXXXXXX"
              )
              
      ),
      # TAB : THIRD_TAB ##############################################
      tabItem(tabName = "THIRD_TAB",
              box(status = "primary",
                  title = tagList(shiny::icon("cogs"),
                                  "TITLE"),
                  "TEST"),
              box(status = "primary",
                  title = tagList(shiny::icon("bar-chart"),
                                  "TITLE"),
                  "XXXXXXXXXXXXXXXXX"
              )
      )
    )
    
  )
)
juliengoo/test documentation built on May 18, 2019, 10:14 a.m.