How to avoid shiny.router to change the colors of my shinydashboard (header and sidebar)?

I am trying to set up several shiny dashboards (let say 100) on 100 different pages using shiny.router.

I am starting with only 2 pages to see if it is something that can work. However, when applying shiny.router, the typical shiny dashboard is changed (both the header and the sidebar becomes white while the sidebar was black and the header was blue).

I am able to change easily the color of both header and sidebar in each shiny dashboard but applying shiny.router will make it white in any case.

Anyone can help on that particular matter?

I have tried to use the same HTML code to change the color of the sidebar in a shiny dashboard into the

ui <- shinyUI(
router_ui()
)
something like:

ui <- shinyUI(
router_ui(),

tags$head(tags$style(HTML("
.skin-blue .main-sidebar {
background-color: yellow;
}")))
)
but got an error message.

library(shiny)
library(shinydashboard)
library(shiny.router)

source('R/ui_home.R')
source('R/ui_test.R')

source('R/server_home.R')
source('R/server_test.R')

router<- make_router(
route("home", home,server_home),
route("test", test,server_test)
)

ui <- shinyUI(
router_ui()
)

server <- shinyServer(function(input, output,session) {
router(input, output,session)
})

shinyApp(ui, server)

The following two lines would give me two shiny dashboards with nice colors, but running the above code would set the background color of the header and the sidebar in white (I would not see the sidebar elements as they are written in white and I would like the color to be different than white in any case).

shinyApp(ui=home, server=server_home)
shinyApp(ui=test, server=server_test)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.