R 如何在仪表板标头()上放置图像(徽标)?
我一直在尝试创建一个闪亮的R 如何在仪表板标头()上放置图像(徽标)?,r,shiny,R,Shiny,我一直在尝试创建一个闪亮的网站,我想在我的dashboardHeader() 例如: 徽标将位于“Meu站点”下,位于仪表板侧栏()和下拉菜单()之间 我怎么做 用户界面 ui将padding right调整到所需距离。试试这个 ui <- dashboardPage( skin = "green", dashboardHeader(title = "Meu Site", # Set height of dashboardHeade
网站,我想在我的dashboardHeader()
例如:
徽标将位于“Meu站点”下,位于仪表板侧栏()和下拉菜单()之间
我怎么做
用户界面
ui将padding right
调整到所需距离。试试这个
ui <- dashboardPage(
skin = "green",
dashboardHeader(title = "Meu Site",
# Set height of dashboardHeader
tags$li(class = "dropdown",
tags$style(".main-header {max-height: 50px}"),
tags$style(".main-header .logo {height: 50px}")
),
tags$li(div(
img(src = 'YBS.png',
title = "A Meu Site", height = "30px"),
style = "padding-top:10px; padding-right:400px;"),
class = "dropdown"),
dropdownMenu(headerText="Contato", type = "messages", badgeStatus = "success",
messageItem("E-mail", "google@gmail.br", icon = icon("envelope")),
messageItem("Site Principal", uiOutput("site"), icon = icon("sitemap")),
messageItem("Server", uiOutput("server"), icon = icon("server")),
messageItem("Instagram", uiOutput("insta"), icon = icon("instagram-square")),
messageItem("Facebook", uiOutput("face"), icon = icon("facebook-square")),
messageItem("Youtube", uiOutput("youtube"), icon = icon("youtube-square"))
),
dropdownMenu(headerText="Aviso", type = "notifications", badgeStatus = "warning",
notificationItem(icon = icon("users"), status = "info", "Sobre Nós"),
notificationItem(icon = icon("cog"), status = "info", "Metodologia")
),
dropdownMenu(headerText="Tarefas", type = "tasks", badgeStatus = "danger",
taskItem(value = 20, color = "red", "Construção do App"
))
),
dashboardSidebar(width = 300,
### Adjust the sidebar
tags$style(".left-side, .main-sidebar {padding-top: 120px}"),
sidebarMenu(id="tabs",
menuItem("Analyse des profils d'activité des hôpitaux",
menuSubItem("Tableaux"),
menuSubItem("Carte")),
menuItem("Analyse de la concurrence",
menuSubItem("Zone de recrutement"),
menuSubItem("Part de marchés"),
menuSubItem("Flux des patients"),
menuSubItem("Indice de Herfindahl-Hirschmann")),
menuItem("Analyse de trajectoires")
)),
dashboardBody()
)
server <- function(input, output) { }
shinyApp(ui, server)
ui这太酷了!谢谢但我希望徽标在同一行下拉列表中(非深绿色区域)@RxT,请查看更新的代码。完美!谢谢!
ui <- dashboardPage(
skin = "green",
dashboardHeader(title = "Meu Site",
# Set height of dashboardHeader
tags$li(class = "dropdown",
tags$style(".main-header {max-height: 50px}"),
tags$style(".main-header .logo {height: 50px}")
),
tags$li(div(
img(src = 'YBS.png',
title = "A Meu Site", height = "30px"),
style = "padding-top:10px; padding-right:400px;"),
class = "dropdown"),
dropdownMenu(headerText="Contato", type = "messages", badgeStatus = "success",
messageItem("E-mail", "google@gmail.br", icon = icon("envelope")),
messageItem("Site Principal", uiOutput("site"), icon = icon("sitemap")),
messageItem("Server", uiOutput("server"), icon = icon("server")),
messageItem("Instagram", uiOutput("insta"), icon = icon("instagram-square")),
messageItem("Facebook", uiOutput("face"), icon = icon("facebook-square")),
messageItem("Youtube", uiOutput("youtube"), icon = icon("youtube-square"))
),
dropdownMenu(headerText="Aviso", type = "notifications", badgeStatus = "warning",
notificationItem(icon = icon("users"), status = "info", "Sobre Nós"),
notificationItem(icon = icon("cog"), status = "info", "Metodologia")
),
dropdownMenu(headerText="Tarefas", type = "tasks", badgeStatus = "danger",
taskItem(value = 20, color = "red", "Construção do App"
))
),
dashboardSidebar(width = 300,
### Adjust the sidebar
tags$style(".left-side, .main-sidebar {padding-top: 120px}"),
sidebarMenu(id="tabs",
menuItem("Analyse des profils d'activité des hôpitaux",
menuSubItem("Tableaux"),
menuSubItem("Carte")),
menuItem("Analyse de la concurrence",
menuSubItem("Zone de recrutement"),
menuSubItem("Part de marchés"),
menuSubItem("Flux des patients"),
menuSubItem("Indice de Herfindahl-Hirschmann")),
menuItem("Analyse de trajectoires")
)),
dashboardBody()
)
server <- function(input, output) { }
shinyApp(ui, server)