在导航栏布局中使用boostrap footer类
我想将页脚包括到我的在导航栏布局中使用boostrap footer类,r,shiny,R,Shiny,我想将页脚包括到我的navbarPageshiny布局中。主函数中存在页脚参数: 但我想为footer使用boostrap类: 因此,我想知道如何在我的闪亮应用程序中包含以下HTML代码: ©2018版权所有: 我试过: library(shiny) library(shinythemes) # Define UI for application that draws a histogram ui <- fluidPage( navbarPage("MyApp",
navbarPage
shiny布局中。主函数中存在页脚参数:
但我想为footer使用boostrap类:
因此,我想知道如何在我的闪亮应用程序中包含以下HTML代码:
©2018版权所有:
我试过:
library(shiny)
library(shinythemes)
# Define UI for application that draws a histogram
ui <- fluidPage(
navbarPage("MyApp",
theme = shinytheme("flatly"),
tabPanel("Test"),
footer = tagList(
br(),
div(p("test"), class="footer-copyright text-center py-3"),
class = "page-footer font-small cyan darken-3"
)
)
)
# Define server logic required to draw a histogram
server <- function(input, output,session) {
}
# Run the application
shinyApp(ui = ui, server = server)
库(闪亮)
图书馆(shinythemes)
#为绘制直方图的应用程序定义UI
ui从获取mdbootstrap所需的链接,使用标记$head
中的标记$link
传递这些链接。
然后使用标记$footer
传递页脚。最后,在浏览器中打开应用程序以查看页脚主题
library(shiny)
library(shinythemes)
# Define UI for application that draws a histogram
ui <- fluidPage(
tags$head(tags$link(rel = "stylesheet", href = "https://use.fontawesome.com/releases/v5.8.2/css/all.css"),
tags$link(rel = "stylesheet", href = "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css"),
tags$link(rel = "stylesheet", href = "https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.8.11/css/mdb.min.css")),
navbarPage("MyApp",
theme = shinytheme("flatly"),
tabPanel("Test")),
tags$footer(HTML("
<!-- Footer -->
<footer class='page-footer font-large indigo'>
<!-- Copyright -->
<div class='footer-copyright text-center py-3'>© 2018 Copyright:
<a href='https://mdbootstrap.com/education/bootstrap/'> MDBootstrap.com</a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->")))
# Define server logic required to draw a histogram
server <- function(input, output,session) {}
# Run the application
shinyApp(ui = ui, server = server)
库(闪亮)
图书馆(shinythemes)
#为绘制直方图的应用程序定义UI
ui为什么te颜色未设置为蓝色?最后一部分说它应该是蓝色的,在显示引导示例的链接中,页脚是蓝色的。稍后我将使用其他颜色,但不确定为什么这不起作用?另外,如果我使用大字体而不是小字体,那么什么也不会发生。它似乎没有使用class='page-footer font small blue'
part。可能footer参数已经使用默认类,并且它没有被新类覆盖。@Mislav很抱歉,我第一次没有正确理解它。请看我的更新。
library(shiny)
library(shinythemes)
# Define UI for application that draws a histogram
ui <- fluidPage(
tags$head(tags$link(rel = "stylesheet", href = "https://use.fontawesome.com/releases/v5.8.2/css/all.css"),
tags$link(rel = "stylesheet", href = "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css"),
tags$link(rel = "stylesheet", href = "https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.8.11/css/mdb.min.css")),
navbarPage("MyApp",
theme = shinytheme("flatly"),
tabPanel("Test")),
tags$footer(HTML("
<!-- Footer -->
<footer class='page-footer font-large indigo'>
<!-- Copyright -->
<div class='footer-copyright text-center py-3'>© 2018 Copyright:
<a href='https://mdbootstrap.com/education/bootstrap/'> MDBootstrap.com</a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->")))
# Define server logic required to draw a histogram
server <- function(input, output,session) {}
# Run the application
shinyApp(ui = ui, server = server)