ausglamr/blogs/templates/browse/articles.html

35 lines
1.3 KiB
HTML

{% extends "layout.html" %}
{% block feed %}
<link href="blog-articles/feed" type="application/atom+xml" rel="alternate" title="Aus GLAMR Blogs" />
{% endblock %}
{% block content %}
{% for post in latest %}
<div class="card">
<div class="card-title">
<a href="{{ post.url }}"><h4>{{ post.title }}</h4></a>
<div class="meta">
{% if post.author_name %}
<span class="author_name">{{ post.author_name }}</span> |
{% endif %}
<span class="blog_title">{{ post.blog.title }}</span>
<div>
{% for tag in post.tags.all %}
<a href="{% url 'browse' %}?q={{ tag.name|urlencode }}"><span class="badge">{{ tag.name }}</span></a>
{% endfor %}
</div>
</div>
</div>
{% if post.description %}
<div class="card-body">
{% autoescape off %}
<p>{{ post.description|truncatewords_html:60 }}</p>
{% endautoescape %}
</div>
{% endif %}
</div>
{% empty %}
<p>Oh no! There are no articles available. Try checking out <a href="{% url 'newsletter-editions' %}">some newsletter editions</a>.</p>
{% endfor %}
{% endblock %}