All checks were successful
Deploy to Server / deploy (push) Successful in 26s
72 lines
2.9 KiB
HTML
72 lines
2.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load image_tags %}
|
|
{% block title %}
|
|
Reward Campaigns
|
|
{% endblock title %}
|
|
{% block extra_head %}
|
|
<link rel="alternate"
|
|
type="application/rss+xml"
|
|
title="Reward campaigns (RSS)"
|
|
href="{% url 'core:reward_campaign_feed' %}" />
|
|
<link rel="alternate"
|
|
type="application/atom+xml"
|
|
title="Reward campaigns (Atom)"
|
|
href="{% url 'core:reward_campaign_feed_atom' %}" />
|
|
<link rel="alternate"
|
|
type="application/atom+xml"
|
|
title="Reward campaigns (Discord)"
|
|
href="{% url 'core:reward_campaign_feed_discord' %}" />
|
|
{% endblock extra_head %}
|
|
{% block content %}
|
|
<h1>Twitch Reward Campaigns</h1>
|
|
<div>
|
|
<a href="{% url 'twitch:dashboard' %}">Twitch</a> > Reward Campaigns
|
|
</div>
|
|
<p>
|
|
Data is scraped from <a href="https://github.com/SunkwiBOT/twitch-drops-api"
|
|
target="_blank"
|
|
rel="noopener">SunkwiBOT/twitch-drops-api</a> every 15 minutes.
|
|
</p>
|
|
<div>
|
|
<div>
|
|
<a href="{% url 'core:docs_rss' %}" title="RSS feed documentation">[explain]</a>
|
|
<a href="{% url 'twitch:twitch-api-v1:list_reward_campaigns' %}"
|
|
title="Twitch reward campaigns API">[api]</a>
|
|
</div>
|
|
<div>
|
|
<a href="{% url 'core:reward_campaign_feed' %}"
|
|
title="RSS feed for all reward campaigns">[rss]</a>
|
|
<a href="{% url 'core:reward_campaign_feed_atom' %}"
|
|
title="Atom feed for all reward campaigns">[atom]</a>
|
|
<a href="{% url 'core:reward_campaign_feed_discord' %}"
|
|
title="Discord feed for all reward campaigns">[discord]</a>
|
|
</div>
|
|
</div>
|
|
{% if reward_campaigns %}
|
|
{% with sorted_campaigns=reward_campaigns|dictsortreversed:"ends_at" %}
|
|
{# Active campaigns #}
|
|
<h2>Active Reward Campaigns</h2>
|
|
{% for campaign in sorted_campaigns %}
|
|
{% if campaign.starts_at <= now and campaign.ends_at >= now %}
|
|
{% include "twitch/includes/reward_campaign_card.html" with campaign=campaign %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{# Upcoming campaigns #}
|
|
<h2>Upcoming Reward Campaigns</h2>
|
|
{% for campaign in sorted_campaigns %}
|
|
{% if campaign.starts_at > now %}
|
|
{% include "twitch/includes/reward_campaign_card.html" with campaign=campaign %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{# Past campaigns #}
|
|
<h2>Past Reward Campaigns</h2>
|
|
{% for campaign in sorted_campaigns %}
|
|
{% if campaign.ends_at < now %}
|
|
{% include "twitch/includes/reward_campaign_card.html" with campaign=campaign %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endwith %}
|
|
{% else %}
|
|
<p>No reward campaigns found.</p>
|
|
{% endif %}
|
|
{% endblock content %}
|