Skip to content

Commit

Permalink
Highlight last wearings on the year pages
Browse files Browse the repository at this point in the history
  • Loading branch information
norm committed Sep 4, 2021
1 parent 1504977 commit 57c2425
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion templates/wearers/wearer_year.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@ <h2>{{wearing.day|date:"F"}}</h2>
{% empty %}
<img src='//hasworn.m17s.net/placeholder/tshirt.100.jpg' width=100 height=100 alt=''>
{% endthumbnail %}
{% if wearing.pk in new_wearings %}<i>First time</i>{% endif %}
<i>
{% if wearing.pk in new_wearings %}
{% if wearing.day == wearing.worn.last_worn.day %}
First and last worn
{% else %}
First worn
{% endif %}
{% elif wearing.day == wearing.worn.last_worn.day %}
Last worn
{% endif %}
</i>
</a>
<i><b>{{wearing.day|date:"F"}}</b> {{wearing.day|date:"jS"}}</i>
</li>
Expand Down

0 comments on commit 57c2425

Please sign in to comment.