Commit fefcd198 authored by Dorchies David's avatar Dorchies David
Browse files

feat: page structure initial test

parent 54fb4300
Pipeline #21902 passed with stage
in 1 minute and 46 seconds
......@@ -13,8 +13,8 @@ Imports:
DT,
glue,
htmltools,
readr,
TSstudio
shinydashboardPlus,
shinydashboard
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
......
......@@ -9,8 +9,29 @@ app_ui <- function(request) {
# Leave this function for adding external resources
golem_add_external_resources(),
# List the first level UI elements here
fluidPage(
h1("irmara")
shinydashboardPlus::dashboardPage(
options = list(sidebarExpandOnHover = TRUE),
header = shinydashboardPlus::dashboardHeader(title = "Irmara"),
# navigation menu that links to each of the tabs
sidebar = shinydashboardPlus::dashboardSidebar(
shinydashboard::sidebarMenu(
# Setting id makes input$tabs give the tabName of currently-selected tab
id = "tabs",
shinydashboard::menuItem("Instant risk overview", tabName = "instant_risk_overview", icon = icon("dashboard")),
shinydashboard::menuItem("One objective focus", icon = icon("th"), tabName = "one_objective_focus"),
shinydashboard::menuItem("Ruleset comparison", icon = icon("bar-chart-o"), tabName = "ruleset_comparison")
)
),
# Show the appropriate tab's content in the main body of our dashboard when we select it
body = shinydashboard::dashboardBody(
shinydashboard::tabItems(
shinydashboard::tabItem("instant_risk_overview", mod_instant_risk_overview_ui("Home_ui_1")),
shinydashboard::tabItem("one_objective_focus", mod_one_objective_focus_ui("MuscleGroup_ui_1")),
shinydashboard::tabItem("ruleset_comparison", mod_ruleset_comparison_ui("Exercises_ui_1")
)
)
),
title = "Irmara"
)
)
}
......
#' instant_risk_overview UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_instant_risk_overview_ui <- function(id){
ns <- NS(id)
tagList(
h1("instant_risk_overview")
)
}
#' instant_risk_overview Server Function
#'
#' @noRd
mod_instant_risk_overview_server <- function(input, output, session){
ns <- session$ns
}
## To be copied in the UI
# mod_instant_risk_overview_ui("instant_risk_overview_ui_1")
## To be copied in the server
# callModule(mod_instant_risk_overview_server, "instant_risk_overview_ui_1")
#' one_objective_focus UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_one_objective_focus_ui <- function(id){
ns <- NS(id)
tagList(
h1("one_objective_focus")
)
}
#' one_objective_focus Server Function
#'
#' @noRd
mod_one_objective_focus_server <- function(input, output, session){
ns <- session$ns
}
## To be copied in the UI
# mod_one_objective_focus_ui("one_objective_focus_ui_1")
## To be copied in the server
# callModule(mod_one_objective_focus_server, "one_objective_focus_ui_1")
#' ruleset_comparison UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_ruleset_comparison_ui <- function(id){
ns <- NS(id)
tagList(
h1("ruleset_comparison")
)
}
#' ruleset_comparison Server Function
#'
#' @noRd
mod_ruleset_comparison_server <- function(input, output, session){
ns <- session$ns
}
## To be copied in the UI
# mod_ruleset_comparison_ui("ruleset_comparison_ui_1")
## To be copied in the server
# callModule(mod_ruleset_comparison_server, "ruleset_comparison_ui_1")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment