rstudio / flexdashboard

Easy interactive dashboards for R
https://pkgs.rstudio.com/flexdashboard/
Other
816 stars 301 forks source link

Inconsistent theme? #126

Closed nicholaelaw closed 7 years ago

nicholaelaw commented 7 years ago

Hi there, I'm building a website with rmarkdown, with a few pages built using flexdashboard. In my tinkering, I find it odd that while vanilla rmarkdown::html_document uses navbar-default class for the navbar, flexdashboard uses navbar-inverse instead.

Is there a practical reason for this, or is it just a design choice? If it is a design choice, is there a way to force flexdashboard to use navbar-default, or html_document to use navbar-inverse? I want a unified look for my website, and I really don't want to write more whacky CSS overrides.

jjallaire commented 7 years ago

Yes, it's a design choice based on the notion that navbar-inverse looks better for dashboards. For rmarkdown you can change to inverse this way:

name: "my-website"
navbar:
  title: "My Website"
  type: inverse

For flexdashboard you'd need a JS chunk that does this:

```js
$('.navbar-inverse').removeClass('navbar-inverse').addClass('navbar-default');
```
nicholaelaw commented 7 years ago

Hmm, thanks. I noticed that none of the themes offered is dark. Perhaps one of the reasons to use inverse themes is to prevent usually bright graphs on dark background?

jjallaire commented 7 years ago

Yeah we haven't supported dark themes b/c they tend to have too much contrast with plots/widgets that have white backgrounds.

On Thu, May 18, 2017 at 6:21 AM, nicholaelaw notifications@github.com wrote:

Hmm, thanks. I noticed that none of the themes offered is dark. Perhaps one of the reasons to use inverse themes is to prevent usually bright graphs on dark background?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rstudio/flexdashboard/issues/126#issuecomment-302363951, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGXx0_RBMo8r8L6trmrKvdlpzhCV4Udks5r7BusgaJpZM4NeuVx .