diff options
author | 2020-10-04 20:06:19 +0200 | |
---|---|---|
committer | 2020-10-04 20:06:19 +0200 | |
commit | 892661ec8c93427a537d84b41cce42d138b8475e (patch) | |
tree | 5dc8fd747b2078c8f9e4eeff33bff2ad96049c69 | |
parent | Remove allauth references from the home app. (diff) |
Remove the login feature from the templates.
-rw-r--r-- | pydis_site/templates/base/base.html | 13 | ||||
-rw-r--r-- | pydis_site/templates/base/navbar.html | 49 |
2 files changed, 0 insertions, 62 deletions
diff --git a/pydis_site/templates/base/base.html b/pydis_site/templates/base/base.html index 905d408c..6fc0c6bb 100644 --- a/pydis_site/templates/base/base.html +++ b/pydis_site/templates/base/base.html @@ -30,7 +30,6 @@ <script src="{% static "js/base/modal.js" %}"></script> <link rel="stylesheet" href="{% static "css/base/base.css" %}"> - <link rel="stylesheet" href="{% static "css/base/notification.css" %}"> {% block head %}{% endblock %} </head> @@ -38,18 +37,6 @@ <!-- Git hash for this release: {{ git_sha }} --> <main class="site-content"> - {% if messages %} - <div class="messages"> - {% for message in messages %} - <div class="notification {% if message.tags %}is-{{ message.tags }}{% endif %}"> - <button class="delete"></button> - - {{ message }} - </div> - {% endfor %} - </div> - {% endif %} - {% block content %} {{ block.super }} {% endblock %} diff --git a/pydis_site/templates/base/navbar.html b/pydis_site/templates/base/navbar.html index dd68949b..6c8d52a1 100644 --- a/pydis_site/templates/base/navbar.html +++ b/pydis_site/templates/base/navbar.html @@ -1,4 +1,3 @@ -{% load socialaccount %} {% load static %} <nav class="navbar is-primary" role="navigation" aria-label="main navigation"> @@ -93,33 +92,6 @@ <a class="navbar-item" href="#"> All events </a> - <hr class="navbar-divider"> - - {% if not user.is_authenticated %} - {% 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 %} - - <div class="field navbar-item is-paddingless is-fullwidth is-grouped"> - <button type="submit" class="button is-white is-inline is-fullwidth has-text-left is-size-navbar-menu has-text-grey-dark">Logout</button> - <a title="Settings" class="button is-white is-inline has-text-right is-size-navbar-menu has-text-grey-dark modal-button" data-target="account-modal"> - <span class="is-icon"> - <i class="fas fa-cog"></i> - </span> - </a> - </div> - </form> - {% endif %} - </div> </div> </div> @@ -130,24 +102,3 @@ </a> </div> </nav> - -{% if user.is_authenticated %} - <script defer type="text/javascript"> - // Script which loads and sets up the account settings modal. - // This script must be placed in a template, or rewritten to take the fetch - // URL as a function argument, in order to be used. - - "use strict"; - - // Create and prepend a new div for this modal - let element = document.createElement("div"); - document.body.prepend(element); - - fetch("{% url "account_settings" %}") // Fetch the URL - .then((response) => response.text()) // Read in the data stream as text - .then((text) => { - element.outerHTML = text; // Replace the div's HTML with the loaded modal HTML - setupModal(document.getElementById("account-modal")); // Set up the modal - }); - </script> -{% endif %} |