Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

customizing slide layouts in slidify

Tags:

slidify

I am interested in using different layouts for different slides within my index.Rmd file. after copying the template provided here and below, I created a .html file in my assets/layouts folder.

<slide class="{{ class }}" id="{{ id }}">
  <hgroup>
    {{{ header }}}
  </hgroup>
  <article>
    <hr noshade size=4 color='red'>  
    {{{ content }}}  
    <div class='left' style='float:left;width:48%'>
     {{{ left }}}
    </div>    
    <div class='right' style='float:right;width:48%'>
     {{{ right }}}
    </div>
  </article>
</slide>

having got this far, it remains unclear:

1) why the slides in my deck are blank and not displaying any of the below:

---
#testing
hello

*** left

- point a
- point b
- point c

*** right

- point a
- point b
- point c

2) how to "call" the custom layout from my assets folder for an individual slide and not the whole deck

like image 660
Sally Avatar asked Mar 06 '13 22:03

Sally


1 Answers

You can specify a layout for a slide as metadata. For example, if you saved the layout you describe in the question as twocol.html in assets/layouts, then you can specify the layout in the slide level metadata. A & specifies a layout, while a . specifies a class and a # specifies an id. You are also free to define your own custom metadata as key:value pairs.

--- &twocol

## Two Columns

*** left

- point a
- point b
- point c

*** right

- point a
- point b
- point c
like image 100
Ramnath Avatar answered Oct 06 '22 04:10

Ramnath