<!DOCTYPE html>
<html lang="{{ app.request.locale|default(app.request.defaultLocale|default('en')) }}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}{{ 'site.name'|trans }}{% endblock %}</title>
    {% block stylesheets %}
            {{ encore_entry_link_tags('app') }}
        {{ encore_entry_link_tags('app') }}
    {% endblock %}
</head>
<body>
<header>
    <nav>
        {% set pathinfo = app.request.pathinfo %}
        <a href="/">{{ 'nav.home'|trans }}</a> |
        <a href="/game">{{ 'nav.game'|trans }}</a> |
        {% if app.user %}
            <a href="{{ path('app_logout') }}">Logout</a>
        {% else %}
            <a href="{{ path('app_register') }}">Register</a> |
            <a href="{{ path('app_login') }}">Login</a>
        {% endif %}
    </nav>
</header>
<main>
    {% for label, messages in app.flashes %}
        {% for message in messages %}
            <div class="alert alert-{{ label }}">
                {{ message }}
            </div>
        {% endfor %}
    {% endfor %}
    {% block body %}{% endblock %}
</main>
<footer>
    <small>&copy; {{ "now"|date("Y") }} {{ 'site.name'|trans }}</small>
</footer>
{% block javascripts %}
    {{ encore_entry_script_tags('app') }}
{% endblock %}
</body>
</html>
