问题
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
回答1:
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
来源:https://stackoverflow.com/questions/33219885/logo-instead-of-application-title-shiny