Refactor game list layout to enhance usability and improve visual presentation
This commit is contained in:
parent
15caff2bc9
commit
8cd0b8ca1f
1 changed files with 54 additions and 19 deletions
|
|
@ -3,23 +3,58 @@
|
||||||
Games
|
Games
|
||||||
{% endblock title %}
|
{% endblock title %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<main>
|
||||||
|
<header>
|
||||||
<h1>Games</h1>
|
<h1>Games</h1>
|
||||||
|
<p>Browse all available games</p>
|
||||||
|
</header>
|
||||||
{% if games_by_org %}
|
{% if games_by_org %}
|
||||||
{% for organization, games in games_by_org.items %}
|
{% for organization, games in games_by_org.items %}
|
||||||
<h2>{{ organization.name }}</h2>
|
<section style="margin-bottom: 3rem;">
|
||||||
<table>
|
<h2 style="margin-bottom: 1rem;">{{ organization.name }}</h2>
|
||||||
<tbody>
|
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
||||||
{% for item in games %}
|
{% for item in games %}
|
||||||
<tr>
|
<article style="display: flex; gap: 1rem; align-items: center;">
|
||||||
<td>
|
<div style="flex-shrink: 0;">
|
||||||
<a href="{% url 'twitch:game_detail' item.game.id %}">{{ item.game.display_name }}</a>
|
{% if item.game.box_art_base_url %}
|
||||||
</td>
|
<img src="{{ item.game.box_art_base_url }}"
|
||||||
</tr>
|
alt="Box art for {{ item.game.display_name }}"
|
||||||
|
width="120"
|
||||||
|
height="160"
|
||||||
|
style="border-radius: 8px">
|
||||||
|
{% else %}
|
||||||
|
<div style="width: 120px;
|
||||||
|
height: 160px;
|
||||||
|
border: 1px solid;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 1rem">
|
||||||
|
🎮
|
||||||
|
<br>
|
||||||
|
No Image
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1;">
|
||||||
|
<h3 style="margin: 0;">
|
||||||
|
<a href="{% url 'twitch:game_detail' item.game.id %}"
|
||||||
|
style="text-decoration: none;
|
||||||
|
color: inherit">{{ item.game.display_name }}</a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
</section>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
No games found.
|
<section style="text-align: center; padding: 3rem 1rem;">
|
||||||
|
<div style="font-size: 4rem; margin-bottom: 1rem;">🎮</div>
|
||||||
|
<h2 style="margin: 0 0 1rem 0;">No Games Found</h2>
|
||||||
|
<p style="margin: 0; font-size: 1.1rem;">No games are currently available.</p>
|
||||||
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</main>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue