【发布时间】:2016-06-27 23:34:15
【问题描述】:
我尝试参考以下答案,但徽标位于主面板内,而不是标题面板内...有什么解决方案吗?
- Adding a company Logo to ShinyDashboard header
- Embedding Image in Shiny App
- Add company logo to every page using Rstudio and knitr [duplicate]
我看到DISTRIBUTIONS OF RANDOM VARIABLES 在主面板的标题内有一个徽标,但无法在 shinyDashboard 标题中工作。以下是公司徽标标题的编码:
headerPanel(
HTML('Distributions of Random Variables v4
<a href="http://snap.uaf.edu" target="_blank"><img align="right" alt="SNAP Logo" src="./img/SNAP_acronym_100px.png" /></a>'
), "Distributions of Random Variables"
),
下面是我添加公司徽标的代码,source codes 在这里。有什么想法吗?
dbHeader <- dashboardHeader(title = 'Reporting Dashboard',
dropdownMenuOutput('messageMenu'),
dropdownMenu(type = 'notifications',
notificationItem(text = '5 new users today', icon('users')),
notificationItem(text = '12 items delivered',
icon('truck'), status = 'success'),
notificationItem(text = 'Server load at 86%',
icon = icon('exclamation-triangle'),
status = 'warning')),
dropdownMenu(type = 'tasks',
badgeStatus = 'success',
taskItem(value = 90, color = 'green', 'Documentation'),
taskItem(value = 17, color = 'aqua', 'Project X'),
taskItem(value = 75, color = 'yellow', 'Server deployment'),
taskItem(value = 80, color = 'red', 'Overall project')))
dbHeader$children$children <- HTML("<a href='http://www.scibrokes.com' target='_blank'>
<img align='right' alt='Logo' src='./oda-army.jpg'/></a>")
【问题讨论】:
标签: css shinydashboard