keylighter/templates/demo/showcase.html.twig
2020-04-11 21:55:18 +02:00

28 lines
986 B
Twig
Executable File

{% 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 %}