Remove bloat
This commit is contained in:
parent
011c617328
commit
715cbf4bf0
51 changed files with 691 additions and 3032 deletions
|
|
@ -1,42 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}
|
||||
Login
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<h4 id="page-title">Login</h4>
|
||||
{% if form.errors %}
|
||||
<ul id="error-list">
|
||||
{% for field, errors in form.errors.items %}
|
||||
{% for error in errors %}<li>{{ error }}</li>{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<form id="login-form" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="{{ form.username.id_for_label }}">Username</label>
|
||||
<input type="text"
|
||||
name="username"
|
||||
id="{{ form.username.id_for_label }}"
|
||||
value="{{ form.username.value|default:'' }}"
|
||||
required>
|
||||
<label for="{{ form.password.id_for_label }}">Password</label>
|
||||
<input type="password"
|
||||
name="password"
|
||||
id="{{ form.password.id_for_label }}"
|
||||
required>
|
||||
<button id="login-button" type="submit">Login</button>
|
||||
</form>
|
||||
<p>
|
||||
Don't have an account? <a id="signup-link" href="{% url 'accounts:signup' %}">Sign up here</a>
|
||||
</p>
|
||||
<style>
|
||||
.form-control {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
background-color: #f8f9fa;
|
||||
border-right: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}
|
||||
{{ user.username }}
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<h2 id="username">{{ user.username }}</h2>
|
||||
<p>
|
||||
Joined <time id="date-joined">{{ user.date_joined|date:"F d, Y" }}</time>
|
||||
</p>
|
||||
<table id="user-info-table">
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Date Joined:</strong>
|
||||
</td>
|
||||
<td>{{ user.date_joined|date:"F d, Y" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Last Login:</strong>
|
||||
</td>
|
||||
<td>{{ user.last_login|date:"F d, Y H:i"|default:"Never" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Email:</strong>
|
||||
</td>
|
||||
<td>{{ user.email|default:"Not provided" }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a id="logout-link" href="{% url 'accounts:logout' %}">Logout</a>
|
||||
<h2>Will get notifications for these subscriptions:</h2>
|
||||
<h3 id="games-subscriptions-header">Games</h3>
|
||||
<ul id="games-subscriptions-list">
|
||||
{% for item in games_with_inheritance %}
|
||||
<li id="game-subscription-{{ item.game.id }}">
|
||||
<a href="{% url 'twitch:game_detail' item.game.id %}">{{ item.game.display_name }}</a>
|
||||
{% if item.is_inherited %}
|
||||
<span style="font-size: 0.85em; color: #666; font-style: italic;">(inherited from {{ item.inherited_from }})</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% empty %}
|
||||
<li>You have no game subscriptions yet.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h3 id="org-subscriptions-header">Organizations</h3>
|
||||
<ul id="org-subscriptions-list">
|
||||
{% for subscription in org_subscriptions %}
|
||||
<li id="org-subscription-{{ subscription.organization_id }}">
|
||||
<a href="{% url 'twitch:organization_detail' subscription.organization_id %}">{{ subscription.organization.name }}</a>
|
||||
</li>
|
||||
{% empty %}
|
||||
<li>You have no organization subscriptions yet.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}
|
||||
Sign Up
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<h4 id="page-title">Sign Up</h4>
|
||||
{% if form.errors %}
|
||||
<ul id="error-list">
|
||||
{% for field, errors in form.errors.items %}
|
||||
{% for error in errors %}<li>{{ error }}</li>{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<form id="signup-form" method="post">
|
||||
{% csrf_token %}
|
||||
<label for="{{ form.username.id_for_label }}">Username</label>
|
||||
<input type="text"
|
||||
name="username"
|
||||
id="{{ form.username.id_for_label }}"
|
||||
value="{{ form.username.value|default:'' }}"
|
||||
required>
|
||||
{% if form.username.help_text %}<small id="username-help">{{ form.username.help_text }}</small>{% endif %}
|
||||
<label for="{{ form.password1.id_for_label }}">Password</label>
|
||||
<input type="password"
|
||||
name="password1"
|
||||
id="{{ form.password1.id_for_label }}"
|
||||
required>
|
||||
{% if form.password1.help_text %}<small id="password1-help">{{ form.password1.help_text }}</small>{% endif %}
|
||||
<label for="{{ form.password2.id_for_label }}">Confirm Password</label>
|
||||
<input type="password"
|
||||
name="password2"
|
||||
id="{{ form.password2.id_for_label }}"
|
||||
required>
|
||||
{% if form.password2.help_text %}<small id="password2-help">{{ form.password2.help_text }}</small>{% endif %}
|
||||
<button id="signup-button" type="submit">Sign Up</button>
|
||||
</form>
|
||||
<p>
|
||||
Already have an account? <a id="login-link" href="{% url 'accounts:login' %}">Login here</a>
|
||||
</p>
|
||||
{% endblock content %}
|
||||
|
|
@ -79,17 +79,7 @@
|
|||
<a href="{% url 'twitch:org_list' %}">Organizations</a> |
|
||||
<a href="{% url 'twitch:channel_list' %}">Channels</a> |
|
||||
<a href="{% url 'twitch:docs_rss' %}">RSS</a> |
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'twitch:debug' %}">Debug</a> |
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url 'admin:index' %}">Admin</a> |
|
||||
{% endif %}
|
||||
<a href="{% url 'accounts:profile' %}">{{ user.username }}</a>
|
||||
{% else %}
|
||||
<a href="{% url 'accounts:login' %}">Login</a> |
|
||||
<a href="{% url 'accounts:signup' %}">Sign Up</a>
|
||||
{% endif %}
|
||||
|
|
||||
<a href="{% url 'twitch:debug' %}">Debug</a> |
|
||||
<form action="{% url 'twitch:search' %}"
|
||||
method="get"
|
||||
style="display: inline">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 -->
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue