neue Verzeichnissstruktur
This commit is contained in:
94
content/templates/content/article_archive.html
Normal file
94
content/templates/content/article_archive.html
Normal file
@@ -0,0 +1,94 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n comments %}
|
||||
{% block title %}
|
||||
{% trans 'Article Archive' %}
|
||||
{% if active_category %} - {{active_category.name}}{% endif %}
|
||||
{% if month %}{{ month|date:'F Y' }}</h2>{% elif year %}{{year}}{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block meta_title %}
|
||||
{% trans 'Article Archive' %}
|
||||
{% if active_category %} - {{active_category.name}}{% endif %}
|
||||
{% 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' %}
|
||||
{% if active_category %} - {{active_category.name}}{% endif %}
|
||||
{% if month %}{{ month|date:'F Y' }}</h2>{% elif year %}{{year}}{% endif %}
|
||||
</h2>
|
||||
{{content|safe}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="grid_4 red_box">
|
||||
{% block date_list %}
|
||||
<h2>{% trans "Archive" %} {{year}}</h2>
|
||||
<ul class="list" style="margin: 20px;">
|
||||
{% if active_category %}
|
||||
{% for date in date_list %}
|
||||
<li class="date"><a href="{% url "article-archive" category=active_category.slug year=date|date:'Y' %}">{{active_category.name}}: {{ date|date:'Y' }}</a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for date in date_list %}
|
||||
<li class="date"><a href="{% url "article-archive" year=date|date:'Y' %}">{{ date|date:'Y' }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
</section>
|
||||
|
||||
<section class="grid_8">
|
||||
{% for article in article_list %}
|
||||
{% get_comment_count for article as comment_count %}
|
||||
<article class="article">
|
||||
<h3><a href="{{article.get_absolute_url}}">{{article.headline}}</a></h3>
|
||||
<ul class="info">
|
||||
<li><img src="{{STATIC_URL}}icons/calendar.png" alt="{% trans 'created on' %}:" title="{% trans 'created on' %}"/> <time datetime="{{article.date_created|date:"c"}}">{{ article.date_created|date }}</time></li>
|
||||
<li><img src="{{STATIC_URL}}icons/user_red.png" alt="{% trans 'by' %}:" title="{% trans 'by' %}"/> <span class="author">{{ article.author }}</span></li>
|
||||
<li><img src="{{STATIC_URL}}icons/comments.png" alt="{% trans 'comments' %}:" title="{% trans 'comments' %}"/> <a href="{{article.get_absolute_url}}#comments" >{{comment_count}} {% trans "comments" %}</a></li>
|
||||
</ul>
|
||||
<a href="{{article.get_absolute_url}}"><img src="{{article.posting_image.url}}" alt="{{article.category}}:" class="posting_image"/></a>
|
||||
{{article.content|truncatewords_html:50}}
|
||||
<p class="more_link"><a href="{{article.get_absolute_url}}" class="button">{% trans "Read More"%} <img src="{{STATIC_URL}}icons/page_go.png" alt="»" /></a></p>
|
||||
</article>
|
||||
{% empty %}
|
||||
<p>{% trans "We're sorry. Your search yielded no results." %}</p>
|
||||
{% endfor %}
|
||||
</section>
|
||||
<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 %}
|
||||
<li><a href="{{item.link}}">{{item.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</aside>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block additional_buttonbar %}
|
||||
{% if perms.content.add_article %}
|
||||
<a href="{% url "add-article" %}" class="button"><img src="{{ STATIC_URL }}icons/note_add.png" alt="" /> {% trans "Add Article" %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
9
content/templates/content/article_archive_month.html
Normal file
9
content/templates/content/article_archive_month.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "content/article_archive.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block date_list %}
|
||||
<h2>{% trans "Archive" %} {{month|date:'E'}}</h2>
|
||||
<div class="buttonbar">
|
||||
<a href="{% url "article-archive" year=month|date:'Y' %}" class="button"><img src="{{ STATIC_URL }}icons/arrow_undo.png" alt="{% trans 'back' %}" /> {% trans 'back' %}</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
20
content/templates/content/article_archive_year.html
Normal file
20
content/templates/content/article_archive_year.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends "content/article_archive.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block meta_title %}{{ article.headline }}{% endblock %}
|
||||
|
||||
{% block date_list %}
|
||||
<h2>{% trans "Archive" %} {{year}}</h2>
|
||||
|
||||
<ul class="list" style="margin: 20px;">
|
||||
{% if active_category %}
|
||||
{% for date in date_list %}
|
||||
<li class="date"><a href="{% url "article-archive" category=active_category.slug year=year|date:'Y' month=date|date:'m' %}">{{active_category.name}}: {{ date|date:'F' }}</a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for date in date_list %}
|
||||
<li class="date"><a href="{% url "article-archive" year=year|date:'Y' month=date|date:'m' %}">{{ date|date:'F' }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
54
content/templates/content/article_detail.html
Normal file
54
content/templates/content/article_detail.html
Normal file
@@ -0,0 +1,54 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n comments %}
|
||||
|
||||
{% block title %}{{ article.headline }}{% endblock %}
|
||||
|
||||
{% 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}}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block itemscope %}itemscope itemtype="http://schema.org/Article"{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2 itemprop="name">{{article.headline}}</h2>
|
||||
<div itemprop="articleBody">{{ article.content }}</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
<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="category"><strong>{% trans "Category"%}: </strong><a href="{{ article.category.get_absolute_url }}" itemprop="articleSection">{{article.category.name}}</a></li>
|
||||
</ul>
|
||||
|
||||
<p class="center">
|
||||
<a href="https://plus.google.com/share?url=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}" onclick="javascript:window.open(this.href,
|
||||
'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img src="{{STATIC_URL}}img/google_plus.png" alt="Google+" title="{% trans 'Share on Google+'%}" width="39" height="39"/></a>
|
||||
<a href="https://twitter.com/share?url=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}" target='_blank'><img src="{{STATIC_URL}}img/twitter.png" alt="Twitter" title="{% trans 'Share on Twitter' %}" width="39" height="39"/></a>
|
||||
<a href="http://facebook.com/sharer.php?u=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}?t={{article.headline|urlencode}}" target="_blank"><img src="{{STATIC_URL}}img/facebook.png" alt="Facebook" title="{% trans 'Share on Facebook'%}" width="39" height="39"/></a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block comments%}
|
||||
{% render_comment_list for article %}
|
||||
{% render_comment_form for article %}
|
||||
{% endblock %}
|
||||
|
||||
{% block buttonbar %}
|
||||
{% if perms.content.change_article %}
|
||||
<a href="{% url "edit-article" article.id %}" class="button"><img src="{{STATIC_URL}}icons/note_edit.png" alt="" />{% trans "Edit Article" %}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
52
content/templates/content/article_form.html
Normal file
52
content/templates/content/article_form.html
Normal file
@@ -0,0 +1,52 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n fieldset_extras %}
|
||||
|
||||
{% block title %}
|
||||
{% if object.pk %}{% trans "Edit Article" %}{% else %}{% trans "Create Article" %}{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.6.2.min.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/language_tabs.js" ></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/ckeditor/ckeditor.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
{% get_fieldset "category, image" from form as fieldset_common %}
|
||||
{% get_fieldset "headline_de, content_de" from form as fieldset_de %}
|
||||
{% get_fieldset "headline_en, content_en" from form as fieldset_en %}
|
||||
|
||||
<form action="" method="post" enctype="multipart/formdata" class="grid_12">
|
||||
<fieldset>
|
||||
<legend>{% if object.pk %}{% trans "Edit Article" %}{% else %}{% trans "Create Article" %}{% endif %}</legend>
|
||||
{% csrf_token %}
|
||||
{% with fieldset_common as form %}{% include "form.html" %}{% endwith %}
|
||||
</fieldset>
|
||||
<ul class="tabs">
|
||||
<li><a href="#de">{% trans "German" %}</a></li>
|
||||
<li><a href="#en">{% trans "English" %}</a></li>
|
||||
</ul>
|
||||
<div class="tab_container">
|
||||
<fieldset id="de" class="tab_content">
|
||||
<legend>Deutsch</legend>
|
||||
{% with fieldset_de as form %}{% include "form.html" %}{% endwith %}
|
||||
</fieldset>
|
||||
<fieldset id="en" class="tab_content">
|
||||
<legend>English</legend>
|
||||
{% with fieldset_en as form %}{% include "form.html" %}{% endwith %}
|
||||
</fieldset>
|
||||
</div>
|
||||
<p class="buttonbar">
|
||||
<button type="reset"><img src="{{STATIC_URL}}icons/arrow_undo.png" alt="{% trans 'reset' %}" /> {% trans 'reset' %}</button>
|
||||
<button type="submit"><img src="{{STATIC_URL}}icons/disk.png" alt="{% trans 'save' %}" /> {% trans 'save' %}</button>
|
||||
</p>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
CKEDITOR.replace( 'id_content_de' );
|
||||
CKEDITOR.replace( 'id_content_en' );
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block buttonbar %}{% endblock %}
|
||||
27
content/templates/content/clear_page.html
Normal file
27
content/templates/content/clear_page.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load comments %}
|
||||
|
||||
{% block meta_title %}{{ page.title }}{% endblock %}
|
||||
|
||||
{% block title %}{{page.title}}{% endblock %}
|
||||
|
||||
{% block opengraph %}
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{page.title}}" />
|
||||
<meta property="og:url" content="http://www.kasu.at{{ page.get_absolute_url }}" />
|
||||
<meta property="og:image" content="http://www.kasu.at/static/img/logo.png" />
|
||||
<meta property="og:description" content="{{ page.content|striptags|truncatewords:25 }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
<h2 class="grid_12">{{ page.title }}</h2>
|
||||
{{ page.content }}
|
||||
{% endblock %}
|
||||
|
||||
{% block comments %}
|
||||
{% if page.enable_comments %}
|
||||
{% render_comment_list for page %}
|
||||
{% render_comment_form for page %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
36
content/templates/content/page.html
Normal file
36
content/templates/content/page.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
{% load comments i18n %}
|
||||
|
||||
{% block meta_title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block title %}{{page.title}}{% endblock %}
|
||||
|
||||
{% block opengraph %}
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{page.title}}" />
|
||||
<meta property="og:url" content="http://www.kasu.at{{ page.get_absolute_url }}" />
|
||||
<meta property="og:image" content="http://www.kasu.at/static/img/logo.png" />
|
||||
<meta property="og:description" content="{{ page.content|striptags|truncatewords:25 }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{ page.title }}</h2>
|
||||
{{ page.content }}
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% if current_top_page.subpages %}
|
||||
<h2>{% trans "Subpages" %}</h2>
|
||||
{% for subpage in current_top_page.subpages.all %}
|
||||
<h3><a href="{{ subpage.get_absolute_url }}">{{subpage.menu_name}}</a></h3>
|
||||
<ul class="list">
|
||||
{% for subpage in subpage.subpages.all %}<li class="{{subpage.css_class}}"><a href="{{ subpage.get_absolute_url }}">{{ subpage.menu_name }}</a></li>{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block comments %}{% if page.enable_comments %}
|
||||
{% render_comment_list for page %}
|
||||
{% render_comment_form for page %}
|
||||
{% endif %}{% endblock %}
|
||||
58
content/templates/content/page_form.html
Normal file
58
content/templates/content/page_form.html
Normal file
@@ -0,0 +1,58 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n fieldset_extras %}
|
||||
|
||||
{% block title %}{% if object.pk %}{% trans "Edit Page" %}: {{ page.title }}{% else %}{% trans "Add Page" %}{% endif %}{% endblock %}
|
||||
|
||||
{% block extra_head %}
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.6.2.min.js"></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/language_tabs.js" ></script>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/ckeditor/ckeditor.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
|
||||
{% get_fieldset "parent, slug, content_type, status" from form as fieldset_common %}
|
||||
{% get_fieldset "menu_name_de, title_de, pdf_de, content_de" from form as fieldset_de %}
|
||||
{% get_fieldset "menu_name_en, title_en, pdf_en, content_en" from form as fieldset_en %}
|
||||
{% get_fieldset "template, enable_comments" from form as fieldset_html %}
|
||||
|
||||
<form method="post" enctype="multipart/form-data" class="grid_12">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
<legend>{% if object.pk %}{% trans "Edit Page" %}{% else %}{% trans "Add Page" %}{% endif %}</legend>
|
||||
{% with fieldset_common as form %}{% include "form.html" %}{% endwith %}
|
||||
</fieldset>
|
||||
|
||||
<ul class="tabs">
|
||||
<li><a href="#de">{% trans "German" %}</a></li>
|
||||
<li><a href="#en">{% trans "English" %}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab_container">
|
||||
<fieldset id="de" class="tab_content">
|
||||
<legend>{% trans "German" %}</legend>
|
||||
{% with fieldset_de as form %}{% include "form.html" %}{% endwith %}
|
||||
</fieldset>
|
||||
<fieldset id="en" class="tab_content">
|
||||
<legend>{% trans "English" %}</legend>
|
||||
{% with fieldset_en as form %}{% include "form.html" %}{% endwith %}
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>{% trans "HTML Specific" %}</legend>
|
||||
{% with fieldset_html as form %}{% include "form.html" %}{% endwith %}
|
||||
</fieldset>
|
||||
|
||||
<p class="buttonbar">
|
||||
<button type="reset"><img src="{{STATIC_URL}}icons/arrow_undo.png" alt="{% trans 'reset' %}" /> {% trans 'reset' %}</button>
|
||||
<button type="submit"><img src="{{STATIC_URL}}icons/page_save.png" alt="{% trans 'save' %}" /> {% trans 'save' %}</button>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
CKEDITOR.replace( 'id_content_de' );
|
||||
CKEDITOR.replace( 'id_content_en' );
|
||||
{% endblock %}
|
||||
66
content/templates/content/page_pdf.html
Normal file
66
content/templates/content/page_pdf.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block title %}{{page.title}}{% endblock %}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Amerika Sans';
|
||||
src: url('{{ STATIC_ROOT }}/fonts/amerika_sans.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Philosopher';
|
||||
src: url('{{ STATIC_ROOT }}/fonts/philosopher-regular.ttf');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
font-family: 'Amerika Sans', Helvetica;
|
||||
font-variant: small-caps;
|
||||
font-weight: bold;
|
||||
margin: 0.5em 0 0.2em 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Philosopher;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
#page_header {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@page {
|
||||
margin-right: 0mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-top: 35mm;
|
||||
margin-left: 2cm;
|
||||
@frame header {
|
||||
-pdf-frame-content : page_header;
|
||||
top: 0mm;
|
||||
margin: 5mm;
|
||||
height: 4cm;
|
||||
}
|
||||
@frame footer {
|
||||
-pdf-frame-content: page_footer;
|
||||
bottom: 0cm;
|
||||
height: 2cm;
|
||||
margin: 5mm;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ page.title }}</h1>
|
||||
{{ page.content }}
|
||||
<div id="page_header">
|
||||
<img src="{{STATIC_ROOT}}/img/logo.png" alt="Kasu">
|
||||
</div>
|
||||
<div id="page_footer">
|
||||
{{ page.title }} Seite:
|
||||
<pdf:pagenumber>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user