ttvdrops/templates/twitch/game_less_rewards.html
Joakim Hellsén dbc36db1e0
All checks were successful
Deploy to Server / deploy (push) Successful in 26s
Add page for game-less reward campaigns with RSS/Atom/Discord feeds
2026-06-15 03:28:36 +02:00

198 lines
9.2 KiB
HTML

{% extends "base.html" %}
{% load static %}
{% block title %}
Brand & Site-wide Rewards
{% endblock title %}
{% block extra_head %}
<link rel="alternate"
type="application/rss+xml"
title="All game-less rewards (RSS)"
href="{% url 'core:game_less_reward_feed' %}" />
<link rel="alternate"
type="application/atom+xml"
title="All game-less rewards (Atom)"
href="{% url 'core:game_less_reward_feed_atom' %}" />
<link rel="alternate"
type="application/atom+xml"
title="All game-less rewards (Discord)"
href="{% url 'core:game_less_reward_feed_discord' %}" />
{% endblock extra_head %}
{% block content %}
<main>
<header>
<h1>Brand & Site-wide Rewards</h1>
<!-- Breadcrumbs -->
<div>
<a href="{% url 'twitch:dashboard' %}">Twitch</a> &gt; <a href="{% url 'twitch:reward_campaign_list' %}">Reward Campaigns</a> &gt; Brand &amp; Site-wide
</div>
<p>
Reward campaigns not tied to a specific Twitch game. These include
<strong>brand-specific</strong> campaigns (e.g., Minecraft, DOORS) and
truly <strong>site-wide</strong> Twitch quests.
</p>
<!-- Feeds and links -->
<div>
<a href="{% url 'core:game_less_reward_feed' %}"
title="RSS feed for all game-less rewards">[rss]</a>
<a href="{% url 'core:game_less_reward_feed_atom' %}"
title="Atom feed for all game-less rewards">[atom]</a>
<a href="{% url 'core:game_less_reward_feed_discord' %}"
title="Discord feed for all game-less rewards">[discord]</a>
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
<a href="{% url 'twitch:sitewide_rewards' %}"
title="View only site-wide rewards">[sitewide only]</a>
</div>
</header>
{% if active_campaigns %}
<section>
<h2>Active Rewards</h2>
<table>
<thead>
<tr>
<th>Campaign</th>
<th>Brand</th>
<th>Type</th>
<th>Ends</th>
</tr>
</thead>
<tbody>
{% for campaign in active_campaigns %}
<tr>
<td>
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">
{% if campaign.brand %}
{{ campaign.brand }}: {{ campaign.name }}
{% else %}
{{ campaign.name }}
{% endif %}
</a>
{% if campaign.summary %}
<br />
<small>{{ campaign.summary }}</small>
{% endif %}
</td>
<td>{{ campaign.brand|default:"—" }}</td>
<td>
{% if campaign.is_sitewide %}
<strong>Site-wide</strong>
{% else %}
Brand
{% endif %}
</td>
<td>
<time datetime="{{ campaign.ends_at|date:'c' }}"
title="{{ campaign.ends_at|date:'DATETIME_FORMAT' }}">
Ends in {{ campaign.ends_at|timeuntil }}
</time>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
{% if upcoming_campaigns %}
<section>
<h2>Upcoming Rewards</h2>
<table>
<thead>
<tr>
<th>Campaign</th>
<th>Brand</th>
<th>Type</th>
<th>Starts</th>
</tr>
</thead>
<tbody>
{% for campaign in upcoming_campaigns %}
<tr>
<td>
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">
{% if campaign.brand %}
{{ campaign.brand }}: {{ campaign.name }}
{% else %}
{{ campaign.name }}
{% endif %}
</a>
{% if campaign.summary %}
<br />
<small>{{ campaign.summary }}</small>
{% endif %}
</td>
<td>{{ campaign.brand|default:"—" }}</td>
<td>
{% if campaign.is_sitewide %}
<strong>Site-wide</strong>
{% else %}
Brand
{% endif %}
</td>
<td>
<time datetime="{{ campaign.starts_at|date:'c' }}"
title="{{ campaign.starts_at|date:'DATETIME_FORMAT' }}">
Starts in {{ campaign.starts_at|timeuntil }}
</time>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
{% if expired_campaigns %}
<section>
<h2>Past Rewards</h2>
<table>
<thead>
<tr>
<th>Campaign</th>
<th>Brand</th>
<th>Type</th>
<th>Ended</th>
</tr>
</thead>
<tbody>
{% for campaign in expired_campaigns %}
<tr>
<td>
<a href="{% url 'twitch:reward_campaign_detail' campaign.twitch_id %}">
{% if campaign.brand %}
{{ campaign.brand }}: {{ campaign.name }}
{% else %}
{{ campaign.name }}
{% endif %}
</a>
{% if campaign.summary %}
<br />
<small>{{ campaign.summary }}</small>
{% endif %}
</td>
<td>{{ campaign.brand|default:"—" }}</td>
<td>
{% if campaign.is_sitewide %}
<strong>Site-wide</strong>
{% else %}
Brand
{% endif %}
</td>
<td>
<time datetime="{{ campaign.ends_at|date:'c' }}"
title="{{ campaign.ends_at|date:'DATETIME_FORMAT' }}">
{{ campaign.ends_at|timesince }} ago
</time>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endif %}
{% if not active_campaigns and not upcoming_campaigns and not expired_campaigns %}
<section style="text-align: center; padding: 3rem 1rem;">
<div style="font-size: 4rem; margin-bottom: 1rem;">🏷️</div>
<h2 style="margin: 0 0 1rem 0;">No Rewards Found</h2>
<p style="margin: 0; font-size: 1.1rem;">No brand or site-wide reward campaigns are currently available.</p>
</section>
{% endif %}
</main>
{% endblock content %}