徽标而不是应用程序标题闪亮

问题描述 投票:1回答:1

如何在Shiny应用中添加标题而不是标题:

navbarPage("title",theme = shinytheme("flatly"), 
                   tabPanel("Home",

菜单标签大小的一些标志?我尝试了这个解决方案:How can I insert an image into the navbar on a shiny navbarPage(),但有些不起作用。图像太大覆盖所有菜单项

谢谢

r user-interface shiny navbar tabpanel
1个回答
1
投票

这是一个老问题,但我正在寻找一个解决方案,当我尝试使用shinyapps.io发布我的应用程序时,我发现的其他问题引起了问题,这是因为我正在使用flowPage和navbarPage,如orther中所建议的那样答案。

这是我从shinyapps.io支持团队收到的解决方案

#~~~~~~~~~~~~~~~~~~~~~~~ LOGAN SERVICES DASHBOARD ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                   ui <- shiny::navbarPage(

                     #the line of code places the logo on the left hand side before the tabs start. See image below.
                       title = div(img(src='LoganTogether-LOGO.jpg',style="margin-top: -14px; padding-right:10px;padding-bottom:10px", height = 60)),
                       #theme = "journal",
                       windowTitle="Logan Together: Service Map",


          #MAIN TAB~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                       

                   tabPanel("Interactive map", # then you go on to code the rest of your UI as normal

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.