{% load snipt_tags %}

<article class="group {% if detail %}detail{% endif %}">
    {% if snipt.title != 'Work' %}
        <div class="gutter">
            <a href="{{ snipt.get_full_absolute_url }}" {% if detail %}class="detail"{% endif %}>
                <time pubdate datetime="{{ snipt.publish_date|date:'c' }}">
                    <span class="id">
                        #{{ snipt.id }}
                    </span>
                    <span class="mon-day">
                        {{ snipt.publish_date|date:'M' }} {{ snipt.publish_date|date:'j' }}
                    </span>
                    <span class="year">{{ snipt.publish_date|date:'Y' }}</span>
                </time>
            </a>
        </div>
    {% endif %}
    <div class="content-inner">
        <h1><a href="{{ snipt.get_full_absolute_url }}">{% firstof snipt.title 'Untitled' %}</a></h1>
        <div class="post-content autumn">
            {% if snipt.lexer == 'markdown' %}
                <div class="markdown">
                    {% if detail %}
                        {{ snipt.stylized|safe }}
                    {% else %}
                        {{ snipt.stylized|truncatewords_html:70|safe }}
                    {% endif %}
                </div>
            {% else %}
                {% if detail %}
                    {{ snipt.stylized|safe }}
                {% else %}
                    {{ snipt.stylized|truncatewords_html:100|safe }}
                {% endif %}
            {% endif %}
        </div>
    </div>
</article>
