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:
Christian Berg
2014-11-30 16:49:23 +01:00
committed by Christian Berg
parent 86a0db050d
commit 34f5bdca58
1062 changed files with 1690 additions and 100089 deletions

View File

@@ -1,139 +1,205 @@
{% load i18n %}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>>
<html>
<head>
<title>Kasu - {% block title %}{{ current_top_page.menu_name|default:"traditionelle asiatische Spielkultur"}}{% endblock %}</title>
<meta name="keywords" content="{% block keywords %}{% endblock %}" />
<meta name="description" content="{% block description %}{% endblock %}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="{{STATIC_URL}}img/favicon.ico">
<link rel="stylesheet" media="all" href="{{STATIC_URL}}css/common.css" type="text/css">
<link rel="stylesheet" media="print" href="{{STATIC_URL}}css/print.css" type="text/css">
<link rel="stylesheet" media="screen and (min-width: 701px)" href="{{STATIC_URL}}css/desktop.css" type="text/css">
<link rel="stylesheet" media="screen and (max-width: 700px)" href="{{STATIC_URL}}css/mobile.css" type="text/css">
<!--[if lt IE 9]>
<link rel="stylesheet" media="screen" href="{{STATIC_URL}}css/desktop.css" type="text/css">
<script type="text/javascript">
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
document.createElement('hgroup');
</script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="{% trans 'Current News' %}" href="{% url 'feed-latest-news' %}" />
<link rel="alternate" type="application/rss+xml" title="{% trans 'Recent Comments' %}" href="{% url 'feed-latest-comments' %}" />
{% block opengraph %}
<meta property="og:type" content="website" />
<meta property="og:title" content="Kasu - Verein Japanische Spielekultur" />
<meta property="og:url" content="http://www.kasu.at{{ request.path_info }}" />
<meta property="og:image" content="http://www.kasu.at/static/img/logo.png" />
{% endblock %}
{% block extra_head %}{% endblock %}
</head>
<body {% block itemscope %}{% endblock %}>
<div id="header_bg"></div>
<header id="header">
<head>
<title>Kasu - {% block title %}{{ current_top_page.menu_name|default:"traditionelle asiatische Spielkultur"}}{% endblock %}</title>
<meta name="keywords" content="{% block keywords %}{% endblock %}"/>
<meta name="description" content="{% block description %}{% endblock %}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" href="{{STATIC_URL}}img/favicon.ico">
<link rel="stylesheet" media="all" href="{{STATIC_URL}}css/common.css" type="text/css">
<link rel="stylesheet" media="print" href="{{STATIC_URL}}css/print.css" type="text/css">
<link rel="stylesheet" media="screen and (min-width: 701px)" href="{{STATIC_URL}}css/desktop.css" type="text/css">
<link rel="stylesheet" media="screen and (max-width: 700px)" href="{{STATIC_URL}}css/mobile.css" type="text/css">
<!--[if lt IE 9]>
<link rel="stylesheet" media="screen" href="{{STATIC_URL}}css/desktop.css" type="text/css">
<script type="text/javascript">
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
document.createElement('hgroup');
</script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="{% trans 'Current News' %}"
href="{% url 'feed-latest-news' %}"/>
<link rel="alternate" type="application/rss+xml" title="{% trans 'Recent Comments' %}"
href="{% url 'feed-latest-comments' %}"/>
{% block opengraph %}
<meta property="og:type" content="website"/>
<meta property="og:title" content="Kasu - Verein Japanische Spielekultur"/>
<meta property="og:url" content="http://www.kasu.at{{ request.path_info }}"/>
<meta property="og:image" content="http://www.kasu.at/static/img/logo.png"/>
{% endblock %}
{% block extra_head %}{% endblock %}
</head>
<body {% block itemscope %}{% endblock %}>
<div id="header_bg"></div>
<header id="siteheader">
<h1 id="sitelogo"><a href="/index.html">Kasu - traditionelle asiatische Spielkultur</a></h1>
<nav id="mainnav">
<input type="checkbox" id="toggle" />
<label for="toggle" class="toggle" onclick>{% trans "Menu" %}</label>
<ul class="main_menu">
{% for item in top_menu_items %}
<li><a href="{{item.get_absolute_url}}" title="{{ item.title }}" {%if item.active %}class="active"{% endif %}>{{item.menu_name}}</a></li>
{% endfor %}
</ul>
<input type="checkbox" id="toggle"/>
<label for="toggle" class="toggle" onclick>{% trans "Menu" %}</label>
<ul class="main_menu">
{% for item in top_menu_items %}
<li><a href="{{item.get_absolute_url}}" title="{{ item.title }}"
class="{%if item.active %}active{% endif %}">{{item.menu_name}}</a></li>
{% endfor %}
</ul>
</nav>
</header>
<div id="maincontent">
{% block navigation %}
{% if current_top_page.subpages.count %}
<ul id="navigation">
<li><a href="{{current_top_page.get_absolute_url}}" {% ifequal current_page current_top_page %}class="active"{% endifequal %}>{{current_top_page.menu_name}}</a></li>
</header>
<section id="jumbotron"
style="background-image: url('{% block jumbotron_background %}{{STATIC_URL}}img/teaser/{{current_top_page.slug}}.jpg{% endblock %}')">
{% block teaser %}
<h2>{{page.title}} {{title}}</h2>
{% endblock %}
<aside id="redbox">
{% block redbox %}
{% if current_event %}
<h2>{% trans "Current Event" %}</h2>
<h3>{{ current_event.name}}</h3>
<p><img src="{{ STATIC_URL }}icons/date.png"/> {% trans "since" %}
<time datetime="{{current_event.start|date:'c'}}">{{current_event.start|timesince}}</time>
</p>
<ul class="list">
<li class="event"><strong>{% trans "Start" %}:</strong> {{current_event.start|date:'DATETIME_FORMAT'}}</li>
<li class="location"><strong>{% trans "Location" %}:</strong> {{ current_event.location }}</li>
</ul>
<div style="text-align:right"><a class="button" href="{{current_event.get_absolute_url}}">{% trans "More Details" %}
<img src="{{ STATIC_URL }}icons/date_go.png" alt="&raquo;" width="16" height="16"/></a></div>
{% else %}
<h2>{% trans "Next Event" %}</h2>
<h3>{{ next_event.name}}</h3>
<p><img src="{{ STATIC_URL }}icons/date.png" alt="" width="16" height="16"/> {% trans "in" %}
<time datetime="{{next_event.start|date:'c'}}">{{next_event.start|timeuntil}}</time>
</p>
<ul class="list">
<li class="event"><strong>{% trans "Start" %}:</strong> {{next_event.start|date:'DATETIME_FORMAT' }}</li>
<li class="location"><strong>{% trans "Location" %}:</strong> {{ next_event.location }}</li>
</ul>
<div style="text-align:right"><a class="button" href="{{next_event.get_absolute_url}}">{% trans "More Details" %}
<img src="{{ STATIC_URL }}icons/date_go.png" alt="&raquo;" width="16" height="16"/></a></div>
{% endif %}
<h3 class="clearfix">{% trans "Upcoming events" %} <a href="{% url 'events-ical' %}"><img
src="{{STATIC_URL}}img/ical_feed.gif" alt="iCal Feed" title="iCal Feed" width="16" height="16"/></a>
</h3>
<ul class="list">
{% for event in upcoming_events %}
<li class="event">{{event.start|date:'d. M:'}} <a href="{{ event.get_absolute_url}}">{{event.name}}</a></li>
{% endfor %}
</ul>
{% endblock %}
</aside>
</section>
{% block navigation %}
{% if current_top_page.subpages.count %}
<ul id="navigation">
<li><a href="{{current_top_page.get_absolute_url}}"
class="{% ifequal current_page current_top_page %}{% endifequal %}">{{current_top_page.menu_name}}</a></li>
{% for subpage in current_top_page.subpages.all %}
<li><a href="{{subpage.get_absolute_url}}" {% ifequal subpage current_page %}class="active"{% endifequal %}>{{subpage.menu_name}}</a></li>
<li><a href="{{subpage.get_absolute_url}}" class="{% ifequal subpage current_page %}active{% endifequal %}">{{subpage.menu_name}}</a>
</li>
{% endfor %}
{% block additional_nav_elements %}{% endblock %}
</ul>
{% endif %}
{% endblock %}
{% block messages %}
{% if messages %}
<ul id="messages" class="grid_12">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
{% block maincontent %}
<div id="content">{% block content %}{% endblock %}</div>
<aside id="sidebar">{% block sidebar %}{% endblock %}</aside>
{% endblock %}
{% block paginator %}{% if page_obj.has_other_pages %}{% include 'paginator.html' %}{% endif %}{% endblock %}
{% block comments %}{% endblock %}
<p id="bottom_buttonbar" class="buttonbar grid_12">
{% block buttonbar %}
{% if current_page and perms.content.change_page %}<a href="{% url 'edit-page' current_page.path %}" class="button"><img src="{{ STATIC_URL }}icons/page_edit.png" alt="" /> {% trans "Edit Page" %}</a>{% endif %}
{% if current_page and perms.content.add_page %}<a href="{% url 'add-page' current_page.path %}" class="button"><img src="{{ STATIC_URL }}icons/page_add.png" alt="" /> {% trans "Add Subpage" %}</a>{% endif %}
{% block additional_buttonbar %}{% endblock %}
{% endblock %}
</p>
</div>
<br class="clear" />
<div id="footer_bg">&nbsp;</div>
<footer id="footer">
<p><strong>Herausgeber:</strong> Verein Kasu - traditionelle asiatische Spielkultur (<a href="/verein/impressum.html">{% trans "imprint" %}</a> &ndash; <a href='ma&#105;&#108;to&#58;ve&#37;72e&#37;6&#57;n&#64;%6&#66;%61su&#46;a%7&#52;'>{% trans "contact" %}</a>)</p>
<form action="/i18n/setlang/" method="post" style="text-align:right;">
{% csrf_token %}
<label for="language">{% trans "Language" %}:</label>
<select name="language" id="language">
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{language.code}}" {% ifequal language.code LANGUAGE_CODE %}
selected="selected"{% endifequal %}>{{ language.name_local }} ({{ language.code }})</option>
{% endfor %}
</select>
<button type="submit">{% trans "Go" %}</button>
</form>
</footer>
<nav id="usernav">
{% if user.is_authenticated %}
{% trans "Logged in as" %}:
<a rel="nofollow" href="{% url 'membership-details' user.username %}">{{user.username}}</a> -
{% if user.is_staff %}<a href="/admin">{% trans "Admin" %}</a>{% endif %}
<a rel="nofollow" href="{% url 'logout' %}?next={{ request.path_info }}">{% trans "Logout" %}</a>
{% else %}
{% trans "no user logged in" %} -
<a rel="nofollow" href="{% url 'membership-register' %}">{% trans "register" %}</a>
<a rel="nofollow" href="{% url 'login' %}?next={{ request.path_info }}">{% trans "login" %}</a>
<a rel="nofollow" href="{% url 'social:begin' 'facebook' %}"><img src="{{STATIC_URL}}img/facebook.png" alt="Facebook Login" title="Login with Facebook" width="26" height="26"/></a>
<a rel="nofollow" href="{% url 'social:begin' 'twitter' %}"><img src="{{STATIC_URL}}img/twitter.png" alt="Twitter Login" title="Login with Twitter" width="26" height="26"/></a>
<a rel="nofollow" href="{% url 'social:begin' 'google-oauth2' %}"><img src="{{STATIC_URL}}img/google.png" alt="Google Login" title="Login with Google" width="26" height="26"/></a>
{% endif %}
</nav>
<script type="text/javascript">
{% block javascript %}{% endblock %}
var pkBaseURL = (("https:" == document.location.protocol) ? "https://admin.animanga.at/tools/piwik/" : "http://admin.animanga.at/tools/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 5);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {
</ul>
{% endif %}
{% endblock %}
}
</script><noscript><p><img src="http://admin.animanga.at/tools/piwik/piwik.php?idsite=5" style="border:0" alt="" /></p></noscript>
{% block messages %}
{% if messages %}
<ul id="messages">
{% for message in messages %}
<li class="{{ message.tags }}">{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
<div id="maincontent">
{% block maincontent %}
<div id="content">{% block content %}{% endblock %}</div>
<aside id="sidebar">{% block sidebar %}{% endblock %}</aside>
{% endblock %}
{% block paginator %}
{% if page_obj.has_other_pages %}{% include 'paginator.html' %}{% endif %}
{% endblock %}
{% block comments %}{% endblock %}
<br class="clear" />
<p id="bottom_buttonbar" class="buttonbar">
{% block buttonbar %}
{% if current_page and perms.content.change_page %}<a href="{% url 'edit-page' current_page.path %}" class="button"><img
src="{{ STATIC_URL }}icons/page_edit.png" alt=""/> {% trans "Edit Page" %}</a>{% endif %}
{% if current_page and perms.content.add_page %}<a href="{% url 'add-page' current_page.path %}" class="button"><img
src="{{ STATIC_URL }}icons/page_add.png" alt=""/> {% trans "Add Subpage" %}</a>{% endif %}
{% block additional_buttonbar %}{% endblock %}
{% endblock %}
</p>
</div>
<div id="footer_bg">&nbsp;</div>
<footer id="footer">
<p><strong>Herausgeber:</strong> Verein Kasu - traditionelle asiatische Spielkultur (<a
href="/verein/impressum.html">{% trans "imprint" %}</a> &ndash; <a
href='ma&#105;&#108;to&#58;ve&#37;72e&#37;6&#57;n&#64;%6&#66;%61su&#46;a%7&#52;'>{% trans "contact" %}</a>)
</p>
<form action="/i18n/setlang/" method="post" style="text-align:right;">
{% csrf_token %}
<label for="language">{% trans "Language" %}:</label>
<select name="language" id="language">
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{language.code}}" {% ifequal language.code LANGUAGE_CODE %}
selected="selected" {% endifequal %}>{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<button type="submit">{% trans "Go" %}</button>
</form>
</footer>
<nav id="usernav">
{% if user.is_authenticated %}
{% trans "Logged in as" %}:
<a rel="nofollow" href="{% url 'membership-details' user.username %}">{{user.username}}</a> -
{% if user.is_staff %}<a href="/admin">{% trans "Admin" %}</a>{% endif %}
<a rel="nofollow" href="{% url 'logout' %}?next={{ request.path_info }}">{% trans "Logout" %}</a>
{% else %}
{% trans "no user logged in" %} -
<a rel="nofollow" href="{% url 'membership-register' %}">{% trans "register" %}</a>
<a rel="nofollow" href="{% url 'login' %}?next={{ request.path_info }}">{% trans "login" %}</a>
<a rel="nofollow" href="{% url 'social:begin' 'facebook' %}"><img src="{{STATIC_URL}}img/facebook.png"
alt="Facebook Login" title="Login with Facebook"
width="26" height="26"/></a>
<a rel="nofollow" href="{% url 'social:begin' 'twitter' %}"><img src="{{STATIC_URL}}img/twitter.png"
alt="Twitter Login" title="Login with Twitter"
width="26" height="26"/></a>
<a rel="nofollow" href="{% url 'social:begin' 'google-oauth2' %}"><img src="{{STATIC_URL}}img/google.png"
alt="Google Login" title="Login with Google"
width="26" height="26"/></a>
{% endif %}
</nav>
<script type="text/javascript">
{% block javascript %}{% endblock %}
var pkBaseURL = (("https:" == document.location.protocol) ? "https://admin.animanga.at/tools/piwik/" : "http://admin.animanga.at/tools/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 5);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch (err) {
}
</script>
<noscript><p><img src="http://admin.animanga.at/tools/piwik/piwik.php?idsite=5" style="border:0" alt=""/></p></noscript>
</body>
</html>

View File

@@ -1,44 +1,51 @@
{% load comments i18n %}
<form action="{% comment_form_target %}" method="post" id='comment_form'>
{% csrf_token %}
<fieldset class="grid_12">
<legend>{% trans "New Comment" %}</legend>
{% if user.is_authenticated %}
<p style="display:none">
{{form.honeypot}} {{form.honeypot.label}}
{% for field in form.hidden_fields %}{{ field }}{% endfor %}
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% else %}
<input type="hidden" name="next" value="{{ request.path_info }}" />
</p>
{% endif %}
<label class="field_name" for="id_comment">
{{user}}<br/>
<time class="submit_date" datetime='{% now "c" %}'>{% now "d. M. Y. H:i" %}</time>
{% if user.get_profile.thumbnail %}<img src="{{user.get_profile.thumbnail.url}}" alt=""/>{% else %}<img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/>{% endif %}
</label>
{{form.comment}}
<p class="buttonbar">
<button type="submit" name="preview"><img src="{{ STATIC_URL }}icons/comment_edit.png" alt="{% trans 'Preview' %}" /> {% trans "Preview" %}</button>
<button type="submit" name="submit"><img src="{{ STATIC_URL }}icons/comment_add.png" alt="{% trans 'Post' %}" /> {% trans "Post" %}</button>
</p>
{% else %}
<label class="field_name" for="id_comment">
{% trans "not logged in" %}<br/>
<time class="submit_date" datetime='{% now "c" %}'>{% now "d. M. Y. H:i" %}</time>
<img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/>
</label>
<span>
{% url "membership-register" as register %}
{% url "login" as login %}
{% blocktrans with request.path_info as next %}<a href="{{ register }}">Register</a> now, or <a href="{{ login }}?next={{ next }}">Login</a> to leave a comment here.{% endblocktrans %}
</span>
<p class="buttonbar">
<a href="{{ register }}" class="button"><img src="{{STATIC_URL}}icons/user_add.png" />{% trans 'register' %}</a>
<a href="{{ login }}" class="button"><img src="{{STATIC_URL}}icons/lock_break.png" />{% trans 'login' %}</a>
</p>
{% endif %}
</fieldset>
<p>&nbsp;</p>
<form action="{% comment_form_target %}" method="post" id='comment_form' class="grid_12">
{% csrf_token %}
<fieldset class="comment">
<legend>{% trans "New Comment" %}</legend>
{% if user.is_authenticated %}
<p style="display:none">
{{form.honeypot}} {{form.honeypot.label}}
{% for field in form.hidden_fields %}{{ field }}{% endfor %}
<input type="hidden" name="next" value="{{ next|default:request.path_info }}"/>
</p>
<div class="comment">
<div class="comment_picture"><img class="avatar"
src="{% if user.get_profile.thumbnail %}{{user.get_profile.thumbnail.url}}{% else %}{{STATIC_URL}}img/unknown_thumbnail.png{% endif %}"
alt=""/></div>
<header class="comment_header">
<h3><a href="{{ user.get_profile.get_absolute_url }}" class="user">{{user}}</a></h3>
<p class="submit_date">{% trans 'now' %}</p>
</header>
<div class="comment_text">{{form.comment}}</div>
</div>
<p class="buttonbar">
<button type="submit" name="preview"><img src="{{ STATIC_URL }}icons/comment_edit.png"
alt="{% trans 'Preview' %}"/> {% trans "Preview" %}
</button>
<button type="submit" name="submit"><img src="{{ STATIC_URL }}icons/comment_add.png"
alt="{% trans 'Post' %}"/> {% trans "Post" %}
</button>
</p>
{% else %}
<div class="comment">
<div class="comment_picture"><img class="avatar"
src="{{STATIC_URL}}img/unknown_thumbnail.png"
alt=""/></div>
<header class="comment_header">
<h3>{% trans "not logged in" %}</h3>
</header>
<div class="comment_text">
<textarea disabled="disabled" cols="40" rows="10">
{% blocktrans %}Register now, or Login to leave a comment here.{% endblocktrans %}
</textarea>
</div>
</div>
<p class="buttonbar">
<a href="{% url 'membership-register' %}" class="button"><img src="{{STATIC_URL}}icons/user_add.png" alt=""/> {% trans 'register' %}</a>
<a href="{% url 'login' %}?next={{ request.path_info|urlencode }}" class="button"><img src="{{STATIC_URL}}icons/lock_break.png" alt=""/> {% trans 'login' %}</a>
</p>
{% endif %}
</fieldset>
</form>

View File

@@ -1,15 +1,18 @@
{% load i18n django_markdown %}
<table id="comments" class="layout">
<h2 class="grid_12" id="comments">{% trans 'Comments' %}</h2>
{% for comment in comment_list %}
<tr id="c{{ comment.id }}">
<td class="avatar">
{% if comment.user.get_profile.thumbnail %}<img src="{{comment.user.get_profile.thumbnail.url}}" alt=""/>{% else %}<img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/>{% endif %}
</td>
<td class="userinfo">
<a href="{{ comment.user.get_profile.get_absolute_url }}" class="user">{{comment.user}}</a>
<div class="submit_date"><time time="{{comment.submit_date|time:'c'}}">{{comment.submit_date|timesince}}</time></div>
</td>
<td class="content">{{comment.comment|markdown_safe}}</td>
</tr>
{% endfor %}
</table>
<article id="c{{ comment.id }}" class="comment">
<div class="comment_picture">
<img class="avatar" src="{% if comment.user.get_profile.thumbnail %}
{{comment.user.get_profile.thumbnail.url}}
{% else %}
{{STATIC_URL}}img/unknown_thumbnail.png
{% endif %}" alt=""/>
</div>
<header class="comment_header">
<h3><a href="{{ comment.user.get_profile.get_absolute_url }}" class="user">{{comment.user}}</a></h3>
<time datetime="{{comment.submit_date|date:'Y-m-d'}}" class="submit_date">{{comment.submit_date|timesince}}</time>
</header>
<div class="comment_text">{{comment.comment|markdown_safe}}</div>
</article>
{% endfor %}

View File

@@ -5,22 +5,25 @@
{% block maincontent %}
{% if form.errors %}
<h2>{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h2>
<h2 class="grid_12">{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h2>
{% else %}
<h2>{% trans "Preview your comment" %}</h2>
<table id="comments" class="layout">
<tr id="c{{ comment.id }}">
<td class="avatar">
{% if user.get_profile.thumbnail %}<img src="{{user.get_profile.thumbnail.url}}" alt=""/>{% else %}<img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/>{% endif %}
</td>
<td class="userinfo">
<div class="user">{{user}}</div>
<time class="submit_date" datetime='{% now "c" %}'>{% now "d. m. Y. h:i" %}</time>
</td>
<td class="content">{{comment|markdown_safe}}</td>
</tr>
</table>
<h2 class="grid_12">{% trans "Preview your comment" %}</h2>
<article id="c{{ comment.id }}" class="comment">
<div class="comment_picture">
<img class="avatar" src="{% if user.get_profile.thumbnail %}
{{user.get_profile.thumbnail.url}}
{% else %}
{{STATIC_URL}}img/unknown_thumbnail.png
{% endif %}" alt=""/>
</div>
<header class="comment_header">
<a href="{{ user.get_profile.get_absolute_url }}" class="user">{{comment.user}}</a>
<div class="submit_date"><time time="{% now 'c' %}">{% now 'DATETIME_FORMAT' %}</time></div>
</header>
<div class="comment_text">{{comment|markdown_safe}}</div>
</article>
{% endif %}
<br class="clear" />
{% include "comments/form.html" %}
{% endblock %}

View File

@@ -1,94 +1,115 @@
{% extends "base.html" %}
{% load i18n comments%}
{% block extra_head %}
<style type="text/css" media="screen and (min-width: 701px)">
#teaser{background-image:url("{{random_photo.url}}")}</style>
<!--[if lt IE 9]><style type="text/css" media="screen">#teaser{background-image:url("{{random_photo.url}}")}</style><![endif]-->
{% block jumbotron_background %}{{ random_photo.url }}{% endblock %}
{% block teaser %}
<h2>{{title}}</h2>
<div id="teaser_text">{{content}}</div>
{% endblock %}
{% block redbox %}
{% if current_event %}
<h2>{% trans "Current Event" %}</h2>
<h3>{{ current_event.name}}</h3>
<p><img src="{{ STATIC_URL }}icons/date.png"/> {% trans "since" %}
<time datetime="{{current_event.start|date:'Y-m-d H:i'}}">{{current_event.start|timesince}}</time>
</p>
<ul class="list">
<li class="event"><strong>{% trans "Start" %}:</strong> {{current_event.start|date:'DATETIME_FORMAT'}}</li>
<li class="location"><strong>{% trans "Location" %}:</strong> {{ current_event.location }}</li>
</ul>
<div style="text-align:right"><a class="button" href="{{current_event.get_absolute_url}}">{% trans "More Details" %}
<img src="{{ STATIC_URL }}icons/date_go.png" alt="&raquo;" width="16" height="16"/></a></div>
{% else %}
<h2>{% trans "Next Event" %}</h2>
<h3>{{ next_event.name}}</h3>
<p><img src="{{ STATIC_URL }}icons/date.png" alt="" width="16" height="16"/> {% trans "in" %}
<time datetime="{{next_event.start|date:'Y-m-d H:i'}}">{{next_event.start|timeuntil}}</time>
</p>
<ul class="list">
<li class="event"><strong>{% trans "Start" %}:</strong> {{next_event.start|date:'DATETIME_FORMAT' }}</li>
<li class="location"><strong>{% trans "Location" %}:</strong> {{ next_event.location }}</li>
</ul>
<div style="text-align:right"><a class="button" href="{{next_event.get_absolute_url}}">{% trans "More Details" %}
<img src="{{ STATIC_URL }}icons/date_go.png" alt="&raquo;" width="16" height="16"/></a></div>
{% endif %}
<h3 class="clearfix">{% trans "Upcoming events" %} <a href="{% url 'events-ical' %}"><img
src="{{STATIC_URL}}img/ical_feed.gif" alt="iCal Feed" title="iCal Feed" width="16" height="16"/></a></h3>
<ul class="list">
{% for event in upcoming_events %}
<li class="event">{{event.start|date:'d. M:'}} <a href="{{ event.get_absolute_url}}">{{event.name}}</a></li>
{% endfor %}
</ul>
{% endblock %}
{% block maincontent %}
<section id="teaser" class="grid_8">
<div id="teaser_text"><h2>{{title}}</h2>{{content}}</div>
</section>
<aside id="next_event" class="grid_4 red_box" itemscope itemtype="http://schema.org/Event">
{% if current_event %}
<h2>{% trans "Current Event" %}</h2>
<h3>{{ current_event.name}}</h3>
<p><img src="{{ STATIC_URL }}icons/date.png" /> {% trans "since" %} <time datetime="{{current_event.start|date:'c'}}">{{current_event.start|timesince}}</time></p>
<ul class="list">
<li class="event"><strong>{% trans "Start" %}:</strong> {{current_event.start|date:'DATETIME_FORMAT'}}</li>
<li class="location"><strong>{% trans "Location" %}:</strong> {{ current_event.location }}</li>
</ul>
<div style="text-align:right"><a class="button" href="{{current_event.get_absolute_url}}">{% trans "More Details" %} <img src="{{ STATIC_URL }}icons/date_go.png" alt="&raquo;" width="16" height="16"/></a></div>
{% else %}
<h2>{% trans "Next Event" %}</h2>
<h3>{{ next_event.name}}</h3>
<p><img src="{{ STATIC_URL }}icons/date.png" alt="" width="16" height="16"/> {% trans "in" %} <time datetime="{{next_event.start|date:'c'}}">{{next_event.start|timeuntil}}</time></p>
<ul class="list">
<li class="event"><strong>{% trans "Start" %}:</strong> {{next_event.start|date:'DATETIME_FORMAT' }}</li>
<li class="location"><strong>{% trans "Location" %}:</strong> {{ next_event.location }}</li>
</ul>
<div style="text-align:right"><a class="button" href="{{next_event.get_absolute_url}}">{% trans "More Details" %} <img src="{{ STATIC_URL }}icons/date_go.png" alt="&raquo;" width="16" height="16"/></a></div>
{% endif %}
<h3 class="clearfix">{% trans "Upcoming events" %} <a href="{% url 'events-ical' %}"><img src="{{STATIC_URL}}img/ical_feed.gif" alt="iCal Feed" title="iCal Feed" width="16" height="16"/></a></h3>
<ul class="list">
{% for event in upcoming_events %}
<li class="event">{{event.start|date:'d. M:'}} <a href="{{ event.get_absolute_url}}">{{event.name}}</a></li>
{% endfor %}
</ul>
</aside>
<br class="clear" />
<section class="grid_8">
{% for article in recent_article_list %}{% get_comment_count for article as comment_count %}
<article class="article">
<header>
<h2><a href="{{article.get_absolute_url}}">{{article.headline}}</a></h2>
<ul class="info">
<li><img src="{{STATIC_URL}}icons/date.png" width="16" height="16" alt="{% trans 'Created on' %}" title="{% trans 'Created on' %}"/> <time date="{{article.date_created|date:'c'}}">{{ article.date_created|date }}</time></li>
<li><img src="{{STATIC_URL}}icons/user_red.png" width="16" height="16" alt="{% trans 'Author' %}" title="{% trans 'Author' %}"/> {{ article.author }}</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>
</header>
<a href="{{article.get_absolute_url}}"><img src="{{article.posting_image.url}}" alt="{{article.category}}:" class="posting_image"/></a>
{{article.content|truncatewords_html:50}}
<footer class="more_link"><a href="{{article.get_absolute_url}}" class="button">{% trans "Read More"%} <img src="{{STATIC_URL}}icons/page_go.png" alt="&raquo;" width="16" height="16"/></a></footer>
</article>
{% endfor %}
</section>
<div class="grid_8">
{% for article in recent_article_list %}{% get_comment_count for article as comment_count %}
<article class="article">
<header>
<h2><a href="{{article.get_absolute_url}}">{{article.headline}}</a></h2>
<ul class="info">
<li><img src="{{STATIC_URL}}icons/date.png" width="16" height="16" alt="{% trans 'Created on' %}"
title="{% trans 'Created on' %}"/>
<time datetime="{{article.date_created|date:'Y-m-d H:i'}}">{{ article.date_created|date:'DATE_FORMAT' }}</time>
</li>
<li><img src="{{STATIC_URL}}icons/user_red.png" width="16" height="16" alt="{% trans 'Author' %}"
title="{% trans 'Author' %}"/> {{ article.author }}
</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>
</header>
<a href="{{article.get_absolute_url}}"><img src="{{article.posting_image.url}}" alt="{{article.category}}:"
class="posting_image"/></a>
{{article.content|truncatewords_html:50}}
<footer class="more_link"><a href="{{article.get_absolute_url}}" class="button">{% trans "Read More"%} <img
src="{{STATIC_URL}}icons/page_go.png" alt="&raquo;" width="16" height="16"/></a></footer>
</article>
{% endfor %}
</div>
<aside class="grid_4">
<section>
<h2>{% trans "Recent Comments" %} <a href="{% url 'feed-latest-comments' %}"><img src="{{ STATIC_URL }}img/rss_feed.gif" alt="RSS Feed" title="RSS Feed" width="16" height="16"/></a></h2>
<ul class="comment_list">
{% for comment in recent_comment_list %}
{% url 'membership-details' comment.user.username as user_link%}
<li>
{% blocktrans with comment.user as author and comment.submit_date|timesince as since and comment.submit_date|date:'c' as submit_date and comment.content_object as object and comment.get_absolute_url as comment_link%}
From <a href="{{user_link}}">{{author}}</a> in
<a href="{{comment_link}}">&ldquo;{{object}}&rdquo;</a>
since <time datetime="{{submit_date}}">{{since}}</time>
{% endblocktrans %}
</li>
{% endfor %}
</ul>
</section>
<section>
<h2>{% trans "Recent Comments" %} <a href="{% url 'feed-latest-comments' %}"><img
src="{{ STATIC_URL }}img/rss_feed.gif" alt="RSS Feed" title="RSS Feed" width="16" height="16"/></a></h2>
<ul class="comment_list">
{% for comment in recent_comment_list %}
{% url 'membership-details' comment.user.username as user_link%}
<li>
{% blocktrans with comment.user as author and comment.submit_date|timesince as since and comment.submit_date|date:'c' as submit_date and comment.content_object as object and comment.get_absolute_url as comment_link%}
From <a href="{{user_link}}">{{author}}</a> in
<a href="{{comment_link}}">&ldquo;{{object}}&rdquo;</a>
since
<time datetime="{{submit_date}}">{{since}}</time>
{% endblocktrans %}
</li>
{% endfor %}
</ul>
</section>
<section>
<h2>{% trans 'Kasu in the social network' %}</h2>
<p style="text-align: center">
<a href="https://www.facebook.com/Kasu.at"><img src="{{STATIC_URL}}img/facebook.png" alt="Facebook" title="{% trans 'Visit us on' %} Facebook" /></a>
<a href="https://twitter.com/KasuAustria"><img src="{{STATIC_URL}}img/twitter.png" alt="Twitter" title="{% trans 'Visit us on' %} Twitter" /></a>
<a href="https://plus.google.com/u/0/114092233962732014973/"><img src="{{STATIC_URL}}img/google_plus.png" alt="Google+" title="{% trans 'Visit us on' %} Google+" /></a>
</p>
</section>
<section>
<h2>{% trans 'Kasu in the social network' %}</h2>
<p style="text-align: center">
<a href="https://www.facebook.com/Kasu.at"><img src="{{STATIC_URL}}img/facebook.png" alt="Facebook"
title="{% trans 'Visit us on' %} Facebook"/></a>
<a href="https://twitter.com/KasuAustria"><img src="{{STATIC_URL}}img/twitter.png" alt="Twitter"
title="{% trans 'Visit us on' %} Twitter"/></a>
<a href="https://plus.google.com/u/0/114092233962732014973/"><img src="{{STATIC_URL}}img/google_plus.png"
alt="Google+"
title="{% trans 'Visit us on' %} Google+"/></a>
</p>
</section>
</aside>
{% endblock %}
{% if perms.content.add_article %}{% block addidional_buttonbar %}
<a href="{% url 'add-article' %}" class="button"><img src="{{ STATIC_URL }}icons/note_add.png" alt="" width="16" height="16"/>{% trans "Add Article" %}</a>
<a href="{% url 'add-article' %}" class="button"><img src="{{ STATIC_URL }}icons/note_add.png" alt="" width="16"
height="16"/>{% trans "Add Article" %}</a>
{% endblock %}{% endif %}

View File

@@ -5,6 +5,8 @@
{% block title %}{% trans 'login' %}{% endblock %}
{% block teaser %}<h2>{% trans 'login' %}</h2>{% endblock %}
{% block maincontent %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
<h2 class="grid_12">Auf der Seite Anmelden</h2>