Add grid and list views for games with improved templates and routing
This commit is contained in:
parent
408514d0c2
commit
ebd3633356
4 changed files with 40 additions and 4 deletions
|
|
@ -1,12 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}
|
||||
Games
|
||||
Games - Grid View
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<main>
|
||||
<header>
|
||||
<h1>All Games</h1>
|
||||
<p>Browse all available games</p>
|
||||
<p>
|
||||
<a href="{% url 'twitch:game_list_simple' %}">List View</a>
|
||||
</p>
|
||||
</header>
|
||||
{% if games_by_org %}
|
||||
<section>
|
||||
26
templates/twitch/games_list.html
Normal file
26
templates/twitch/games_list.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}
|
||||
Games - List View
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<main>
|
||||
<h1>Games List</h1>
|
||||
<p>
|
||||
<a href="{% url 'twitch:game_list' %}">Grid View</a>
|
||||
</p>
|
||||
{% if games_by_org %}
|
||||
{% for organization, games in games_by_org.items %}
|
||||
<h2>{{ organization.name }}</h2>
|
||||
<ul style="list-style: none; padding: 0; margin: 0;">
|
||||
{% for item in games %}
|
||||
<li>
|
||||
<a href="{% url 'twitch:game_detail' item.game.id %}">{{ item.game.display_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>No games found.</p>
|
||||
{% endif %}
|
||||
</main>
|
||||
{% endblock content %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue