codigocomentado/templates/post.html.tera

32 lines
887 B
Plaintext

{% extends "base" %}
{% block title %}CódigoComentado - {{post.title}}{% endblock title %}
{% block extracss %}
<link href="/static/css/post.css" rel="stylesheet"/>
{% if post.content is containing("<code>") %}
<link href="/static/css/highlightjs/agate.css" rel="stylesheet"/>
{% endif %}
{% endblock extracss %}
{% block content %}
<h1 class="title"><strong>Title: </strong>{{ post.title }}</h1>
<span class="date"><strong>Date: </strong>{{ post.created_at | date(format="%Y-%m-%d") }}</span>
<article>
<strong>Content:</strong>
{{ post.content | safe }}
</article>
<div class="comments">
<h1><strong></strong>Comentarios</h1>
</div>
{% endblock content %}
{% block extrajs %}
{% if post.content is containing("<code>") %}
<script src="/static/js/highlight.pack.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
{% endif %}
{% endblock extrajs %}