{% extends 'JotunheimrUserBundle::layout.html.twig' %}

{% trans_default_domain 'FOSUserBundle' %}

{% block title %} - Sign in{% endblock %}

{% block fos_user_content %}
    {% if error %}
        {{ error.messageKey|trans(error.messageData, 'security') }}
    {% endif %}

    <section class="header-content">
        <div class="logo">
            <a href="{{ path('MineSeekerBundle_homepage') }}" target="_self">
                <img src="{{ asset('bundles/mineseeker/images/mine-logo-txt.png') }}" alt="MineSeeker Logo w/ Txt"
                     border="0"/>
            </a>
        </div>
        <h1>Sign in</h1>
        <form action="{{ path("fos_user_security_check") }}" method="post"
              class="ac-custom ac-checkbox ac-boxfill">

            {% if csrf_token %}
                <input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/>
            {% endif %}

            {% if error %}
                <div class="failure-main">
                    <i class="fa fa-exclamation-circle"></i> <strong>Login error!</strong> {{ error.messageKey|trans({}, 'messages') }}
                </div>
            {% endif %}

            <input type="text" id="username" name="_username" value="{{ last_username }}"
                   class="form-input form-username"
                   placeholder="Username or Email"/>

            <input type="password" id="password" name="_password"
                   class="form-input"
                   placeholder="Password"/>

            <div class="form-check">
                <input type="checkbox" id="remember-me" name="_remember_me" value="on"/>
                <label for="remember-me">{{ 'security.login.remember_me'|trans }}</label>
            </div>

            <div class="input-submit">
                <button type="submit" id="_submit" name="_submit">
                    <i class="fa fa-check"></i>
                </button>
            </div>
        </form>
        <h3 class="or">or login <u>w/ one click</u></h3>
        <div class="buttons">
            {% include('@JotunheimrUser/Social/facebook.html.twig') %}
            {#<a class="slack-login"#}
            {#href="https://slack.com/oauth/authorize?scope=identity.basic,identity.email,identity.team,identity.avatar&client_id=107639806167.106953365090&redirect_uri=http://mine.dev">#}
            {#<i class="fa fa-slack"></i><span>w/ Slack</span>#}
            {#</a>#}
        </div>
        <img src="{{ asset('bundles/mineseeker/images/mine-logo-logo.png') }}" alt="MineSeeker Logo" border="0"/>
    </section>
{% endblock fos_user_content %}

{% block body %}
    <div class="txt">
        <div class="technologies">
            <h1>Used technologies</h1>
            <img src="{{ asset('bundles/mineseeker/images/technologies/websocket.png') }}" alt="Used Websocket" border="0"/>
            <img src="{{ asset('bundles/mineseeker/images/technologies/react.png') }}" alt="Used React.js" border="0"/>
            <img src="{{ asset('bundles/mineseeker/images/technologies/symfony.png') }}" alt="Used Symfony" border="0"/>
            <img src="{{ asset('bundles/mineseeker/images/technologies/jquery.png') }}" alt="Used jQuery" border="0"/>
            <img src="{{ asset('bundles/mineseeker/images/technologies/lets-encrypt.png') }}" alt="Used Let's Encrypt" border="0"/>
        </div>
    </div>
{% endblock %}

{% block footer %}
    <nav>
        <ul>
            <li><a href="{{ path('MineSeekerBundle_homepage') }}">Homepage</a></li>
            <li>&middot;</li>
            <li><a href="{{ path('MineSeekerBundle_terms') }}">Terms of Use</a></li>
            <li>&middot;</li>
            <li><a href="{{ path('MineSeekerBundle_privacy') }}">Privacy Policy</a></li>
            <li>&middot;</li>
            <li><a href="{{ path('MineSeekerBundle_contact') }}">Contact</a></li>
        </ul>
    </nav>
{% endblock %}

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

    {% javascripts filter='?uglifyjs2'
    '@JotunheimrUserBundle/Resources/public/js/register.js'
    '@JotunheimrUserBundle/Resources/public/js/svgcheckbox.js' %}
    <script type="text/javascript" src="{{ asset_url }}"></script>
    {% endjavascripts %}
{% endblock %}

{% block stylesheets %}
    {{ parent() }}

    {% stylesheets filter='?uglifycss'
    '@JotunheimrUserBundle/Resources/public/css/font-awesome/css/font-awesome.min.css'
    '@JotunheimrUserBundle/Resources/public/css/svgcheckbox.css' %}
    <link rel="stylesheet" media="screen" href="{{ asset_url }}"/>
    {% endstylesheets %}
{% endblock %}
