updated ungleich
This commit is contained in:
parent
1d18894b60
commit
949ee20a8a
15 changed files with 258 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
TEMPLATES = {
|
||||
'blog.html': _('Blog'),
|
||||
'page.html': _('Page'),
|
||||
}
|
||||
# TEMPLATES = {
|
||||
# 'blog_u.html': _('Blog'),
|
||||
# 'page.html': _('Page'),
|
||||
# }
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<!-- Page Header -->
|
||||
<!-- Set your background image for this header on the line below. -->
|
||||
<header class="intro-header"
|
||||
{% if request.current_page.ungleichpage %}
|
||||
style="background-image: url('{{ request.current_page.ungleichpage.image.url }}');"
|
||||
{% if request.current_page.pagemeta.image.url %}
|
||||
style="background-image: url('{{ request.current_page.pagemeta.image.url }}');"
|
||||
{% else %}
|
||||
style="background-image: url('{% static 'blog.ungleich.ch/img/home-bg.jpg' %}');"
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "ungleichch/base.html" %}
|
||||
{% extends "base_ungleich.html" %}
|
||||
{% block base_content %}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
{% extends "cms/ungleichch/base.html" %}
|
||||
{% extends "base_ungleich.html" %}
|
||||
{% block base_content %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "ungleichch/base.html" %}
|
||||
{% extends "base_ungleich.html" %}
|
||||
{% load cms_tags %}
|
||||
{% block base_content %}
|
||||
{% placeholder "page_content" %}
|
||||
|
|
|
|||
12
ungleich/templates/ungleich/djangocms_blog/base.html
Normal file
12
ungleich/templates/ungleich/djangocms_blog/base.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{% extends 'cms/ungleichch/blog_ungleich.html' %}
|
||||
{#{% extends CMS_TEMPLATE %}#}
|
||||
{% block meta %}
|
||||
{% if meta %}
|
||||
{% include "meta_mixin/meta.html" %}
|
||||
{% endif %}
|
||||
{% endblock meta %}
|
||||
{% block content %}
|
||||
<div class="app app-blog span8">
|
||||
{% block content_blog %}{% endblock %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{% load i18n thumbnail cms_tags %}
|
||||
|
||||
<div class="post-preview">
|
||||
<a href=" {{ post.get_absolute_url }} ">
|
||||
<h2 class="post-title">
|
||||
{{ post.title }}
|
||||
</h2>
|
||||
<h3 class="post-subtitle">
|
||||
{% if not TRUNCWORDS_COUNT %}
|
||||
{% render_model post "abstract" %}
|
||||
{% else %}
|
||||
{% render_model post "abstract" "" "" 'truncatewords_html:TRUNCWORDS_COUNT' %}
|
||||
{% endif %}
|
||||
</h3>
|
||||
</a>
|
||||
<p class="post-meta">
|
||||
Posted
|
||||
{% if post.author %}
|
||||
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>
|
||||
{% endif %}
|
||||
on {{ post.date_published|date:"DATE_FORMAT" }}
|
||||
</p>
|
||||
</div>
|
||||
<hr>
|
||||
49
ungleich/templates/ungleich/djangocms_blog/post_detail.html
Normal file
49
ungleich/templates/ungleich/djangocms_blog/post_detail.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{% extends "ungleich/djangocms_blog/base.html" %}
|
||||
{% load i18n thumbnail cms_tags %}
|
||||
{% 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 "_header_post_detail.html" %}
|
||||
{% endblock %}
|
||||
<!-- page header -->
|
||||
{% block content_blog %}
|
||||
<article>
|
||||
{% if post.app_config.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 %}
|
||||
</article>
|
||||
{% endblock content_blog %}
|
||||
{#{% load i18n thumbnail cms_tags %}#}
|
||||
{##}
|
||||
{#{% 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="{{ meta.url }}"/>{% endblock canonical_url %}#}
|
||||
{#{% block title %}{{ post.get_title }}{% endblock %}#}
|
||||
{##}
|
||||
{#{% block content_blog %}{% spaceless %}#}
|
||||
{#<article id="post-{{ post.slug }}" class="post-item post-detail">#}
|
||||
{# <header>#}
|
||||
{# <h2>{% render_model post "title" %}</h2>#}
|
||||
{# {% block blog_meta %}#}
|
||||
{# {% include "djangocms_blog/includes/blog_meta.html" %}#}
|
||||
{# {% endblock %}#}
|
||||
{# </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 %}#}
|
||||
{# {% if post.app_config.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 %}#}
|
||||
{#</article>#}
|
||||
{#{% endblock content_blog %}#}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
{% extends "ungleich/djangocms_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 "ungleich/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>
|
||||
{% endif %}
|
||||
{% if page_obj.has_next %}
|
||||
<li class="next">
|
||||
<a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">
|
||||
{% trans "Older Posts" %} →
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% endspaceless %}
|
||||
|
||||
|
||||
{#{% load i18n thumbnail %}{% spaceless %}#}
|
||||
{##}
|
||||
{#{% block canonical_url %}<link rel="canonical" href="{{ 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 %}#}
|
||||
{# <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 %}#}
|
||||
{#</section>#}
|
||||
{#{% endblock %}#}
|
||||
{#{% endspaceless %}#}
|
||||
Loading…
Add table
Add a link
Reference in a new issue