{% extends 'base.html' %}
{% block content %}
<div class="container mt-5">
    <h1>Games</h1>
    <div class="row">
        {% for game in games %}
        <div class="col-md-4">
            <div class="card mb-4">
                <div class="card-body">
                    <h5 class="card-title">{{ game.title }}</h5>
                    <p class="card-text">{{ game.description|truncatewords:20 }}</p>
                    <a href="{% url 'core:game_detail' game.pk %}" class="btn btn-primary">View</a>
                </div>
            </div>
        </div>
        {% endfor %}
    </div>
</div>
{% endblock %}
