Remove bloat

This commit is contained in:
Joakim Hellsén 2025-10-13 02:07:33 +02:00
commit 715cbf4bf0
51 changed files with 691 additions and 3032 deletions

View file

@ -7,7 +7,7 @@
<!-- Campaign Title -->
{% if campaign.game %}
<h1 id="campaign-title">
<a href="{% url 'twitch:game_detail' campaign.game.id %}">{{ campaign.game.name }}</a> - {{ campaign.clean_name }}
<a href="{% url 'twitch:game_detail' campaign.game.id %}">{{ campaign.game.get_game_name }}</a> - {{ campaign.clean_name }}
</h1>
{% else %}
<h1 id="campaign-title">{{ campaign.clean_name }}</h1>
@ -29,19 +29,35 @@
<p id="campaign-description">{{ campaign.description|linebreaksbr }}</p>
<!-- Campaign end times -->
<div>
<time id="campaign-end-time"
datetime="{{ campaign.end_at|date:'c' }}"
title="{{ campaign.end_at|date:'DATETIME_FORMAT' }}">
<strong>Ends in</strong> {{ campaign.end_at|timeuntil }}
</time>
{% if campaign.end_at < now %}
<time id="campaign-end-time"
datetime="{{ campaign.end_at|date:'c' }}"
title="{{ campaign.end_at|date:'DATETIME_FORMAT' }}">
<strong>Ended</strong> {{ campaign.end_at|timesince }} ago
</time>
{% else %}
<time id="campaign-end-time"
datetime="{{ campaign.end_at|date:'c' }}"
title="{{ campaign.end_at|date:'DATETIME_FORMAT' }}">
<strong>Ends in</strong> {{ campaign.end_at|timeuntil }}
</time>
{% endif %}
</div>
<!-- Campaign start times -->
<div>
<time id="campaign-start-time"
datetime="{{ campaign.start_at|date:'c' }}"
title="{{ campaign.start_at|date:'DATETIME_FORMAT' }}">
<strong>Started</strong> {{ campaign.start_at|timesince }} ago
</time>
{% if campaign.start_at > now %}
<time id="campaign-start-time"
datetime="{{ campaign.start_at|date:'c' }}"
title="{{ campaign.start_at|date:'DATETIME_FORMAT' }}">
<strong>Starts in</strong> {{ campaign.start_at|timeuntil }}
</time>
{% else %}
<time id="campaign-start-time"
datetime="{{ campaign.start_at|date:'c' }}"
title="{{ campaign.start_at|date:'DATETIME_FORMAT' }}">
<strong>Started</strong> {{ campaign.start_at|timesince }} ago
</time>
{% endif %}
</div>
<!-- Campaign added times -->
<div>
@ -56,7 +72,7 @@
<time id="campaign-duration"
datetime="{{ campaign.start_at|date:'c' }} to {{ campaign.end_at|date:'c' }}"
title="{{ campaign.start_at|date:'DATETIME_FORMAT' }} to {{ campaign.end_at|date:'DATETIME_FORMAT' }}">
<strong>Duration</strong> {{ campaign.start_at|timesince:campaign.end_at }} ago
<strong>Duration</strong> {{ campaign.start_at|timesince:campaign.end_at }}
</time>
</div>
<!-- Campaign Detail URL -->
@ -117,20 +133,13 @@
<tr id="drop-{{ drop.drop.id }}">
<td>
{% for benefit in drop.drop.benefits.all %}
{% if benefit.image_best_url or benefit.image_asset_url %}
{% if benefit.image_asset_url %}
<img height="160"
width="160"
style="object-fit: cover;
margin-right: 3px"
src="{{ benefit.image_best_url|default:benefit.image_asset_url }}"
alt="{{ benefit.name }}">
{% else %}
<img height="160"
width="160"
style="object-fit: cover;
margin-right: 3px"
src="{% static 'images/placeholder.png' %}"
alt="No Image Available">
{% endif %}
{% endfor %}
</td>

View file

@ -53,8 +53,8 @@
style="margin-bottom: 3rem">
<div style="display: flex; gap: 1rem;">
<div style="flex-shrink: 0;">
{% if game_group.grouper.box_art_best_url %}
<img src="{{ game_group.grouper.box_art_best_url }}"
{% if game_group.grouper.box_art_base_url %}
<img src="{{ game_group.grouper.box_art_base_url }}"
alt="Box art for {{ game_group.grouper.display_name }}"
width="120"
height="160"

View file

@ -46,7 +46,7 @@ Hover over the end time to see the exact date and time.
flex-shrink: 0">
<div>
<a href="{% url 'twitch:campaign_detail' campaign.id %}">
<img src="{{ campaign.image_best_url|default:campaign.image_url }}"
<img src="{{ campaign.image_url }}"
alt="Image for {{ campaign.name }}"
width="120"
height="120"

View file

@ -9,11 +9,11 @@
{% if game.display_name != game.name and game.name %}<small>({{ game.name }})</small>{% endif %}
</h1>
<!-- Game image -->
{% if game.box_art_best_url %}
{% if game.box_art %}
<img id="game-image"
height="160"
width="160"
src="{{ game.box_art_best_url }}"
src="{{ game.box_art }}"
alt="{{ game.name }}">
{% endif %}
<!-- Game owner -->

View file

@ -22,8 +22,8 @@
flex: 1 1 160px;
text-align: center">
<div style="margin-bottom: 0.25rem;">
{% if item.game.box_art_best_url %}
<img src="{{ item.game.box_art_best_url }}"
{% if item.game.box_art_base_url %}
<img src="{{ item.game.box_art_base_url }}"
alt="Box art for {{ item.game.display_name }}"
width="180"
height="240"