Source

django-article / templates / home_page.html

Full commit
{% extends 'article/base.html' %}
{% load meta_tags thumbnail package_tags %}

{% block title %}FAQ{% endblock %}


{% block categories %}
	<div class="pageHeader">
        {% with request.path|meta as meta %}
        <h1>{% block header %}{{ meta.header }}{% endblock %}</h1>
        <p>{% block subheader %}{{ meta.subheader }}{% endblock %}</p>
        {% endwith %}
    </div>
{% endblock%}

{% block article_content %}
<div class="staticWrapper">
	<div class="staticWrapp">
		<a href="{{ last_article.get_absolute_url }}"><h2 class="smallerSubheadlines">{{ last_article }}</h2></a>
		{% thumbnail last_article.image "586x276" crop="center" as im %}
		<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt="" />
		{% endthumbnail %}
		<p>{{ last_article.teaser|safe }}</p>
		<span class="buttonRead"><a href="{{ last_article.get_absolute_url }}">Pročitaj</a></span>
		<ul>
			{% for cat in categories %}
			<li style="{% cycle '' 'padding-right:0;' 'padding-bottom:0;' %}" class="article-teaser">
				<a href="{{ cat.get_absolute_url }}"><h4>{{ cat.name }}</h4></a>
				<a href="{{ cat.get_articles.0.get_absolute_url }}">
					<h3 class="smallerSubheadlines">{{ cat.get_articles.0.title }}</h3>
				</a>
				{% thumbnail cat.get_articles.0.image "276x151" crop="center" as im %}
				<div style="height: 151;">
				<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt="{{ cat.name }}" />
				</div>
				{% endthumbnail %}
				<p>{{ cat.get_articles.0.teaser|truncatewords_html:15|safe }}</p>
				<span class="buttonRead"><a href="{{ cat.get_articles.0.get_absolute_url }}">Pročitaj</a></span>
				<ul>
					{% for article in cat.get_articles %}
					{% if forloop.counter > 1 and forloop.counter < 5 %}
					<li><a href="{{ article.get_absolute_url }}">{{ article.title }}</a></li>
					{% endif %}
					{% endfor %}
				</ul>
			</li>
			{% endfor %}
		</ul>
	</div>

	<div class="sideBar">
		{% articles_sidebar %}
	</div>
	
</div>
{% endblock %}