{% extends "layouts/app.twig" %} {% block content %}

Games

{% if pagination.total_items > 0 %}
{{ pagination.total_items }} games from {{ games|reduce((carry, game) => carry + game.platform_count, 0) }} platforms {% if search %} matching "{{ search }}" {% endif %}
{% endif %}
{% if games is empty %}

{% if search %} No games found matching "{{ search }}" {% else %} No games found {% endif %}

{% if search %} Try adjusting your search terms or browse all games. {% else %} Start syncing your gaming libraries to see your games here. {% endif %}

{% if search %} View all games {% endif %}
{% else %} {% if view_mode == 'list' %}
{% elseif view_mode == 'covers' %}
{% for game in games %}
{% if game.image_url %}
{{ game.title }}
{% else %}
{% endif %}
{{ game.title }}

{{ game.platform_count }} platform{{ game.platform_count > 1 ? 's' : '' }}

{% endfor %}
{% else %}
{% for game in games %}
{% if game.image_url %} {{ game.title }} {% else %}
{% endif %}
{{ game.title }}

{{ game.platform_count }} platform{{ game.platform_count > 1 ? 's' : '' }} {% if game.platforms %} {{ game.platforms|join(', ') }} {% endif %}

{{ game.total_playtime|format_duration }} played {% if game.max_completion > 0 %} {{ game.max_completion }}% complete {% endif %}
{% if game.genres %}
{% for genre in game.genres|slice(0, 3) %} {{ genre }} {% endfor %}
{% endif %}
{% endfor %}
{% endif %} {% if pagination.total_pages > 1 %}
per page
{% if pagination.has_prev %} Previous {% endif %}
{% for page_num in range(max(1, pagination.current_page - 2), min(pagination.total_pages, pagination.current_page + 2)) %} {{ page_num }} {% endfor %}
{% if pagination.has_next %} Next {% endif %}
{% endif %} {% endif %}
{% endblock %}