aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/wiki/includes
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-15 11:45:46 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-15 11:45:46 +0100
commitab1b31e9091a173bf22712df9133328d0408ecee (patch)
tree43331a6d327e69e6dfa51329f9e55a5b76c12f8f /pydis_site/templates/wiki/includes
parentEditor: TOC insert correctly places on previous line rather than next line (diff)
Remove TOC, link headers, fix breadcrumb padding
Also removes some templates we don't care about
Diffstat (limited to 'pydis_site/templates/wiki/includes')
-rw-r--r--pydis_site/templates/wiki/includes/article_menu.html125
-rw-r--r--pydis_site/templates/wiki/includes/breadcrumbs.html4
2 files changed, 65 insertions, 64 deletions
diff --git a/pydis_site/templates/wiki/includes/article_menu.html b/pydis_site/templates/wiki/includes/article_menu.html
index 56762420..c6cb6bf0 100644
--- a/pydis_site/templates/wiki/includes/article_menu.html
+++ b/pydis_site/templates/wiki/includes/article_menu.html
@@ -1,83 +1,84 @@
{% load i18n wiki_tags %}
-{% with selected_tab as selected %}
- <nav class="navbar is-light" role="navigation" aria-label="wiki navigation">
- <div class="container">
- <div class="navbar-brand">
- {% if not user.is_anonymous %}
- <a class="navbar-item{% if selected == "settings" %} is-active{% endif %}"
- href="{% url 'wiki:settings' article_id=article.id path=urlpath.path %}"
- >
- <span class="icon">
- <i class="fas fa-wrench"></i>
- </span>
+{% if not user.is_anonymous %}
+ {% with selected_tab as selected %}
+ <nav class="navbar is-light" role="navigation" aria-label="wiki navigation">
+ <div class="container">
+ <div class="navbar-brand">
+ {% if not user.is_anonymous %}
+ <a class="navbar-item{% if selected == "settings" %} is-active{% endif %}"
+ href="{% url 'wiki:settings' article_id=article.id path=urlpath.path %}"
+ >
+ <span class="icon">
+ <i class="fas fa-wrench"></i>
+ </span>
- <span class="is-hidden-mobile">&nbsp;Settings</span>
- </a>
- {% endif %}
+ <span class="is-hidden-mobile">&nbsp;Settings</span>
+ </a>
+ {% endif %}
- {% for plugin in article_tabs %}
- <a class="navbar-item{% if selected == plugin.slug %} is-active{% endif %}"
- href="{% url 'wiki:plugin' slug=plugin.slug article_id=article.id path=urlpath.path %}"
+ {% for plugin in article_tabs %}
+ <a class="navbar-item{% if selected == plugin.slug %} is-active{% endif %}"
+ href="{% url 'wiki:plugin' slug=plugin.slug article_id=article.id path=urlpath.path %}"
+ >
+ <span class="icon">
+ <i class="{{ plugin.article_tab.1 }}"></i>
+ </span>
+
+ <span class="is-hidden-mobile">&nbsp;{{ plugin.article_tab.0 }}</span>
+ </a>
+ {% endfor %}
+
+ <a class="navbar-item{% if selected == "history" %} is-active{% endif %}"
+ href="{% url 'wiki:history' article_id=article.id path=urlpath.path %}"
>
<span class="icon">
- <i class="{{ plugin.article_tab.1 }}"></i>
+ <i class="fas fa-clock"></i>
</span>
- <span class="is-hidden-mobile">&nbsp;{{ plugin.article_tab.0 }}</span>
+ <span class="is-hidden-mobile">&nbsp;Changes</span>
</a>
- {% endfor %}
- <a class="navbar-item{% if selected == "history" %} is-active{% endif %}"
- href="{% url 'wiki:history' article_id=article.id path=urlpath.path %}"
- >
- <span class="icon">
- <i class="fas fa-clock"></i>
- </span>
+ {% if article|can_write:user and not article.current_revision.locked %}
+ <a class="navbar-item{% if selected == "edit" %} is-active{% endif %}"
+ href="{% url 'wiki:edit' article_id=article.id path=urlpath.path %}"
+ >
+ <span class="icon">
+ <i class="fas fa-edit"></i>
+ </span>
- <span class="is-hidden-mobile">&nbsp;Changes</span>
- </a>
+ <span class="is-hidden-mobile">&nbsp;Edit</span>
+ </a>
+ {% else %}
+ <a class="navbar-item{% if selected == "source" %} is-active{% endif %}"
+ href="{% url 'wiki:source' article_id=article.id path=urlpath.path %}"
+ >
+ <span class="icon">
+ <i class="fas fa-book-spells"></i>
+ </span>
- {% if article|can_write:user and not article.current_revision.locked %}
- <a class="navbar-item{% if selected == "edit" %} is-active{% endif %}"
- href="{% url 'wiki:edit' article_id=article.id path=urlpath.path %}"
- >
- <span class="icon">
- <i class="fas fa-edit"></i>
- </span>
+ <span class="is-hidden-mobile">&nbsp;View Source</span>
+ </a>
+ {% endif %}
- <span class="is-hidden-mobile">&nbsp;Edit</span>
- </a>
- {% else %}
- <a class="navbar-item{% if selected == "source" %} is-active{% endif %}"
- href="{% url 'wiki:source' article_id=article.id path=urlpath.path %}"
+ <a class="navbar-item{% if selected == "view" %} is-active{% endif %}"
+ href="{% url 'wiki:get' article_id=article.id path=urlpath.path %}"
>
<span class="icon">
- <i class="fas fa-book-spells"></i>
+ <i class="fas fa-book-open"></i>
</span>
- <span class="is-hidden-mobile">&nbsp;View Source</span>
+ <span class="is-hidden-mobile">&nbsp;View</span>
</a>
- {% endif %}
-
- <a class="navbar-item{% if selected == "view" %} is-active{% endif %}"
- href="{% url 'wiki:get' article_id=article.id path=urlpath.path %}"
- >
- <span class="icon">
- <i class="fas fa-book-open"></i>
- </span>
- <span class="is-hidden-mobile">&nbsp;View</span>
- </a>
+ <a role="button" class="navbar-burger" data-target="wiki-menu" aria-label="menu" aria-expanded="false">
+ <span aria-hidden="true"></span>
+ <span aria-hidden="true"></span>
+ <span aria-hidden="true"></span>
+ </a>
+ </div>
- <a role="button" class="navbar-burger" data-target="wiki-menu" aria-label="menu" aria-expanded="false">
- <span aria-hidden="true"></span>
- <span aria-hidden="true"></span>
- <span aria-hidden="true"></span>
- </a>
</div>
-
- </div>
- </nav>
-
-{% endwith %}
+ </nav>
+ {% endwith %}
+{% endif %}
diff --git a/pydis_site/templates/wiki/includes/breadcrumbs.html b/pydis_site/templates/wiki/includes/breadcrumbs.html
index 708edb19..a2359f39 100644
--- a/pydis_site/templates/wiki/includes/breadcrumbs.html
+++ b/pydis_site/templates/wiki/includes/breadcrumbs.html
@@ -1,5 +1,5 @@
-{% if urlpath and article %}
- <section class="section">
+{% if urlpath and article and not user.is_anonymous %}
+ <section class="breadcrumb-section section">
<div class="container">
<nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs">
<ul>