Improve HTML on profile and game details

This commit is contained in:
Joakim Hellsén 2025-08-04 00:01:34 +02:00
commit 2ff314ecc8
10 changed files with 60 additions and 16 deletions

View file

@ -26,4 +26,19 @@
</tr>
</table>
<a href="{% url 'accounts:logout' %}">Logout</a>
<h2>Will get notifications to:</h2>
<ul>
{% for subscription in subscriptions %}
<li>
{% if subscription.game_id %}
<a href="{% url 'twitch:game_detail' subscription.game_id %}">{{ subscription.game.display_name }}</a>
{% endif %}
{% if subscription.organization_id %}
<a href="{% url 'twitch:organization_detail' subscription.organization_id %}">{{ subscription.organization.name }}</a>
{% endif %}
</li>
{% empty %}
<li>You have no subscriptions yet.</li>
{% endfor %}
</ul>
{% endblock content %}

View file

@ -9,7 +9,7 @@
</h1>
<p>
{# TODO: Link to organization #}
<a href="{% url 'twitch:org_detail' campaign.owner.id %}">{{ campaign.owner.name }}</a>
<a href="{% url 'twitch:organization_detail' campaign.owner.id %}">{{ campaign.owner.name }}</a>
</p>
{% if campaign.image_url %}
<img height="70"

View file

@ -4,6 +4,9 @@
{% endblock title %}
{% block content %}
<h1>{{ game.display_name }}</h1>
{% if owner %}
<small><a href="{% url 'twitch:organization_detail' owner.id %}">{{ owner.name }}</a></small>
{% endif %}
{% if user.is_authenticated %}
<form method="post"
action="{% url 'twitch:subscribe_notifications' game_id=game.id %}">

View file

@ -8,7 +8,7 @@
<ul>
{% for organization in orgs %}
<li>
<a href="{% url 'twitch:org_detail' organization.id %}">{{ organization.name }}</a>
<a href="{% url 'twitch:organization_detail' organization.id %}">{{ organization.name }}</a>
</li>
{% endfor %}
</ul>

View file

@ -13,14 +13,14 @@
id="found"
name="notify_found"
{% if subscription and subscription.notify_found %}checked{% endif %} />
<label for="found">🔔 Notify me when a drop for {{ organization.name }} appears on Twitch.</label>
<label for="found">🔔 Get notified as soon as a drop for {{ organization.name }} appears on Twitch.</label>
</div>
<div>
<input type="checkbox"
id="live"
name="notify_live"
{% if subscription and subscription.notify_live %}checked{% endif %} />
<label for="live">🎮 Notify me when the drop is live and ready to be farmed.</label>
<label for="live">🎮 Get notified when the drop is live and ready to be farmed.</label>
</div>
<button type="submit">Save preferences</button>
</form>