标志而不是应用程序标题闪亮 [英] Logo instead of application title Shiny
本文介绍了标志而不是应用程序标题闪亮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 Shiny 应用程序中输入标题而不是标题:
navbarPage("title",theme = Shinytheme("flatly"),tabPanel("首页",
菜单标签大小的一些标志?我试过这个解决方案:
How can I put instead of title in Shiny app:
navbarPage("title",theme = shinytheme("flatly"),
tabPanel("Home",
some logo in the size of menu tab? I tried this solution: How can I insert an image into the navbar on a shiny navbarPage() but someway is not working. Image too big overlay all menu items
Thx
解决方案
This is an old question but I was looking for a solution and the other ones I found caused issues when I tried to publish my application using shinyapps.io and this was due to the fact that I was using both fluidPage and navbarPage as suggested in orther answers.
Here is my solution which I recieved from the support team at 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
这篇关于标志而不是应用程序标题闪亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文