diff options
author | 2019-10-18 12:34:09 +0200 | |
---|---|---|
committer | 2019-10-18 12:34:09 +0200 | |
commit | 6670a3ba48dad0b2e6e79d77d780c5ee77773e3e (patch) | |
tree | 30fdc507353e902f194fa84bfcb7516ea72903fd /pydis_site/templates/base | |
parent | Prevent double active infractions with constraint (diff) | |
parent | Add Code of Conduct to navbar submenu (diff) |
Merge branch 'master' into active-infractions-validation
Diffstat (limited to 'pydis_site/templates/base')
-rw-r--r-- | pydis_site/templates/base/base.html | 24 | ||||
-rw-r--r-- | pydis_site/templates/base/navbar.html | 23 |
2 files changed, 47 insertions, 0 deletions
diff --git a/pydis_site/templates/base/base.html b/pydis_site/templates/base/base.html index a419521c..a9b31c0f 100644 --- a/pydis_site/templates/base/base.html +++ b/pydis_site/templates/base/base.html @@ -11,6 +11,17 @@ <meta name="description" content="{% block meta-description %}We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.{% endblock %}"> + {# Generated with https://realfavicongenerator.net/ #} + <link rel="apple-touch-icon" sizes="180x180" href="/static/favicons/apple-touch-icon.png?v=9B9vkE5q7O"> + <link rel="icon" type="image/png" sizes="32x32" href="/static/favicons/favicon-32x32.png?v=9B9vkE5q7O"> + <link rel="icon" type="image/png" sizes="16x16" href="/static/favicons/favicon-16x16.png?v=9B9vkE5q7O"> + <link rel="manifest" href="/static/favicons/site.webmanifest?v=9B9vkE5q7O"> + <link rel="mask-icon" href="/static/favicons/safari-pinned-tab.svg?v=9B9vkE5q7O" color="#7289da"> + <link rel="shortcut icon" href="/static/favicons/favicon.ico?v=9B9vkE5q7O"> + <meta name="msapplication-TileColor" content="#7289da"> + <meta name="msapplication-config" content="/static/favicons/browserconfig.xml?v=9B9vkE5q7O"> + <meta name="theme-color" content="#7289da"> + <title>Python Discord | {% block title %}Website{% endblock %}</title> {% bulma %} @@ -19,6 +30,7 @@ <script src="https://kit.fontawesome.com/ae6a3152d8.js"></script> <link rel="stylesheet" href="{% static "css/base/base.css" %}"> + <link rel="stylesheet" href="{% static "css/base/notification.css" %}"> {% block head %}{% endblock %} {% render_block "css" %} @@ -26,6 +38,18 @@ <body class="site"> <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 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> |