Code bereinigt und Seitenstruktur verfeinert.
Das Layout der einzelnen Seiten ist jetzt einheitlich: - jumbotron - Naviation der Unterseiten (wenn Vorhanden) - Hauptinhalt - Pager (bei mehrseiteigen Ergebnissen) - Kommentare (wenn Kommentare möglich) - Buttonleiste zum bearbeiten (wen erlaubt) * Viele kleine HTML5 Fehler wurden bereinigt * CSS Dateien wurden angepasst * Nicht mehr benötigte Dateien in STATIC gelöscht * externe Pakete aus utlis/ entfernt, als Vobreitung für virtenv Nutzung.
This commit is contained in:
committed by
Christian Berg
parent
86a0db050d
commit
34f5bdca58
@@ -1,5 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n comments %}
|
||||
|
||||
{% block title %}
|
||||
{% trans 'Article Archive' %}
|
||||
{% if active_category %} - {{active_category.name}}{% endif %}
|
||||
@@ -12,35 +13,22 @@
|
||||
{% if month %}{{ month|date:'F Y' }}</h2>{% elif year %}{{year}}{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
<style type="text/css" media="screen and (min-width: 701px)">#teaser{background-image:url("{{STATIC_URL}}img/news_teaser.jpg")}</style>
|
||||
<!--[if lt IE 9]><style type="text/css" media="screen">#teaser{background-image:url("{{STATIC_URL}}img/news_teaser.jpg")}</style><![endif]-->
|
||||
{% endblock %}
|
||||
|
||||
{% block navigation %}
|
||||
<ul id="navigation">
|
||||
<li><a href="{{current_top_page.get_absolute_url}}" {% if not active_category %}class="active"{% endif %}>{% trans 'All Categories' %}</a></li>
|
||||
{% for category in categories %}
|
||||
<li><a href="{% url 'article-archive' category=category.slug %}"
|
||||
{% ifequal category.slug active_category.slug %}class="active"{% endifequal %}>{{ category.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<!--[if lt IE 9]><style type="text/css" media="screen">#teaser{background-image:url("{{STATIC_URL}}img/news_teaser.jpg")}</style><![endif]-->
|
||||
{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
<section id="teaser" class="grid_8">
|
||||
<div id="teaser_text">
|
||||
<h2>{% trans 'Article Archive' %}
|
||||
{% block teaser %}<h2>
|
||||
{% trans 'Article Archive' %}
|
||||
{% if active_category %} - {{active_category.name}}{% endif %}
|
||||
{% if month %}{{ month|date:'F Y' }}</h2>{% elif year %}{{year}}{% endif %}
|
||||
</h2>
|
||||
{{content|safe}}
|
||||
</div>
|
||||
</section>
|
||||
{% if month %}{{ month|date:'F Y' }}{% elif year %}{{year}}{% endif %}
|
||||
</h2>
|
||||
<div id="teaser_text">
|
||||
{% if active_category %}
|
||||
<p>{{ active_category.description }}</p>
|
||||
{% else %}
|
||||
{{current_page.content|safe}}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
<section class="grid_4 red_box">
|
||||
{% block date_list %}
|
||||
{% block redbox %}
|
||||
{% block date_list %}
|
||||
<h2>{% trans "Archive" %} {{year}}</h2>
|
||||
<ul class="list" style="margin: 20px;">
|
||||
{% if active_category %}
|
||||
@@ -53,10 +41,21 @@
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
<section class="grid_8">
|
||||
{% block navigation %}
|
||||
<ul id="navigation">
|
||||
<li><a href="{{current_top_page.get_absolute_url}}" {% if not active_category %}class="active"{% endif %}>{% trans 'All Categories' %}</a></li>
|
||||
{% for category in categories %}
|
||||
<li><a href="{% url 'article-archive' category=category.slug %}"
|
||||
{% ifequal category.slug active_category.slug %}class="active"{% endifequal %}>{{ category.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
<div class="grid_8">
|
||||
{% for article in article_list %}
|
||||
{% get_comment_count for article as comment_count %}
|
||||
<article class="article">
|
||||
@@ -73,12 +72,12 @@
|
||||
{% empty %}
|
||||
<p>{% trans "We're sorry. Your search yielded no results." %}</p>
|
||||
{% endfor %}
|
||||
</section>
|
||||
</div>
|
||||
<aside class="grid_4">
|
||||
{% for feed in feeds %}
|
||||
<h2><a href="{{feed.public_url}}">{{feed.title}}</a></h2>
|
||||
<ul>
|
||||
{% for item in feed.feed_items.all %}
|
||||
{% for item in feed.feed_items.all|slice:":10" %}
|
||||
<li><a href="{{item.link}}">{{item.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
@@ -5,32 +5,33 @@
|
||||
|
||||
{% block description %}{{article.content|striptags|truncatewords:16}}{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
<link rel="image_src" type="image/jpeg" href="{{article.posting_image.url}}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block opengraph %}
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="{{ article.headline }}" />
|
||||
<meta property="og:url" content="http://www.kasu.at{{ article.get_absolute_url }}" />
|
||||
<meta property="og:image" content="http://www.kasu.at{{article.posting_image.url}}" />
|
||||
<meta property="og:description" content="{{article.content|striptags|truncatewords:25}}" />
|
||||
<meta property="og:description" content="{{article.content|striptags|truncatewords:25}}" />
|
||||
<link rel="image_src" type="image/jpeg" href="{{article.posting_image.url}}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block itemscope %}itemscope itemtype="http://schema.org/Article"{% endblock %}
|
||||
|
||||
{% block teaser %}<h2 itemprop="name">{{article.headline}}</h2>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2 itemprop="name">{{article.headline}}</h2>
|
||||
<div itemprop="articleBody">{{ article.content }}</div>
|
||||
<p> </p>
|
||||
<div itemprop="articleBody">{{ article.content }}</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
<p> </p>
|
||||
<img alt="{{article.category.name}}" src="{{article.posting_image.url}}" class="posting_image" itemprop="image"/>
|
||||
<p> </p>
|
||||
|
||||
<ul class="info">
|
||||
<li class="user"><strong>{% trans 'Author' %}:</strong> <a href="{% url 'membership-details' article.author %}" itemprop="author">{{article.author}}</a></li>
|
||||
<li class="date"><strong>{% trans 'Created on' %}: </strong><time date="{{article.date_created|date:'c'}}">{{ article.date_created|date }}</time></li>
|
||||
<li class="date"><strong>{% trans 'Created on' %}: </strong><time datetime="{{article.date_created|date:'Y-m-d H:i'}}">{{ article.date_created|date }}</time></li>
|
||||
<li class="category"><strong>{% trans "Category"%}: </strong><a href="{{ article.category.get_absolute_url }}" itemprop="articleSection">{{article.category.name}}</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/ckeditor/ckeditor.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block jumbotron_background %}{{STATIC_URL}}img/teaser/edit_page.jpg{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
|
||||
{% get_fieldset "parent, slug, content_type, status" from form as fieldset_common %}
|
||||
|
||||
Reference in New Issue
Block a user