{% import theme('_menu.html') as menu with context -%}
{% extends theme("base.html") %}

{% block content %}
<div class="large-8 columns">
    {% for content in contents %}
      <h2><a href="{{ content.get_absolute_url() }}">{{ content.title }}</a></h2>

        {% if content.summary %}
           <p>{{ content.summary|truncate(255)|safe() }}</p>
        {% endif %}

        {% if content.embed_code %}
          {{ content.embed_code|safe() }}
        {% endif %}

        {% if content.image_url %}
          <p><img src="{{ content.image_url }}" /><p>
        {% endif %}

      <p>
        {{ content.created_at.strftime('%H:%M %Y-%m-%d') }} |
        {% with total=content.comments|length %}
            {{ total }} comment {%- if total > 1 %}s{%- endif -%}
        {% endwith %}
      </p>
    {% endfor %}
</div>

<div class="large-4 columns">
    <div class="channel-menu">
    <h3>Channels</h3>
        {{ menu.build_nodes(nodes=channels) }}
    </div>
</div>
{% endblock %}