Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to control the background color of the first slidify slide?

Tags:

r

slidify

As a slidifiy newbee, I don't understand why the first slide has a pale green background and all the other slides have white backgrounds.

The example "Test for Slidify" at http://www.rpubs.com/ also shows this pale green first slide.

How can I control the background color of this first slidify slide?

like image 273
Earl F Glynn Avatar asked Jan 02 '14 02:01

Earl F Glynn


People also ask

How do I change the background of just one slide in PowerPoint?

On the View menu, click Normal, and then in the navigation pane, click the slide or slides that you want to change. On the Design tab, in Customize, click Format Background. Click Fill, and then click the Solid, Gradient, Picture or Texture, or Pattern option. Choose the background fills that you want.

How do I change the background color of a PowerPoint Design?

Select your first slide, and then on the Design tab, select the down arrow in the Variants group. Select Colors, Fonts, Effects, or Background Styles and choose from built-in options or customize your own.


1 Answers

The css defining the title slide is contained in libraries/frameworks/io2012/slidify.css. Here is the part that controls the title slide. You can modify it and add it to your Rmd file directly to override default styles.

.title-slide {
  background-color: #CBE7A5; /* #EDE0CF; ; #CA9F9D*/
}

.title-slide hgroup > h1{
 font-family: 'Oswald', 'Helvetica', sanserif; 
}

.title-slide hgroup > h1, 
.title-slide hgroup > h2 {
  color: #535E43 ;  /* ; #EF5150*/
}

To do this from within an .Rmd file, one would add the following after the YAML front matter section of index.Rmd. This applies a white background to the title slide:

---
title       : title slide bg change example
author      : Ramnath
...
mode        : selfcontained # {standalone, draft}
knit        : slidify::knito2slides
---

<style>
.title-slide {
  background-color: #FFFFFF; /* #EDE0CF; ; #CA9F9D*/
}
</style>

Remember to re-run slidify("index.Rmd") to apply the change.

like image 197
Ramnath Avatar answered Sep 22 '22 18:09

Ramnath