2017-10-12 95 views
2

在该R降价使用Flexdashboard模板的Bootswatch主题颜色唐的似乎匹配什么所示的Bootswatch网站Rmarkdown交互式文档Bootswatch主题颜色不正确

例如在年代,用flatly主题

--- 
title: "Test Dashboard" 
output: 
    flexdashboard::flex_dashboard: 
    theme: flatly 
runtime: shiny 
--- 

我得到了什么是这样的:在rmarkdown flexdashboard主题 断然主题

enter image description here

的断然主题看起来像Bootswatch什么是这样的:从Bootswatch

enter image description here

断然主题有一些设置,我需要指定,以获得正确的色彩?或者对于Rmarkdown Bootswatch主题设置的外观有所不同?

+0

https://github.com/rstudio/flexdashboard/issues/126。您可能也想自定义这个https://stackoverflow.com/questions/44305381/flexdashboard-change-tittle-bar-color –

回答

1

添加以下JS块解决了这个问题:

```{js} 
$('.navbar-inverse').removeClass('navbar-inverse').addClass('navbar- 
default'); 
```