digitalglarus: styling on post details and list.
Signed-off-by: rscnt <rascnt@gmail.com>
This commit is contained in:
parent
c10fea0169
commit
023a58a7d7
2 changed files with 36 additions and 29 deletions
|
@ -8,18 +8,26 @@
|
||||||
|
|
||||||
{% block content_blog %}{% spaceless %}
|
{% block content_blog %}{% spaceless %}
|
||||||
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
||||||
<header>
|
{% if post.main_image_id %}
|
||||||
<h2>{{ post.title }}</h2>
|
<div class="blog-visual">
|
||||||
|
{% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_options.upscale subject_location=post.main_image.subject_location as thumb %}
|
||||||
|
<img src="{{ post.main_image.url }}" alt="{{ post.main_image.default_alt_text }}" class="img-responsive img-border img-full" />
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<header class="text-center">
|
||||||
|
<h2>
|
||||||
|
<a href="{% url 'digitalglarus:blog-detail' post.slug %}">
|
||||||
|
{{ post.title }}
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
|
<small>
|
||||||
|
{{ post.date_created }}
|
||||||
|
</small>
|
||||||
|
</h2>
|
||||||
{% block blog_meta %}
|
{% block blog_meta %}
|
||||||
{% include "glarus_blog/includes/blog_meta.html" %}
|
{% include "glarus_blog/includes/blog_meta.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</header>
|
</header>
|
||||||
{% if post.main_image_id %}
|
|
||||||
<div class="blog-visual">
|
|
||||||
{% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_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 %}
|
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
<div class="blog-content">{% render_placeholder post.content %}</div>
|
<div class="blog-content">{% render_placeholder post.content %}</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -7,18 +7,17 @@
|
||||||
<section class="blog-list">
|
<section class="blog-list">
|
||||||
{% block blog_title %}
|
{% block blog_title %}
|
||||||
<header>
|
<header>
|
||||||
<h2>
|
<hr></hr>
|
||||||
{% if author %}{% trans "Articles by" %} {{ author.get_full_name }}
|
<h2 class="intro-text text-center">
|
||||||
{% elif archive_date %}{% trans "Archive" %} – {% if month %}{{ archive_date|date:'F' }} {% endif %}{{ year }}
|
Digital Glarus <b>Blog</b>
|
||||||
{% elif tagged_entries %}{% trans "Tag" %} – {{ tagged_entries|capfirst }}
|
|
||||||
{% elif category %}{% trans "Category" %} – {{ category }}{% endif %}
|
|
||||||
</h2>
|
</h2>
|
||||||
|
<hr></hr>
|
||||||
</header>
|
</header>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% for post in post_list %}
|
{% for post in post_list %}
|
||||||
{% include "glarus_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
|
{% include "glarus_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<p class="blog-empty">{% trans "No article found." %}</p>
|
<p class="blog-empty text-center lead">{% trans "No article found." %}</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if author or archive_date or tagged_entries %}
|
{% if author or archive_date or tagged_entries %}
|
||||||
<p class="blog-back"><a href="{% url 'djangocms_blog:posts-latest' %}">{% trans "Back" %}</a></p>
|
<p class="blog-back"><a href="{% url 'djangocms_blog:posts-latest' %}">{% trans "Back" %}</a></p>
|
||||||
|
|
Loading…
Reference in a new issue