{% extends "base.html" %}
{% load i18n comments thumbnail %}

{%  block title %}{% trans 'traditional Asian game culture' %}{%  endblock %}

{% block teaser %}
<h1>{{title}}</h1>
<div id="teaser_text">{{content}}</div>
{% endblock %}

{% block maincontent %}
<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><span class="fa fa-calendar"></span>
                    <time datetime="{{article.date_created|date:'Y-m-d H:i'}}">{{ article.date_created|date:'DATE_FORMAT' }}</time>
                </li>
                <li><span class="fa fa-user"></span> {{ article.author }}
                </li>
                <li><span class="fa fa-comments"></span> <a href="{{article.get_absolute_url}}#comments">{{comment_count}}
                    {% trans "Comments" %}</a></li>
            </ul>
        </header>
        <a href="{{article.get_absolute_url}}">

            <img src="{{article.get_image|thumbnail_url:'article'}}" alt="{{article.category}}:"
           class="posting_image" width="200" height="120"/></a>
        {{article.content|truncatewords_html:50}}
        <footer class="more_link"><a href="{{article.get_absolute_url}}" class="button">{% trans "Read More"%} <span class="fa fa-arrow-right"></span></a></footer>
    </article>
    {% endfor %}
</div>

<aside class="grid_4">
    <section>
        <h2>{% trans 'Recent Comments' %}
            <a href="{% url 'feed-latest-comments' %}" aria-label="RSS Feed"><span class="fa fa-rss-square" title="RSS Feed"></span></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" style="margin: 0 2em"><span class="fa fa-facebook fa-5x" title="{% trans 'Visit us on' %} Facebook"></span></a>
            <a href="https://twitter.com/KasuAustria" style="margin: 0 2em"><span
                    class="fa fa-twitter fa-5x"
                    title="{% trans 'Visit us on' %} Twitter"></span></a>
        </p>
    </section>


</aside>
{% endblock %}

{% block additional_buttonbar %}{% if perms.content.add_article %}
<a href="{% url 'add-article' %}" class="button"><span class="fa fa-newspaper-o"></span> {% trans "Add Article" %}</a>
{% endif %}{% endblock %}

