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">
|
||||||
{% block blog_meta %}
|
{% 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 %}
|
||||||
{% include "glarus_blog/includes/blog_meta.html" %}
|
<img src="{{ post.main_image.url }}" alt="{{ post.main_image.default_alt_text }}" class="img-responsive img-border img-full" />
|
||||||
{% endblock %}
|
</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 %}
|
||||||
|
{% include "glarus_blog/includes/blog_meta.html" %}
|
||||||
|
{% 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,35 +7,34 @@
|
||||||
<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 }}
|
</h2>
|
||||||
{% elif category %}{% trans "Category" %} – {{ category }}{% endif %}
|
<hr></hr>
|
||||||
</h2>
|
|
||||||
</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>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_paginated %}
|
{% if is_paginated %}
|
||||||
<nav class="{% firstof css_grid instance.css_grid %} pagination">
|
<nav class="{% firstof css_grid instance.css_grid %} pagination">
|
||||||
{% if page_obj.has_previous %}
|
{% if page_obj.has_previous %}
|
||||||
<a href="?{{ view.page_kwarg }}={{ page_obj.previous_page_number }}">« {% trans "previous" %}</a>
|
<a href="?{{ view.page_kwarg }}={{ page_obj.previous_page_number }}">« {% trans "previous" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="current">
|
<span class="current">
|
||||||
{% trans "Page" %} {{ page_obj.number }} {% trans "of" %} {{ paginator.num_pages }}
|
{% trans "Page" %} {{ page_obj.number }} {% trans "of" %} {{ paginator.num_pages }}
|
||||||
</span>
|
</span>
|
||||||
{% if page_obj.has_next %}
|
{% if page_obj.has_next %}
|
||||||
<a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">{% trans "next" %} »</a>
|
<a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">{% trans "next" %} »</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
|
|
Loading…
Reference in a new issue