{% from 'util.jinja2' import render_markdown %}
{% if this.slide_layout == "title-slide" %}
  <section class="title" data-background-color="white" {% if this.background_image %} data-background-image="{{ this.background_image|asseturl }}" data-background-position="right bottom" data-background-size="3em" {% endif %} >
    <h3>{{ render_markdown(this.title) }}</h3>
    <hr class="dark" />
    {% if this.subtitle %}
      <h4>{{ render_markdown(this.subtitle) }}</h4>
    {% endif %}
    {% if this.author %}
      <h5>{{ this.author }}</h5>
    {% endif %}
  </section>
{% elif this.slide_layout == "image_left" %}
  <section class="slide-image-left" {% if this.background != "white" %} data-background-color="{{ this.background }}" {% else %} data-background-color="white" {% endif %} >
    <h2>{{ render_markdown(this.title) }}</h2>
    {% if this.image %}
        <div style="display: inline-block; vertical-align: top; width: 46%; float: left;"><img data-src="{{ this.image|url }}"></div>
    {% endif %}
    <div style="display: inline-block; width: 46%;">
        {{ render_markdown(this.description) }}
    </div>
  </section>
{% elif this.slide_layout == "image_right" %}
  <section class="slide-image-right" {% if this.background != "white" %} data-background-color="{{ this.background }}" {% else %} data-background-color="white" {% endif %} >
    <h2>{{ render_markdown(this.title) }}</h2>
    <div style="display: inline-block; width: 46%;">
        {{ render_markdown(this.description) }}
    </div>
    {% if this.image %}
        <div style="display: inline-block; vertical-align: top; width: 46%; float: right;"><img data-src="{{ this.image|url }}"></div>
    {% endif %}
  </section>
{% else %}
  <section {% if this.background != "white" %} data-background-color="{{ this.background }}" {% else %} data-background-color="white" {% endif %} >
    <h2>{{ render_markdown(this.title) }}</h2>
    {{ render_markdown(this.description) }}
    {% if this.image %}
        <img data-src="{{ this.image|url }}">
    {% endif %}
  </section>
{% endif %}
