Ricardo Pietrobon
Ricardo Pietrobon

Reputation: 858

slidify layouts: title-only, title-and-body, title-and-two-cols, title caption, and blank

I am trying to set the layout for the types of slides specified under http://goo.gl/ViWWl9 , but i can't get the syntax right. Tried a few things and searched all over, but no luck so far. Any tips on how to get this to work?

thanks

Upvotes: 2

Views: 824

Answers (1)

Ramnath
Ramnath

Reputation: 55695

Slide layouts are mustache templates that can make use of objects returned by the parser. You can find a list of objects returned by the parser here.

Coming to the question raised, here is how one would go about building the layouts for the slides.

Title Only

<slide class="segue nobackground {{ slide.class }}" id="{{ slide.id }}">
  <hgroup>
    {{{ slide.header }}}
  </hgroup>
</slide>

The two column layout inherits from the parent layout, and the column widths are configurable.

Two Columns

---
layout: slide
replace: slide.content
---
{{{ slide.content }}}  
<div class='left' style='float:left;width:{{{ slide.left.w }}}'>
 {{{ slide.left.html }}}
</div>    
<div class='right' style='float:right;width:{{{ slide.right.w }}}'>
 {{{ slide.right.html }}}
</div>

You can write any arbitrary layout making use of what the parser returns. It is also easy to define any arbitrary property that you want to make use of, and pass it along to the parser as key: value pairs along with the slide separator.

Upvotes: 2

Related Questions