I am trying to get rid of the two double bars within my R shiny app. I use shinydashboard.
I want to keep the red navigation bar but get rid of the green bar that is below it. How to do this?
This is the picture:
And this is the partial code I use:
app_ui <- function(request) {
tagList(
# Leave this function for adding external resources
golem_add_external_resources(),
shiny::fluidPage(
theme = shinythemes::shinytheme("united"),
tags$head(tags$style(".navbar {margin-bottom: 0px;}")),
tags$head(
tags$style(".container-fluid {padding-right: 0px; padding-left: 0px;}")
),
# Your application UI logic
# shinyUI(
# navbarPage(
navbarPage(
title = div(
img(src = "www/bftb_logo_v8_bare.png", height = "30px"),
"AZ Oncology Bioinformatics Toolbox"
),
windowTitle = "BFTB Landing Page",
# windowTitle = "BFTB Landing Page",
# title = div(img(src = "www/bftb_logo_v8_bare.png", height = "30px"), "AZ Oncology Bioinformatics Toolbox"),
# theme = shinythemes::shinytheme("cerulean"),
tabPanel("Toolbox", icon = icon("wrench"),
shinydashboard::dashboardPage(
header = NULL,
# header = shinydashboard::dashboardHeader(title = " ", titleWidth = 300),
shinydashboard::dashboardSidebar(
width = 300 ,
shinydashboard::sidebarMenu(
shinydashboard::menuItem(
"Tools",
tabName = "tools_app",
icon = icon("wrench"),
shinydashboard::menuSubItem(
"Gene Expression/Signature/Pathways",
tabName = "gene_app",
icon = icon("chart-line")
),
shinydashboard::menuSubItem(
"Genomic",
tabName = "genomic_app",
icon = icon("universal-access")
),
shinydashboard::menuSubItem(
"Epigenetics",
tabName = "epi_app",
icon = icon("chart-bar")
),
shinydashboard::menuSubItem(
"Immune-oncology",
tabName = "io_app",
icon = icon("heartbeat")
),
shinydashboard::menuSubItem(
"Pharmacology",
tabName = "pharm_app",
icon = icon("plus-square")
),
shinydashboard::menuSubItem(
"Cell line Selection",
tabName = "cell_app",
icon = icon("sellcast")
),
shinydashboard::menuSubItem("Mouse",
tabName = "mouse_app",
icon = icon("paw")),
shinydashboard::menuSubItem(
"Haem Oncology",
tabName = "hemebase_app",
icon = icon("h-square")
),
shinydashboard::menuSubItem("Multiomics",
tabName = "multiomics_app",
icon = icon("list")),
shinydashboard::menuSubItem(
"Other",
tabName = "other_app",
icon = icon("option-horizontal", lib = "glyphicon"))
)
)
),
shinydashboard::dashboardBody(
shinydashboard::tabItems(
shinydashboard::tabItem("tools_app", mod_tools_path_ui("tools_path_ui_1")),
shinydashboard::tabItem("gene_app",mod_gene_expressions_sign_path_ui("gene_expression_sign_path_ui_1")),
shinydashboard::tabItem("genomic_app", mod_genomic_ui("genomic_ui_1")),
shinydashboard::tabItem("epi_app", mod_epi_ui("epi_ui_1")),
shinydashboard::tabItem("io_app", mod_io_ui("io_ui_1")),
shinydashboard::tabItem("pharm_app", mod_pharm_ui("pharm_ui_1")),
shinydashboard::tabItem("cell_app", mod_cell_ui("cell_ui_1")),
shinydashboard::tabItem("mouse_app", mod_mouse_ui("mouse_ui_1")),
shinydashboard::tabItem("hemebase_app", mod_hemebase_ui("hemebase_ui_1")),
shinydashboard::tabItem("multiomics_app", mod_multiomics_ui("multiomics_ui_1")),
shinydashboard::tabItem("other_app", mod_other_ui("other_ui_1"))))
)),
shiny::tabPanel("Tutorials", icon = icon("graduation-cap"),mod_tutorials_ui("mod_tutorials_ui_1")),
shiny::tabPanel("Workflows", icon = icon("list"), mod_workflows_ui("mod_workflows_ui_1")),
br(),
br(),
br()
)
), # tags$footer("footer_app", mod_footer_ui("mod_footer_ui_1")
tags$footer(mod_footer_ui("mod_footer_ui_1"))
)
# )
}
You had better sent a compeleted script then I could test it to make sure, however, you should set disable = TRUE
in the shinydashboard::dashboardHeader
function
header = shinydashboard::dashboardHeader(title = " ", titleWidth = 300, disable = TRUE)
rather than
header = shinydashboard::dashboardHeader(title = " ", titleWidth = 300)