闪亮的页面标题和图像 [英] Shiny page title and image

查看:10
本文介绍了闪亮的页面标题和图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的用户界面代码如下:

ui <- navbarPage(
theme = shinytheme("paper"),
title = div(img(src="ballerlablogo.png", style="margin-top: -14px;", height = 50)),

...

)

工作正常,但网页选项卡上的标题如下所示:

有没有办法在不删除导航栏中的图像或在导航栏中添加"Baller Lab"文本的情况下将页面标题设置为"Baller Lab"?

这里有一个指向该站点的链接:Beller Lab.us

推荐答案

使用fluidPage可以使用tags$head修改网页选项卡上的标题

library(shiny)
library(shinythemes)
ui <- fluidPage(
  theme = shinytheme("paper"),
  tags$head(HTML("<title>Baller Lab</title>")), #Without company logo
  #tags$head(HTML("<title>Baller Lab</title> <link rel='icon' type='image/gif/png' href='ballerlablogo.png'>")), #WIth company logo
  navbarPage(title = div(img(src="ballerlablogo.png", style="margin-top: -14px;", height = 50))))

server <- function(input, output, session) {}

shinyApp(ui, server)

这篇关于闪亮的页面标题和图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆