aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/base/navbar.html
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-10-18 12:34:09 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2019-10-18 12:34:09 +0200
commit6670a3ba48dad0b2e6e79d77d780c5ee77773e3e (patch)
tree30fdc507353e902f194fa84bfcb7516ea72903fd /pydis_site/templates/base/navbar.html
parentPrevent double active infractions with constraint (diff)
parentAdd Code of Conduct to navbar submenu (diff)
Merge branch 'master' into active-infractions-validation
Diffstat (limited to 'pydis_site/templates/base/navbar.html')
-rw-r--r--pydis_site/templates/base/navbar.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/pydis_site/templates/base/navbar.html b/pydis_site/templates/base/navbar.html
index ee68852a..8cdac0de 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">
@@ -76,6 +77,9 @@
<a class="navbar-item" href="{% url 'wiki:get' path="rules/" %}">
Rules
</a>
+ <a class="navbar-item" href="{% url 'wiki:get' path="code-of-conduct/" %}">
+ Code of Conduct
+ </a>
<a class="navbar-item" href="{% url 'wiki:get' path="privacy/" %}">
Privacy
</a>
@@ -83,6 +87,25 @@
<a class="navbar-item" href="{% url 'wiki:get' path="code-jams/" %}">
Code Jams
</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 %}
+ <button type="submit" class="navbar-item button is-white is-inline is-fullwidth has-text-left is-size-navbar-menu has-text-grey-dark">Logout</button>
+ </form>
+ {% endif %}
+
</div>
</div>
</div>