{% extends 'keylighter.html.twig' %}
{% set showForm = true %}
{% set current  = 'showcase' %}

{% import _self as macros %}

{% block content %}
    {% for snippet in snippets %}
        <div class="snippet">
            <h1>
                <a href="{{ url('snippet_show', { snippet: snippet.id }) }}">{{ snippet.title|default('untitled') }}</a>
            </h1>
            <pre class="keylighter">{{ snippet.code|highlight(snippet.language) }}</pre>
            <aside>
                <span class="entry">
                    <span class="label"><i class="{{ fa('code') }}"></i></span>
                    {{ snippet.language }}
                </span>

                <span class="float-right entry">
                    <span class="label"><i class="{{ fa('hashtag') }}"></i></span>
                    <a href="{{ url('snippet_show', { snippet: snippet.id }) }}">{{ snippet.id }}</a>
                </span>
            </aside>
        </div>
    {% endfor %}
{% endblock %}
