fix archive style
This commit is contained in:
parent
c2988c0b2f
commit
acf4764ca0
3 changed files with 8 additions and 3 deletions
|
@ -43,7 +43,7 @@ def index(request):
|
||||||
return render(request, 'index.html', context)
|
return render(request, 'index.html', context)
|
||||||
|
|
||||||
|
|
||||||
def archive(request):
|
def archive(request, week=None):
|
||||||
context = default_context(request)
|
context = default_context(request)
|
||||||
qs = models.Item.public()
|
qs = models.Item.public()
|
||||||
week, archive = models.Item.public()
|
week, archive = models.Item.public()
|
||||||
|
|
|
@ -1,10 +1,17 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="index">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
{% ifchanged item.week %}
|
{% ifchanged item.week %}
|
||||||
<h2>{{ item.year }} week {{ item.week }}</h2>
|
<h2>{{ item.year }} week {{ item.week }}</h2>
|
||||||
{% endifchanged %}
|
{% endifchanged %}
|
||||||
{% include "listitem.html" with item=item %}
|
{% include "listitem.html" with item=item %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if archive %}
|
||||||
|
<div class="archive">
|
||||||
|
<a href="{{ archive }}">previous weeks</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
<title>{{ settings.SITENAME }}</title>
|
<title>{{ settings.SITENAME }}</title>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<style>
|
|
||||||
</style>
|
|
||||||
<div class="index">
|
<div class="index">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
{% include "listitem.html" with item=item %}
|
{% include "listitem.html" with item=item %}
|
||||||
|
|
Loading…
Reference in a new issue