aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pydis_site/static/css/content/page.css4
-rw-r--r--pydis_site/templates/content/base.html12
-rw-r--r--pydis_site/templates/content/dropdown.html2
-rw-r--r--pydis_site/templates/content/page.html6
4 files changed, 17 insertions, 7 deletions
diff --git a/pydis_site/static/css/content/page.css b/pydis_site/static/css/content/page.css
index d831f86d..73e833a8 100644
--- a/pydis_site/static/css/content/page.css
+++ b/pydis_site/static/css/content/page.css
@@ -2,6 +2,10 @@
padding: 1rem;
}
+#edit-on-github {
+ margin-left: 1rem;
+}
+
i.has-icon-padding {
padding: 0 10px 25px 0;
}
diff --git a/pydis_site/templates/content/base.html b/pydis_site/templates/content/base.html
index 2fd721a3..caa08819 100644
--- a/pydis_site/templates/content/base.html
+++ b/pydis_site/templates/content/base.html
@@ -1,5 +1,6 @@
{% extends 'base/base.html' %}
{% load static %}
+{% load page_src %}
{% block title %}{{ page_title }}{% endblock %}
{% block head %}
@@ -29,10 +30,21 @@
<li class="is-active"><a href="#">{{ page_title }}</a></li>
</ul>
</nav>
+ <div class="is-flex is-justify-content-flex-end">
{# Sub-Article dropdown for category pages #}
{% if subarticles %}
{% include "content/dropdown.html" %}
{% endif %}
+ {# Edit on GitHub for content articles #}
+ {% if page %}
+ <div id="edit-on-github">
+ <a href="{{ request.path | page_src_url }}">
+ <i class="fa-solid fa-pencil"></i>
+ Edit on GitHub
+ </a>
+ </div>
+ {% endif %}
+ </div>
</div>
</section>
diff --git a/pydis_site/templates/content/dropdown.html b/pydis_site/templates/content/dropdown.html
index 13c89c68..60560547 100644
--- a/pydis_site/templates/content/dropdown.html
+++ b/pydis_site/templates/content/dropdown.html
@@ -1,4 +1,4 @@
-<div class="dropdown is-pulled-right is-right" id="dropdown" style="z-index: 1">
+<div class="dropdown" id="dropdown" style="z-index: 1">
<div class="dropdown-trigger">
<a aria-haspopup="true" aria-controls="subarticle-menu">
<span>Sub-Articles</span>
diff --git a/pydis_site/templates/content/page.html b/pydis_site/templates/content/page.html
index 57677243..679ecec6 100644
--- a/pydis_site/templates/content/page.html
+++ b/pydis_site/templates/content/page.html
@@ -1,12 +1,6 @@
{% extends 'content/base.html' %}
-{% load page_src %}
{% block page_content %}
- <p><a href="{{ request.path | page_src_url }}">
- <i class="fa-solid fa-pencil"></i>
- <b>Edit on GitHub</b>
- </a></p>
- <h1 class="title is-flex">{{ page_title }}</h1>
{% if relevant_links or toc %}
<div class="columns is-variable is-8">
<div class="column is-two-thirds">