Files
TipPy/templates/blogindex.html

76 lines
3.0 KiB
HTML

{% extends "base.html" %}
{% load i18n static %}
{% load humanize %}
{% block head %}
<title> TipPy Blog</title>
{% endblock %}
{% block nav %}
{% include "nav.html" with ls=ls season=season %}
{% endblock %}
{% block body %}
<div id="content-main">
<div class="row">
<div class="col-md-7">
<h2>TipPy Blog</h2>
<p class="text-right">
<a class="btn btn-default" href="/blog/newpost" role="button">Neue Nachricht</a>
</p>
</div>
</div>
<ul class="media-list">
{% for post, avatar in posts %}
<li class="media">
<a href="#" class="pull-left">
{% if avatar %}
<img class="img-circle img-responsive pull-left blog" alt="Profile Pic"
src="/media/{{ avatar }}"/>
{% else %}
<img class="img-circle img-responsive pull-left blog" alt="Profile Pic"
src="/media/profiles/dummy.png"/>
{% endif %}
</a>
<div class="media-body">
<span class="text-muted pull-right">
<small class="text-muted">{{ post.created|naturaltime }}</small>
</span>
<strong class="text-success">{{ post.author.first_name }}</strong>
<p>{{ post.content|safe }}</p>
</div>
</li>
{% endfor %}
</ul>
<div class="row">
<div class="col-md-7">
<nav>
<ul class="pager">
{% if posts.has_previous %}
<li data-toggle="tooltip" title="{% trans 'previous' %}" class="previous">
<a href="/blog/{{ page|add:"-1" }}">
{% else %}
<li data-toggle="tooltip" title="{% trans 'previous' %}" class="previous inactive">
<a href="/blog/{{ page }}">
{% endif %}
<span aria-hidden="true">&larr;</span>
</a>
</li>
Seite {{ posts.number }} von {{ posts.paginator.num_pages }}.
{% if posts.has_next %}
<li data-toggle="tooltip" title="{% trans 'next' %}" class="next">
<a href="/blog/{{ page|add:"1" }}">
{% else %}
<li data-toggle="tooltip" title="{% trans 'next' %}" class="next inactive">
<a href="/blog/{{ page }}">
{% endif %}
<span aria-hidden="true">&rarr;</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
{% endblock %}