customizing slide layouts in slidify
Asked Answered
O

1

7

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

Overindulge answered 6/3, 2013 at 22:34 Comment(0)
T
10

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
Tomchay answered 7/3, 2013 at 2:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.