简体   繁体   English

滑动布局:仅标题、标题和正文、标题和两列、标题标题和空白

[英]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.我正在尝试为http://goo.gl/ViWWl9下指定的幻灯片类型设置布局,但我无法获得正确的语法。 Tried a few things and searched all over, but no luck so far.尝试了一些东西并四处搜索,但到目前为止没有运气。 Any tips on how to get this to work?有关如何使其工作的任何提示?

thanks谢谢

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.定义您想要使用的任意属性也很容易,并将其作为键:值对和幻灯片分隔符传递给解析器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM