diff options
| author | 2019-10-06 21:27:11 +0100 | |
|---|---|---|
| committer | 2019-10-06 21:27:11 +0100 | |
| commit | e736381dc00b495a853b4aa71f1a4f381f665a76 (patch) | |
| tree | ac7da052eddeed1fe6ea25d567aad5c831c94283 /pydis_site/templates | |
| parent | Replace card on login page with notification (diff) | |
Prevent saving emails, remove login page
Diffstat (limited to 'pydis_site/templates')
| -rw-r--r-- | pydis_site/templates/base/navbar.html | 13 | ||||
| -rw-r--r-- | pydis_site/templates/home/login.html | 50 |
2 files changed, 10 insertions, 53 deletions
diff --git a/pydis_site/templates/base/navbar.html b/pydis_site/templates/base/navbar.html index f51f7c53..1d30b8f0 100644 --- a/pydis_site/templates/base/navbar.html +++ b/pydis_site/templates/base/navbar.html @@ -1,3 +1,4 @@ +{% load socialaccount %} {% load static %} <nav class="navbar is-primary" role="navigation" aria-label="main navigation"> @@ -86,9 +87,15 @@ <hr class="navbar-divider"> {% if not user.is_authenticated %} - <a class="navbar-item" href="{% url 'login' %}"> - Login - </a> + {% get_providers as socialaccount_providers %} + + {% for provider in socialaccount_providers %} + {% if provider.id == "discord" %} + <a class="navbar-item" + href="{% provider_login_url provider.id process="login" scope=scope auth_params=auth_params %}" + >Login with {{ provider.name }}</a> + {% endif %} + {% endfor %} {% else %} <form method="post" action="{% url 'logout' %}"> {% csrf_token %} diff --git a/pydis_site/templates/home/login.html b/pydis_site/templates/home/login.html deleted file mode 100644 index 2206e95c..00000000 --- a/pydis_site/templates/home/login.html +++ /dev/null @@ -1,50 +0,0 @@ -{% extends 'base/base.html' %} - -{% load account %} -{% load socialaccount %} -{% load static %} - -{% block title %}Login{% endblock %} -{% block head %} - <link rel="stylesheet" href="{% static "css/home/index.css" %}"> -{% endblock %} - -{% block content %} - {% include "base/navbar.html" %} - - {# Sponsors #} - <section class="section"> - <div class="container"> - <div class="columns is-mobile is-centered"> - <div class="column is-full-mobile is-full-tablet is-half-desktop"> - {% get_providers as socialaccount_providers %} - - <h1 class="title has-text-centered">Login with Discord</h1> - - <form method="post"> - {% csrf_token %} - - <div class="field notification is-horizontal"> - <input class="is-checkradio is-circle is-dark" type="checkbox" id="consent" name="consent" /> - <label for="consent"> - I consent to Python Discord using my Discord email address to identify my account - </label> - </div> - - <div class="field is-grouped-centered has-text-centered"> - <button class="button is-large is-primary" type="submit"> - <span class="icon"> - <i class="fab fa-discord"></i> - </span> - <span> - Login - </span> - </button> - </div> - </form> - </div> - </div> - </div> - </section> - -{% endblock %} |