diff --git a/templates/twitch/campaign_list.html b/templates/twitch/campaign_list.html index c84f914..84ba3f8 100644 --- a/templates/twitch/campaign_list.html +++ b/templates/twitch/campaign_list.html @@ -4,111 +4,244 @@ Drop Campaigns - Twitch Drops Tracker {% endblock title %} {% block content %} -

Drop Campaigns

-
- - + + {% for game in games %} + + {% endfor %} + + + +
+ + +
+ + +
+ {% if campaigns %} + {% regroup campaigns by game as campaigns_by_game %} + {% for game_group in campaigns_by_game %} +
+
+
+ {% if game_group.grouper.box_art_base_url %} + Box art for {{ game_group.grouper.display_name }} + {% else %} +
+ 🎮 +
+ No Image +
+ {% endif %} +
+
+

+ {{ game_group.grouper.display_name }} +

+

+ {{ game_group.list.0.owner.name }} +

+
+
+
+
+ {% for campaign in game_group.list %} + + {% endfor %} +
+
+
{% endfor %} - - - - - -
Campaign List
- {% if campaigns %} - {% for campaign in campaigns %} - {% if campaign.image_url %} - {{ campaign.name }} - {% else %} - No Image Available - {% endif %} -
{{ campaign.clean_name }}
-

- {{ campaign.game.display_name }} -

-

- {{ campaign.start_at|date:"M d, Y" }} - - {{ campaign.end_at|date:"M d, Y" }} -

- {% if campaign.start_at <= now and campaign.end_at >= now %} - {% if campaign.status == 'ACTIVE' %}Active{% endif %} - {% elif campaign.start_at > now %} - Upcoming - {% else %} - Expired - {% endif %} - Details - {% endfor %} - {% else %} - No campaigns found with the current filters. - {% endif %} - - {% if is_paginated %} - - - Showing {{ page_obj.start_index }} to {{ page_obj.end_index }} of {{ page_obj.paginator.count }} - campaigns - (Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}) - - {% endif %} + {% for num in page_obj.paginator.page_range %} + {% if page_obj.number == num %} + {{ num }} + {% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %} + {{ num }} + {% elif num == 1 or num == page_obj.paginator.num_pages %} + {{ num }} + {% elif num == page_obj.number|add:'-4' or num == page_obj.number|add:'4' %} + ... + {% endif %} + {% endfor %} + {% if page_obj.has_next %} + » + »» + {% else %} + » + »» + {% endif %} + + + Showing {{ page_obj.start_index }} to {{ page_obj.end_index }} of {{ page_obj.paginator.count }} + campaigns (Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}) + + + {% endif %} + {% endblock content %}