{% extends '::base.html.twig' %}

{% block title %} - Play!{% endblock %}

{% block body %}
    <a class="back-from-game" href="{{ path('MineSeekerBundle_homepage') }}">
        <img src="{{ asset('bundles/mineseeker/images/mine-logo-txt.png') }}" alt="Mineseeker Logo">
    </a>
    <div class="mine-container">
        <div id="mine-wrapper"
             data-env="{{ env }}"
             data-ssl="{{ ssl }}"
             data-game-id="{{ app.request.get('gameAssoc') }}">
        </div>
    </div>
{% endblock %}

{% block metas %}
    <meta property="og:url" content="{{ url('MineSeekerBundle_gamePlay') }}"/>
    <meta property="og:type" content="website"/>
    <meta property="og:title" content="Your friend challenges YOU!"/>
    <meta property="og:description" content="Do you accept the challenge?"/>
    <meta property="og:image" content="{{ app.request.getSchemeAndHttpHost() }}{{ asset('bundles/mineseeker/images/mine-1600x627.png') }}"/>
{% endblock %}

{% block stylesheets %}
    {% stylesheets filter='?uglifycss'
    '@MineSeekerBundle/Resources/public/css/style.mineseeker.css' %}
    <link rel="stylesheet" media="screen" href="{{ asset_url }}" type="text/css"/>
    {% endstylesheets %}

    <style type="text/css">
        .mine-container {
            background: url('/bundles/mineseeker/images/bg-mineseeker-{{ random(1) }}-outbg.jpg') no-repeat;
        }
    </style>
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    {#{{ ws_client() }}#}

    {% if env == 'dev' %}
        {% javascripts filter='?uglifyjs2'
        '@GosWebSocketBundle/Resources/public/js/vendor/autobahn.min.js'
        '@GosWebSocketBundle/Resources/public/js/gos_web_socket_client.js'
        '@MineSeekerBundle/Resources/public/js/node/howler/dist/howler.min.js'
        '@MineSeekerBundle/Resources/public/js/node/js-base64/base64.min.js'
        '@MineSeekerBundle/Resources/public/js/index.js' %}
        <script type="text/javascript" src="{{ asset_url }}"></script>
        {% endjavascripts %}
    {% else %}
        {% javascripts filter='?uglifyjs2'
        '@GosWebSocketBundle/Resources/public/js/vendor/autobahn.min.js'
        '@GosWebSocketBundle/Resources/public/js/gos_web_socket_client.js'
        '@MineSeekerBundle/Resources/public/js/node/howler/dist/howler.min.js'
        '@MineSeekerBundle/Resources/public/js/node/js-base64/base64.min.js'
        '@MineSeekerBundle/Resources/public/js/index.min.js' %}
        <script type="text/javascript" src="{{ asset_url }}"></script>
        {% endjavascripts %}
    {% endif %}
{% endblock %}
