Refactor dashboard title and enhance campaign details display

This commit is contained in:
Joakim Hellsén 2025-08-29 18:48:22 +02:00
commit 6732cfa6de

View file

@ -1,12 +1,15 @@
{% extends "base.html" %}
{% load static %}
{% block title %}
Dashboard
Twitch drops
{% endblock title %}
{% block content %}
<main>
<h1>Twitch Drops Dashboard</h1>
<p>Track active campaigns and upcoming drops</p>
<h1>Twitch Drops</h1>
<pre>
Drops are sorted alphabetically by organization and game. Click on a campaign or game title to see more details.
Hover over the end time to see the exact date and time.
</pre>
{% if campaigns_by_org_game %}
{% for org_id, org_data in campaigns_by_org_game.items %}
<section>
@ -57,6 +60,30 @@
text-align: left">
Ends in {{ campaign.end_at|timeuntil }}
</time>
<time datetime="{{ campaign.start_at|date:'c' }}"
title="{{ campaign.start_at|date:'DATETIME_FORMAT' }}"
style="font-size: 0.9rem;
color: #666;
display: block;
text-align: left">
Started {{ campaign.start_at|timesince }} ago
</time>
<time datetime="{{ campaign.created_at|date:'c' }}"
title="Scraped at {{ campaign.created_at|date:'DATETIME_FORMAT' }}"
style="font-size: 0.9rem;
color: #666;
display: block;
text-align: left">
Scraped {{ campaign.created_at|timesince }} ago
</time>
<time datetime="{{ campaign.start_at|date:'c' }} to {{ campaign.end_at|date:'c' }}"
title="Duration: {{ campaign.start_at|date:'DATETIME_FORMAT' }} to {{ campaign.end_at|date:'DATETIME_FORMAT' }}"
style="font-size: 0.9rem;
color: #666;
display: block;
text-align: left">
Duration: {{ campaign.start_at|timesince:campaign.end_at }}
</time>
</div>
</article>
{% endfor %}