【问题标题】:How to add footer in page generated using Shiny Flexdashboard如何在使用 Shiny Flexdashboard 生成的页面中添加页脚
【发布时间】:2017-09-16 13:57:38
【问题描述】:

我有以下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>"))   

【问题讨论】:

    标签: r shiny r-markdown flexdashboard


    【解决方案1】:

    您可以将页脚的 HTML 放在 footer.html 文件中,并在您的降价中使用 after_body 将其包含在您的 flexdashboard 的 body 之后:

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

    【讨论】:

    • 我尝试将footer.html 放入www 中。但我收到错误消息pandoc: footer.html: openFile: does not exist (No such file or directory) Error: pandoc document conversion failed with error 1 Execution halted
    • 不需要放在www文件夹中,它必须和.Rmd文件在同一个文件夹中。
    • 在flexdashboard的.sidebar的固定位置(页面底部上方10px)添加页脚怎么样?
    【解决方案2】:

    你可以试试这个:

    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;")
    

    【讨论】:

      猜你喜欢
      • 2014-12-26
      • 1970-01-01
      • 2017-07-21
      • 2014-01-06
      • 2012-11-28
      • 1970-01-01
      • 2016-11-03
      相关资源
      最近更新 更多