2023-04-03 23:44:13 +02:00
|
|
|
{% extends 'base/base.html.twig' %}
|
|
|
|
|
2023-04-05 00:31:41 +02:00
|
|
|
{% block title %}Snip {{ snip }}{% endblock %}
|
|
|
|
|
2023-04-03 23:44:13 +02:00
|
|
|
{% block body %}
|
2023-04-05 00:31:41 +02:00
|
|
|
<a href="{{ path('snip_index') }}" class="btn btn-primary">
|
|
|
|
<i class="fa fa-arrow-left"></i> Back
|
|
|
|
</a>
|
|
|
|
{% if is_granted('edit', snip) %}
|
|
|
|
<a class="btn btn-warning" href="{{ path('snip_edit', {snip: snip.id}) }}">
|
|
|
|
<i class="fa fa-pencil" aria-hidden="true"></i> Edit
|
|
|
|
</a>
|
2023-12-18 01:26:44 +01:00
|
|
|
<a class="btn btn-info" href="{{ path('version_index', {snip: snip.id}) }}">
|
|
|
|
<i class="fa fa-history" aria-hidden="true"></i> Versions
|
2023-04-05 22:46:37 +02:00
|
|
|
</a>
|
2023-04-06 20:46:30 +02:00
|
|
|
<a href="{{ path('snip_delete', {snip: snip.id}) }}" class="btn btn-danger">
|
|
|
|
<i class="fa fa-trash"></i> Delete
|
|
|
|
</a>
|
2023-04-05 00:31:41 +02:00
|
|
|
{% endif %}
|
|
|
|
<a href="{{ path('snip_raw', {snip: snip.id}) }}" class="btn btn-danger">
|
|
|
|
<i class="fa fa-eye"></i> Raw
|
|
|
|
</a>
|
|
|
|
<br><br>
|
2023-04-04 23:23:53 +02:00
|
|
|
<div class="card" style="width: 100%;">
|
|
|
|
<h4 class="card-header">
|
2023-04-05 00:02:47 +02:00
|
|
|
{{ include('snip/badge.html.twig', {snip: snip}) }}
|
2023-12-12 21:35:35 +01:00
|
|
|
{{ snip }} <small class="text-muted">#{{ snip.id }}</small>
|
2023-04-04 23:23:53 +02:00
|
|
|
</h4>
|
|
|
|
<div class="card-body">
|
2023-04-06 22:50:54 +02:00
|
|
|
{{ content|raw }}
|
2023-04-04 23:23:53 +02:00
|
|
|
</div>
|
2023-12-18 01:26:44 +01:00
|
|
|
<div class="card-footer">
|
|
|
|
<p class="card-text text-muted">
|
|
|
|
Current version: {{ activeVersion }}
|
|
|
|
{% if activeVersion == latestVersion %}(latest){% endif %}
|
|
|
|
</p>
|
|
|
|
</div>
|
2023-04-04 23:23:53 +02:00
|
|
|
</div>
|
2023-04-06 20:30:11 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block css %}
|
|
|
|
{{ parent() }}
|
|
|
|
<link rel="stylesheet"
|
|
|
|
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css">
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block js %}
|
|
|
|
{{ parent() }}
|
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
|
2023-04-07 18:45:43 +02:00
|
|
|
<script>
|
|
|
|
const codeBlocks = document.querySelectorAll('code.hljs');
|
|
|
|
|
|
|
|
codeBlocks.forEach((block) => {
|
|
|
|
hljs.highlightElement(block);
|
|
|
|
});
|
|
|
|
</script>
|
2023-04-03 23:44:13 +02:00
|
|
|
{% endblock %}
|