fix archive style

This commit is contained in:
j 2023-08-20 21:12:51 +02:00
parent c2988c0b2f
commit acf4764ca0
3 changed files with 8 additions and 3 deletions

View file

@ -43,7 +43,7 @@ def index(request):
return render(request, 'index.html', context)
def archive(request):
def archive(request, week=None):
context = default_context(request)
qs = models.Item.public()
week, archive = models.Item.public()

View file

@ -1,10 +1,17 @@
{% extends "base.html" %}
{% block content %}
<div class="index">
{% for item in items %}
{% ifchanged item.week %}
<h2>{{ item.year }} week {{ item.week }}</h2>
{% endifchanged %}
{% include "listitem.html" with item=item %}
{% endfor %}
{% if archive %}
<div class="archive">
<a href="{{ archive }}">previous weeks</a>
</div>
{% endif %}
</div>
{% endblock %}

View file

@ -4,8 +4,6 @@
<title>{{ settings.SITENAME }}</title>
{% endblock %}
{% block content %}
<style>
</style>
<div class="index">
{% for item in items %}
{% include "listitem.html" with item=item %}