{% extends 'base.html' %}
{% load i18n %}
{% load crispy_forms_tags %}



{% block main %}
{% if request.user.is_authenticated %}
	<div class="card text-white bg-secondary mb-3">
	<div class="card-header">Oups ! </div>
	<div class="card-body">
		<p class="card-text">
			Pardon, mais vous étez deja connecté. <a href="{% url 'core_index' %}">Retourné à accueil</a>
		</p>
		</dev>
	</div>
{% else %}
	<div class="col-sm-9 p-0">
	<div class="card text-white bg-dark mb-3">
		<div class="card-header">Connection</div>
		<div class="card-body">
		<form method="post">{% csrf_token %}
			{{ form|crispy }}
			<input type="submit" class="btn btn-success" value="Se connecter">
		</form>
		</div>
	</div>
	</div>

	<div class="row">
		<div class="col-lg-12 col-sm-6 col-xl-6 mb-1"><a href="{% url 'social:begin' 'twitter' %}?next={{ request.path }}" class="btn btn-secondary btn-block"><i class="fas fa-twitter" ></i> Se connecter avec Twitter</a></div>
		<div class="col-lg-12 col-sm-6 col-xl-6 mb-1"><a href="{% url 'social:begin' 'facebook' %}?next={{ request.path }}" class="btn btn-primary btn-block"><i class="fas fa-facebook-official" ></i> Se connecter avec  Facebook</a></div>
	</div>
{% endif %}
{% endblock %}

{% block right_panel %}
<div>
	<div class="row">
	<div class="col-lg-12 col-sm-6 col-xl-6 mb-1"><a href="{% url 'core_index' %}" class="btn btn-secondary btn-block"><i class="fas fa-ban" ></i> Annuler</a></div>
	<div class="col-12 mb-1"><p>Vous pouvez aussi <a href="{{ password_reset_url }}?next={{ profile_update_url }}">réinitialisez votre mot de passe</a> si vous l'avez oublié.</p></div>
	</div>
</div>
{% endblock %}

