PoC integration
This commit is contained in:
parent
874fdf85a2
commit
06ade77fce
7 changed files with 150 additions and 0 deletions
22
digitalglarus/templates/glarus_blog/includes/blog_item.html
Normal file
22
digitalglarus/templates/glarus_blog/includes/blog_item.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{% load i18n thumbnail %}
|
||||
|
||||
<article id="post-{{ post.slug }}" class="post-item">
|
||||
<header>
|
||||
<h3><a href="{% url 'digitalglarus:blog-detail' post.slug %}">{{ post.title }}</a></h3>
|
||||
{% block blog_meta %}
|
||||
{% include "glarus_blog/includes/blog_meta.html" %}
|
||||
{% endblock %}
|
||||
</header>
|
||||
{% if image and post.main_image %}
|
||||
<div class="blog-visual">
|
||||
{% thumbnail post.main_image post.thumbnail_options.size crop=post.thumbnail_options.crop upscale=post.thumbnail_options.upscale subject_location=post.main_image.subject_location 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">
|
||||
{{ post.abstract| safe }}
|
||||
</div>
|
||||
<footer class="read-more">
|
||||
<a href="{% url 'digitalglarus:blog-detail' post.slug %}">{% trans "read more" %} »</a>
|
||||
</footer>
|
||||
</article>
|
||||
26
digitalglarus/templates/glarus_blog/includes/blog_meta.html
Normal file
26
digitalglarus/templates/glarus_blog/includes/blog_meta.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{% load i18n thumbnail %}
|
||||
|
||||
<ul class="post-detail">
|
||||
{% if post.author %}
|
||||
<li>
|
||||
{% trans "by" %} <a href="{% url 'djangocms_blog:posts-author' post.author.get_username %}">{% if post.author.get_full_name %}{{ post.author.get_full_name }}{% else %}{{ post.author }}{% endif %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
{{ post.date_published|date:"DATE_FORMAT" }}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="post-detail tags">
|
||||
{% if post.categories.exists %}
|
||||
{% for category in post.categories.all %}
|
||||
{% if category.slug %}
|
||||
<li class="category_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:posts-category' category=category.slug %}" class="blog-categories-{{ category.count }}">{{ category.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if post.tags.exists %}
|
||||
{% for tag in post.tags.all %}
|
||||
<li class="tag_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:posts-tagged' tag=tag.slug %}" class="blog-tag blog-tag-{{ tag.count }}">{{ tag.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
Loading…
Add table
Add a link
Reference in a new issue