{% extends "webapp/base.html" %} {% from "webapp/_game_logo.html" import glogo, glogo_hero %} {% from "webapp/_lb_macros.html" import lb_tabs, lb_table, lb_script with context %} {% block title %}{{ t('home') | default('Home') }} — {{ t('brand') }}{% endblock %} {% block content %}

COMPETE. WIN. DOMINATE.

{{ t('tagline') }} — Join competitive tournaments, challenge players, earn rewards and climb the leaderboard.

1,284 {{ t('players_online') | default('Players Online') }}
42 {{ t('tournaments_live') | default('Tournaments Live') }}
02:14 {{ t('next_match') | default('Next Match starts in') }}

{{ t('games') }}

{{ t('view_all') | default('View All Games') }} →
{% for g in games %}
{{ glogo(g, 'md') }}
{{ g.modes.filter_by(is_active=True).count() }} {{ t('modes') | default('modes') }}

{{ g.name }}

{{ g.modes.filter_by(is_active=True).count() }} {{ t('modes') | default('modes') }}

{{ t('play') | default('PLAY') }} →
{% else %}
🎮

{{ t('no_games') | default('No Games Available') }}

{{ t('no_games_desc') | default('Games are being added. Check back soon!') }}

{% endfor %}

{{ t('special_matches') | default('LIVE TOURNAMENTS') }}

{% if matches %}
{% for m in matches %}
{{ glogo(m.game, 'md') }}

{{ m.title }}

{{ m.entry_fee == 0 and t('free') | default('FREE') or '$' ~ m.entry_fee }} {% if m.prize_pool > 0 %} ${{ m.prize_pool }} {% endif %}
{{ m.current_players }} {{ t('players') | default('Players') }}
{{ m.capacity }} {{ t('capacity') | default('Capacity') }}
{% if m.status == 'upcoming' and m.starts_at %}
{{ m.starts_at.strftime('%H:%M') }} {{ t('starts_at') | default('Starts At') }}
{% endif %}
{% if m.status == 'live' %} {{ t('join_now') | default('JOIN NOW') }} → {% elif m.status == 'upcoming' %} {{ t('view') | default('VIEW') }} {% else %} {{ t('results') | default('RESULTS') }} {% endif %}
{% endfor %}
{% else %}
🏆

{{ t('no_tournaments') | default('No Tournaments Found') }}

{{ t('no_tournaments_desc') | default('No active tournaments. Be the first to create one!') }}

{% endif %}
{% if featured_match %}

{{ t('featured') | default('FEATURED') }}

{% endif %}

{{ t('prize_pool') | default('THIS MONTH\'S PRIZES') }}

$5,000
🥇 {{ t('first_place') | default('1st Place') }}
$2,500
🥈 {{ t('second_place') | default('2nd Place') }}
$1,250
🥉 {{ t('third_place') | default('3rd Place') }}
${{ t('total_prizes') | default('12,450') }}
{{ t('total_prizes_this_month') | default('TOTAL PRIZES THIS MONTH') }}

{{ t('leaderboard') | default('LEADERBOARD') }}

{{ t('view_all') | default('View All') }} →
{% if leaderboard_entries %}
{{ lb_tabs(active='global') }}
{{ lb_table(leaderboard_entries[:10], me_id=session.get('user_id'), hint=t('lb_hint_global') | default('All-time points')) }}
{{ lb_table(weekly_entries[:10], me_id=session.get('user_id'), hint=t('lb_hint_week') | default('Points earned in the last 7 days')) }}
{{ lb_table(monthly_entries[:10], me_id=session.get('user_id'), hint=t('lb_hint_month') | default('Points earned in the last 30 days')) }}
{% else %}
📊

{{ t('no_leaderboard_data') | default('No leaderboard data yet') }}

{% endif %}
{% if not session.get('user_id') %}

{{ t('how_it_works') | default('HOW IT WORKS') }}

01
{{ t('create_account') | default('CREATE ACCOUNT') }}
02
{{ t('join_tournament') | default('JOIN TOURNAMENT') }}
03
{{ t('play_and_win') | default('PLAY & WIN') }}
04
{{ t('climb_leaderboard') | default('CLIMB LEADERBOARD') }}
{% else %}

{{ t('quick_actions') | default('QUICK ACTIONS') }}

🏆
{{ t('join_tournament') | default('JOIN TOURNAMENT') }}
🎮
{{ t('browse_games') | default('BROWSE GAMES') }}
📊
{{ t('view_leaderboard') | default('VIEW LEADERBOARD') }}
🎁
{{ t('my_rewards') | default('MY REWARDS') }}
{% endif %} {% endblock %} {% block scripts %} {{ lb_script() }} {% endblock %}