Blog update
This commit is contained in:
		
					parent
					
						
							
								0d04a18a0d
							
						
					
				
			
			
				commit
				
					
						6b78bac53b
					
				
			
		
					 10 changed files with 162 additions and 145 deletions
				
			
		| 
						 | 
				
			
			@ -18,9 +18,6 @@
 | 
			
		|||
      <ul class="nav navbar-nav">
 | 
			
		||||
	{% show_menu 0 0 0 1 %}
 | 
			
		||||
	{% show_menu_below_id "digital-glarus-page" 0 %}
 | 
			
		||||
	<li>
 | 
			
		||||
	  <a href="{% url 'digitalglarus:blog' %}">Blog</a>
 | 
			
		||||
	</li>
 | 
			
		||||
      </ul>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- /.navbar-collapse -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,21 +1,37 @@
 | 
			
		|||
{% extends "djangocms_blog/base.html" %}
 | 
			
		||||
{% extends "glarus_blog/base.html" %}
 | 
			
		||||
{% load i18n thumbnail cms_tags %}
 | 
			
		||||
{% load url from future %}
 | 
			
		||||
 | 
			
		||||
{% block meta_description %}{{ post.meta_description }}{% endblock meta_description %}
 | 
			
		||||
{% block meta_keywords %}{{ post.meta_keywords }}{% endblock meta_keywords %}
 | 
			
		||||
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
 | 
			
		||||
{% block title %}{% page_attribute "page_title" %} - {{ post.get_title }}{% endblock %}
 | 
			
		||||
<!-- page header -->
 | 
			
		||||
{% block base_header %}
 | 
			
		||||
{% include "djangocms_blog/_header_post_detail.html"  %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
<!-- page header  -->
 | 
			
		||||
{% block content_blog %}
 | 
			
		||||
<article>
 | 
			
		||||
  {% if use_placeholder %}
 | 
			
		||||
  <div class="blog-content">{% render_placeholder post.content %}</div>
 | 
			
		||||
  {% else %}
 | 
			
		||||
  <div class="blog-content">{% render_model post "post_text" "post_text" %}</div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
{% block canonical_url %}
 | 
			
		||||
    <link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
 | 
			
		||||
{% block title %}{{ post.get_title }}{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content_blog %}{% spaceless %}
 | 
			
		||||
    <article id="post-{{ post.slug }}" class="post-item post-detail">
 | 
			
		||||
    {% 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="{{ post.main_image.url }}" alt="{{ post.main_image.default_alt_text }}"
 | 
			
		||||
                 class="img-responsive img-full"/>
 | 
			
		||||
        </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    <header class="text-center">
 | 
			
		||||
        <hr></hr>
 | 
			
		||||
        <h2 class="text-center intro-text">
 | 
			
		||||
            <a href="{% url 'djangocms_blog:post-detail' post.slug %}" class="post-title center-block">
 | 
			
		||||
                <b>{{ post.title }}</b>
 | 
			
		||||
            </a>
 | 
			
		||||
            <small>
 | 
			
		||||
                {{ post.date_created }}
 | 
			
		||||
            </small>
 | 
			
		||||
        </h2>
 | 
			
		||||
        <hr></hr>
 | 
			
		||||
{#        {% block blog_meta %}#}
 | 
			
		||||
{#             include "glarus_blog/includes/blog_meta.html"#}
 | 
			
		||||
{#        {% endblock %}#}
 | 
			
		||||
    </header>
 | 
			
		||||
{% endspaceless %}
 | 
			
		||||
<div class="digitalglarus-blog-content">{{ post.abstract| safe }}</div>
 | 
			
		||||
</article>
 | 
			
		||||
{% endblock content_blog %}
 | 
			
		||||
{% endblock content_blog %}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,47 +1,35 @@
 | 
			
		|||
{% extends "djangocms_blog/base.html" %}
 | 
			
		||||
{% extends "glarus_blog/base.html" %}
 | 
			
		||||
{% load i18n thumbnail %}{% spaceless %}
 | 
			
		||||
 | 
			
		||||
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
 | 
			
		||||
 | 
			
		||||
{% block content_blog %}
 | 
			
		||||
<section class="blog-list">
 | 
			
		||||
  {% block blog_title %}
 | 
			
		||||
  <header>
 | 
			
		||||
    <h2>
 | 
			
		||||
      {% if author %}{% trans "Articles by" %} {{ author.get_full_name }}
 | 
			
		||||
      {% elif archive_date %}{% trans "Archive" %} – {% if month %}{{ archive_date|date:'F' }} {% endif %}{{ year }}
 | 
			
		||||
      {% elif tagged_entries %}{% trans "Tag" %} – {{ tagged_entries|capfirst }}
 | 
			
		||||
      {% elif category %}{% trans "Category" %} – {{ category }}{% endif %}
 | 
			
		||||
    </h2>
 | 
			
		||||
  </header>
 | 
			
		||||
  {% endblock %}
 | 
			
		||||
  {% for post in post_list %}
 | 
			
		||||
  {% include "djangocms_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
 | 
			
		||||
  {% empty %}
 | 
			
		||||
  <p class="blog-empty">{% trans "No article found." %}</p>
 | 
			
		||||
  {% endfor %}
 | 
			
		||||
  {% if author or archive_date or tagged_entries %}
 | 
			
		||||
  <p class="blog-back"><a href="{% url 'djangocms_blog:posts-latest' %}">{% trans "Back" %}</a></p>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  {% if is_paginated %}
 | 
			
		||||
  <!-- Pager -->
 | 
			
		||||
  <ul class="pager">
 | 
			
		||||
    {% if page_obj.has_previous %}
 | 
			
		||||
    <li class="previous">
 | 
			
		||||
      <a href="?{{ view.page_kwarg }}={{ page_obj.previous_page_number }}">
 | 
			
		||||
	« {% trans "Newer Posts" %}
 | 
			
		||||
      </a>
 | 
			
		||||
    </li>
 | 
			
		||||
    {% block blog_title %}
 | 
			
		||||
    <header>
 | 
			
		||||
    </header>
 | 
			
		||||
    {% endblock %}
 | 
			
		||||
    {% for post in post_list %}
 | 
			
		||||
	{% include "glarus_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
 | 
			
		||||
    {% empty %}
 | 
			
		||||
    <p class="blog-empty text-center lead">{% trans "No article found." %}</p>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
    {% if author or archive_date or tagged_entries %}
 | 
			
		||||
    <p class="blog-back"><a href="{% url 'djangocms_blog:posts-latest' %}">{% trans "Back" %}</a></p>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% if page_obj.has_next %}
 | 
			
		||||
    <li class="next">
 | 
			
		||||
      <a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">
 | 
			
		||||
	{% trans "Older Posts" %} →
 | 
			
		||||
      </a>
 | 
			
		||||
    </li>
 | 
			
		||||
    {% if is_paginated %}
 | 
			
		||||
    <nav class="{% firstof css_grid instance.css_grid %} pagination">
 | 
			
		||||
	{% if page_obj.has_previous %}
 | 
			
		||||
	    <a href="?{{ view.page_kwarg }}={{ page_obj.previous_page_number }}">« {% trans "previous" %}</a>
 | 
			
		||||
	{% endif %}
 | 
			
		||||
	<span class="current">
 | 
			
		||||
	    {% trans "Page" %} {{ page_obj.number }} {% trans "of" %} {{ paginator.num_pages }}
 | 
			
		||||
	</span>
 | 
			
		||||
	{% if page_obj.has_next %}
 | 
			
		||||
	    <a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">{% trans "next" %} »</a>
 | 
			
		||||
	{% endif %}
 | 
			
		||||
    </nav>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
  </ul>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
</section>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% endspaceless %}
 | 
			
		||||
{% endspaceless %}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue