如何在使用Shiny Flexdashboard生成的页面中添加页脚

时间:2017-04-20 05:31:32

标签: r shiny r-markdown flexdashboard

我有以下RMarkdown FlexDashboard文件:

---
title: "Some title"
runtime: shiny
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
---

```{r setup, include=FALSE}
library(flexdashboard)
```

Column {data-width=650}
-----------------------------------------------------------------------

### Some chart

```{r}
plot(faithful)
```

Column {data-width=650}
-----------------------------------------------------------------------

### Chart 2

```{r}
```   

### Chart 3

```{r}
```

如何使用以下内容放置跨页面的页脚?

tags$div( HTML("<footer><small>&copy; Copyright 2017, MyCompany Co.,Ltd</small></footer>"))   

enter image description here

2 个答案:

答案 0 :(得分:7)

您可以将页脚的HTML放在footer.html文件中,并在降价时使用bodyafter_body的flexdashboard中包含它:

---
title: "Some title"
runtime: shiny
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    includes:
      after_body: footer.html
---

答案 1 :(得分:0)

你可以试试这个:

tags$footer( HTML("<footer><small><b>&copy; Manoj Kumar 2021.</b></small></footer>"), align="left", style="position:absolute; bottom:0; width:95%; height:50px; color: #000000; padding: 0px; background-color: transparent; z-index: 1000;")