R/app_ui.R

Defines functions golem_add_external_resources app_ui

#' The application User-Interface
    # source("./R/utils_helpers.R")
    # source("./R/fct_helpers.R")
#'
#' @param request Internal parameter for `{shiny}`.
#'     DO NOT REMOVE.
#' @import shiny
#' @importFrom shinydashboard tabItems tabItem
#' @noRd
app_ui <- function(request) {
  tagList(

    # Leave this function for adding external resources
    golem_add_external_resources(),

    shinydashboard::dashboardPage(title = "River Menu Plan",


                  header(),
                  sideBar(),

              shinydashboard::dashboardBody(
                    #Header HTML info------------
                    # tags$head(
                    #   tags$link(rel = "stylesheet", type = "text/css", href = "test.css"),
                    #   tags$link(rel="shortcut icon", href="https://static.vecteezy.com/system/resources/previews/000/563/936/original/river-logo-template-vector-icon-illustration-vector.jpg")
                    # ),
                    #
                    tabItems(
                      tabItem(tabName = "menuplanner",
                              mod_menu_ui("menu_1")
                      ),#End tab item planner
                      tabItem(tabName = 'editmeal',
                              mod_editMeal_ui("editMeal_1")
                      ),#end tabItem editmeal
                      tabItem(tabName = 'newingredient',
                              mod_newIngredient_ui("newIngredient_1")
                      ),#end tabItem newingredient
                      tabItem(tabName = 'riverMenu',
                              mod_expMenu_ui("expMenu_1")
                      )#end tabItem riverMenu
                   )#End tab items
                )#End dashboard body

    )#end dashboardPage
  )#end tagList
}#end app_ui

#' 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() {
  add_resource_path(
    "www",
    app_sys("app/www")
  )

  tags$head(
    favicon(ext = 'png'),
    bundle_resources(
      path = app_sys("app/www"),
      app_title = "riverMenu"
    )
    # Add here other external resources
    # for example, you can add shinyalert::useShinyalert()
  )
}
peernisse/riverMenu documentation built on Aug. 31, 2022, 7:39 p.m.