{% load static %} 
{% include "header.html" with onload="onload='init()'" use_bg=True  %}
{% include "navigation.html"%}

    <center>
    <div style="width:300px;">
      <form class="form-signin" role="form" action='/login/' method='POST'>
        {% csrf_token %}
        <br />
        <br />
        <br />
        <h1>Rosetta <img src="/static/img/emoji_u1f6f0.png" style="height:84px; width:64px; padding-bottom:20px"></h1>
        <p style="font-size: 16px;">
        <br />
        <input style="margin-bottom:5px;" type="username" class="form-control" placeholder="Email" name='username' required autofocus>
        <input type="password" class="form-control" placeholder="Password" name='password'>
        <br />
        <input type='submit' style="width:110px" class="btn btn-lg btn-success btn-block" value='Log in' />
        
        {% if data.error %}
        <br/>
        <div class='centerbox-error'>
          {{ data.error }}
        </div>
        
        {% elif data.success %}
        <br/>
        <div class='centerbox-success'>
          {{data.success}}
        </div>
        
        {% else %}
        <br />
        
        {% endif %}
             

        </p>
      </form>      
    </div>
    {% if not data.success %}
    <b>Forgot password?</b><br/> Just leave it empty to get a login link by email!
    {% endif %}
    
    <br /><br /><br />
    </center>




{% include "footer.html" %}
