aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/base
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2021-05-16 18:42:50 +0100
committerGravatar GitHub <[email protected]>2021-05-16 18:42:50 +0100
commit8c7c3b137fb6c60818d29ac3d14ebb397357ee0e (patch)
treefec5581d5e27fc860db6424f7c1d6a3a71565693 /pydis_site/templates/base
parentResolve conflicts (diff)
parentMerge pull request #501 from python-discord/update/sir-lancebot-env-vars (diff)
Merge branch 'main' into fix_327
Diffstat (limited to 'pydis_site/templates/base')
-rw-r--r--pydis_site/templates/base/base.html17
-rw-r--r--pydis_site/templates/base/navbar.html70
2 files changed, 12 insertions, 75 deletions
diff --git a/pydis_site/templates/base/base.html b/pydis_site/templates/base/base.html
index 70426dc1..906fc577 100644
--- a/pydis_site/templates/base/base.html
+++ b/pydis_site/templates/base/base.html
@@ -1,6 +1,5 @@
{# Base template, with a few basic style definitions. #}
{% load django_simple_bulma %}
-{% load sekizai_tags %}
{% load static %}
<!DOCTYPE html>
@@ -28,30 +27,15 @@
{# Font-awesome here is defined explicitly so that we can have Pro #}
<script src="https://kit.fontawesome.com/ae6a3152d8.js"></script>
- <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 %}
- {% render_block "css" %}
</head>
<body class="site">
<!-- 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 %}
@@ -61,6 +45,5 @@
{% include "base/footer.html" %}
{% endblock %}
-{% render_block "js" %}
</body>
</html>
diff --git a/pydis_site/templates/base/navbar.html b/pydis_site/templates/base/navbar.html
index 64e3654b..4cc49dc6 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">
@@ -65,64 +64,40 @@
More
</a>
<div class="navbar-dropdown">
- <a class="navbar-item" href="{% url 'wiki:get' path="resources/" %}">
+ <a class="navbar-item" href="{% url "resources:index" %}">
Resources
</a>
- <a class="navbar-item" href="{% url 'wiki:get' path="resources/tools/" %}">
+ <a class="navbar-item" href="{% url "resources:resources" category="tools" %}">
Tools
</a>
- <a class="navbar-item" href="{% url 'wiki:get' path="contributing/" %}">
+ <a class="navbar-item" href="{% url "content:page_category" location="guides/pydis-guides/contributing"%}">
Contributing
</a>
- <a class="navbar-item" href="{% url 'wiki:get' path="frequently-asked-questions/" %}">
+ <a class="navbar-item" href="{% url "content:page_category" location="frequently-asked-questions" %}">
FAQ
</a>
- <a class="navbar-item" href="{% url 'wiki:get' path="rules/" %}">
+ <a class="navbar-item" href="{% url 'timeline' %}">
+ Timeline
+ </a>
+ <a class="navbar-item" href="{% url "content:page_category" location="rules" %}">
Rules
</a>
- <a class="navbar-item" href="{% url 'wiki:get' path="code-of-conduct/" %}">
+ <a class="navbar-item" href="{% url "content:page_category" location="code-of-conduct" %}">
Code of Conduct
</a>
- <a class="navbar-item" href="{% url 'wiki:get' path="privacy/" %}">
+ <a class="navbar-item" href="{% url "content:page_category" location="privacy" %}">
Privacy
</a>
<hr class="navbar-divider">
<div class="navbar-item">
<strong>Events</strong>
</div>
- <a class="navbar-item" href="{% url 'wiki:get' path="code-jams/code-jam-7/" %}">
+ <a class="navbar-item" href="{% url "events:page" path="code-jams/7" %}">
Most Recent: Code Jam 7
</a>
- <a class="navbar-item" href="{% url 'wiki:get' path="events/" %}">
+ <a class="navbar-item" href="{% url "events:index" %}">
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>
@@ -135,24 +110,3 @@
</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 %}