当我在社交媒体上分享我的 Shinyapp 时,代码显示在标题图像下方,看起来不太好。如何控制我的 shinyapp 的社交分享图像和文本?我已经使用 shinyapps.io 部署了该应用程序。
请参阅下图作为示例:
应用链接:https ://regionalinnovationdatalab.shinyapps.io/Dashboard/
可以找到应用程序代码和数据的 Gitlab 链接:https ://gitlab.com/r.chappell/2019_ElectionApp_RIDL
插入标题图像的 UI 中的代码:
ui <- shiny::fluidPage( #use fluid page so that the app adjusts to the user's screen size and device
titlePanel(div(img(src='DATA DASHBOARD V3.png', height = 80))), #header title with image as the whole header ( must save header image in a subfolder titled 'www')
tags$head(tags$style(
type="text/css",
"img {max-width: 100%; width: 100%; height: auto}" #makes image size responsive to device and screen
)),
theme = "journal", #selected theme from shinythemes package
title=" RIDL: 2019 Election App", #title of web brower tab
br(),