{# Game Card Component Parameters: - game: The game object with all properties - view_mode: 'grid', 'list', or 'covers' (optional, defaults to 'grid') - show_completion: Whether to show completion progress (optional, defaults to true) - show_platforms: Whether to show platform badges (optional, defaults to true) - show_genres: Whether to show genre tags (optional, defaults to true) - show_playtime: Whether to show playtime (optional, defaults to true) #} {% set view_mode = view_mode|default('grid') %} {% set show_completion = show_completion|default(true) %} {% set show_platforms = show_platforms|default(true) %} {% set show_genres = show_genres|default(true) %} {% set show_playtime = show_playtime|default(true) %} {% if view_mode == 'list' %}
  • {% if game.image_url %}
    {{ game.title }}
    {% else %}
    {% endif %} {% if show_completion and game.max_completion > 0 %}
    {{ game.max_completion }}%
    {% endif %}

    {{ game.title }}

    {% if show_platforms %}
    {{ game.platform_count }} platform{{ game.platform_count > 1 ? 's' : '' }}
    {% endif %} {% if show_playtime and game.total_playtime %}
    {{ game.total_playtime|format_duration }}
    {% endif %}
    {% if show_platforms and game.platforms %}
    {% for platform in game.platforms|slice(0, 3) %} {{ platform }} {% endfor %} {% if game.platforms|length > 3 %} +{{ game.platforms|length - 3 }} more {% endif %}
    {% endif %}
    {% if show_genres and game.genres %}
    {% for genre in game.genres|slice(0, 2) %} {{ genre }} {% endfor %} {% if game.genres|length > 2 %} +{{ game.genres|length - 2 }} {% endif %}
    {% endif %}
  • {% elseif view_mode == 'covers' %}
    {% if game.image_url %}
    {{ game.title }}
    {% else %}
    No Cover
    {% endif %} {% if show_completion and game.max_completion > 0 %}
    {{ game.max_completion }}%
    {% endif %} {% if show_platforms %}
    {{ game.platform_count }}P
    {% endif %}

    {{ game.title }}

    {% if show_playtime and game.total_playtime %}
    {{ game.total_playtime|format_duration }}
    {% endif %} {% if show_platforms and game.platforms %}
    {% for platform in game.platforms|slice(0, 2) %} {{ platform }} {% endfor %} {% if game.platforms|length > 2 %} +{{ game.platforms|length - 2 }} {% endif %}
    {% endif %}
    {% else %}
    {% if game.image_url %}
    {{ game.title }}
    {% else %}
    No Cover
    {% endif %} {% if show_platforms %}
    {{ game.platform_count }} platform{{ game.platform_count > 1 ? 's' : '' }}
    {% endif %}

    {{ game.title }}

    {% if show_platforms and game.platforms %}
    {% for platform in game.platforms|slice(0, 2) %} {{ platform }} {% endfor %} {% if game.platforms|length > 2 %} +{{ game.platforms|length - 2 }} more {% endif %}
    {% endif %}
    {% if show_completion and game.max_completion > 0 %}
    Completion {{ game.max_completion }}%
    {% endif %} {% if show_playtime and game.total_playtime %}
    Playtime
    {{ game.total_playtime|format_duration }}
    {% endif %}
    {% if show_genres and game.genres %}
    {% for genre in game.genres|slice(0, 2) %} {{ genre }} {% endfor %} {% if game.genres|length > 2 %} +{{ game.genres|length - 2 }} {% endif %}
    {% endif %}
    {% endif %}