Add /games page and add checkboxes for subscribing to games
This commit is contained in:
29
core/templates/games.html
Normal file
29
core/templates/games.html
Normal file
@ -0,0 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
{% for game in games %}
|
||||
<div class="col-xl-3 col-lg-4 col-md-6 col-sm-12 mb-4">
|
||||
<div class="card h-100 shadow-sm">
|
||||
<img src="{{ game.image_url }}"
|
||||
class="card-img-top"
|
||||
alt="{{ game.display_name }}">
|
||||
<div class="card-body d-flex flex-column">
|
||||
<h5 class="card-title">{{ game.display_name }}</h5>
|
||||
<div class="mt-auto">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="new">
|
||||
<label class="form-check-label" for="new">Notify when new</label>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="live">
|
||||
<label class="form-check-label" for="live">Notify when farmable</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
@ -18,7 +18,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Games Column -->
|
||||
<div class="col-lg-9">
|
||||
{% for game in games %}
|
||||
<div class="card mb-4 shadow-sm" id="game-{{ game.game_id }}">
|
||||
@ -36,6 +35,18 @@
|
||||
<h2 class="card-title h5">
|
||||
<a href="{{ game.twitch_url }}" class="text-decoration-none">{{ game.display_name }}</a>
|
||||
</h2>
|
||||
<div class="mt-auto">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="new">
|
||||
<label class="form-check-label" for="new">
|
||||
Notify when new drop is found on <a href="https://www.twitch.tv/drops/campaigns">Twitch</a>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="live">
|
||||
<label class="form-check-label" for="live">Notify when a drop starts</label>
|
||||
</div>
|
||||
</div>
|
||||
{% for campaign in game.campaigns %}
|
||||
{% if not forloop.first %}<br>{% endif %}
|
||||
<div class="mt-3">
|
||||
|
@ -5,6 +5,9 @@
|
||||
</h1>
|
||||
<nav>
|
||||
<ul class="nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href='{% url "core:games" %}'>Games</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href='{% url "api-1.0.0:openapi-view" %}'>API</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user