Make templates sexier
All checks were successful
Deploy to Server / deploy (push) Successful in 10s

This commit is contained in:
Joakim Hellsén 2026-03-11 23:38:31 +01:00
commit 4663a827e4
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
12 changed files with 434 additions and 405 deletions

View file

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load static %}
{% block title %}
Reward Campaigns - Twitch Drops Tracker
Reward Campaigns
{% endblock title %}
{% block extra_head %}
<link rel="alternate"
@ -14,47 +14,27 @@
href="{% url 'twitch:reward_campaign_feed_atom' %}" />
{% endblock extra_head %}
{% block content %}
<h1 id="page-title">Reward Campaigns (Quest Rewards)</h1>
<p>Browse all available quest reward campaigns</p>
<h1>Reward Campaigns</h1>
<!-- RSS Feeds -->
<div style="margin-bottom: 1rem;">
<div>
<a href="{% url 'twitch:reward_campaign_feed' %}"
style="margin-right: 1rem"
title="RSS feed for all reward campaigns">RSS feed for all reward campaigns</a>
title="RSS feed for all reward campaigns">[rss]</a>
<a href="{% url 'twitch:reward_campaign_feed_atom' %}"
title="Atom feed for all reward campaigns">[atom]</a>
</div>
<!-- Filter Form -->
<form id="filter-form"
method="get"
action="{% url 'twitch:reward_campaign_list' %}">
<label for="game">Game:</label>
<select id="game" name="game">
<option value="">All Games</option>
{% for game in games %}
<option value="{{ game.twitch_id }}"
{% if selected_game == game.twitch_id %}selected{% endif %}>
{{ game.display_name|default:game.name|default:game.slug|default:game.twitch_id }}
</option>
{% endfor %}
</select>
<label for="status">Status:</label>
<select id="status" name="status">
<option value="">All Statuses</option>
{% for status in status_options %}
<option value="{{ status }}"
{% if selected_status == status %}selected{% endif %}>{{ status|title }}</option>
{% endfor %}
</select>
<button id="apply-filters-button" type="submit">Apply Filters</button>
</form>
<p>This is an archive of old Twitch reward campaigns because we do not monitor them.</p>
<p>
Feel free to submit a pull request on <a href="https://github.com/TheLovinator1/ttvdrops">GitHub</a>
with a working implementation :-).
</p>
{% if reward_campaigns %}
{% comment %}
<h5>Active Reward Campaigns</h5>
<table>
<tbody>
{% for campaign in reward_campaigns %}
{% if campaign.starts_at <= now and campaign.ends_at >= now %}
<tr id="reward-campaign-{{ campaign.twitch_id }}">
<tr>
<td>
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">
{% if campaign.brand %}
@ -83,12 +63,15 @@
{% endfor %}
</tbody>
</table>
{% endcomment %}
{% comment %}
<h5>Upcoming Reward Campaigns</h5>
<table>
<tbody>
{% for campaign in reward_campaigns %}
{% if campaign.starts_at > now %}
<tr id="reward-campaign-{{ campaign.twitch_id }}">
<tr>
<td>
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">
{% if campaign.brand %}
@ -117,12 +100,13 @@
{% endfor %}
</tbody>
</table>
{% endcomment %}
<h5>Past Reward Campaigns</h5>
<table>
<tbody>
{% for campaign in reward_campaigns %}
{% if campaign.ends_at < now %}
<tr id="reward-campaign-{{ campaign.twitch_id }}">
<tr>
<td>
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">
{% if campaign.brand %}