41 lines
2.0 KiB
HTML
41 lines
2.0 KiB
HTML
{% extends "djangocms_blog/base.html" %}
|
|
{% load i18n thumbnail cms_tags %}
|
|
{% load url from future %}
|
|
|
|
{% block content_blog %}{% spaceless %}
|
|
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
|
<header>
|
|
<h2>{% render_model post "title" %}</h2>
|
|
{% block blog_meta %}
|
|
<ul class="post-detail">
|
|
<li>
|
|
{% trans "by" %} <a href="{% url 'djangocms_blog:author-posts' post.author.username %}">{{ post.author.get_full_name }}</a>
|
|
</li>
|
|
<li>
|
|
{{ post.date_published|date:"M d, Y" }}
|
|
</li>
|
|
</ul>
|
|
<ul class="post-detail tags">
|
|
{% if post.categories.exists %}
|
|
{% for category in post.categories.all %}
|
|
<li class="category_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:category-posts' category=category.slug %}" class="blog-categories-{{ category.count }}">{{ category.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if post.tags.exists %}
|
|
{% for tag in post.tags.all %}
|
|
<li class="tag_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:tagged-posts' tag=tag.slug %}" class="blog-tag blog-tag-{{ tag.count }}">{{ tag.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</ul>
|
|
{% endblock %}
|
|
</header>
|
|
{% if post.main_image_id %}
|
|
<div class="blog-visual">
|
|
{% thumbnail post.main_image post.thumbnail_options.size crop=post.thumbnail_options.crop upscale=post.thumbnail_options.upscale as thumb %}
|
|
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
|
|
</div>
|
|
{% endif %}
|
|
<div class="blog-lead">{% render_model post "abstract" "abstract" %}</div>
|
|
<div class="blog-content">{% render_placeholder post.content %}</div>
|
|
</article>
|
|
{% endspaceless %}{% endblock content_blog %} |