You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

72 lines
2.9 KiB

{% load i18n apphooks_config_tags cms_tags sekizai_tags staticfiles thumbnail %}
{% load url from future %}
<article class="aldryn-newsblog-article{% if article.is_featured %} aldryn-newsblog-featured{% endif %}{% if not article.published %} unpublished{% endif %}{% if article.future %} future{% endif %}">
{% block newsblog_visual %}
{% if article.featured_image_id %}
<p class="visual">
{% if not detail_view %}
<a href="{{ article.get_absolute_url }}">
{% endif %}
<img src="{% thumbnail article.featured_image.image 800x450 crop subject_location=article.featured_image.subject_location %}" alt="{{ article.featured_image.alt }}" class="img-responsive">
{% if not detail_view %}
</a>
{% endif %}
</p>
{% endif %}
{% endblock newsblog_visual %}
{% block newsblog_categories %}
{% if article.categories %}
<p class="category">
{% for category in article.categories.all %}
<a href="{% namespace_url "article-list-by-category" category.slug namespace=namespace default='' %}">{{ category.name }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% endblock newsblog_categories %}
{% block newsblock_title %}
<h2>
{% if not detail_view %}
<a href="{% namespace_url "article-detail" article.slug namespace=namespace default='' %}">{% render_model article "title" %}</a>
{% else %}
{% render_model article "title" %}
{% endif %}
</h2>
{% endblock newsblock_title %}
{% block newsblog_meta %}
{% if not detail_view %}
<div class="lead">
{% render_model article "lead_in" %}
</div>
{% endif %}
{% include "aldryn_newsblog/includes/author.html" with author=article.author %}
{% if article.tags and detail_view %}
<p class="tags">
{% for tag in article.tags.all %}
<a href="{% namespace_url safe "article-list-by-tag" tag.slug namespace=namespace default='' %}">{{ tag.name }}</a>
{% endfor %}
</p>
{% endif %}
{% if detail_view %}
<div class="lead">
{% render_model article "lead_in" %}
</div>
{% endif %}
{% endblock newsblog_meta %}
{% block newsblog_content %}
{% if detail_view %}
<div class="content">
{% render_placeholder article.content language placeholder_language %}
</div>
{% endif %}
{% endblock newsblog_content %}
</article>
{% addtoblock "css" %}<link rel="stylesheet" href="{% static 'css/aldryn-newsblog/article.css' %}">{% endaddtoblock %}