diff options
author | 2022-10-29 10:38:47 +0800 | |
---|---|---|
committer | 2023-05-06 11:04:37 +0200 | |
commit | 7bf2766bd2468766497b5ec35657856815f8bb34 (patch) | |
tree | 3a1d24f426647af435cdf19aab5f39b854bcdded /pydis_site/templates/content | |
parent | Use content articles source url in django.conf.settings (diff) |
Put 'Edit on GitHub' on breadcrum row with Sub-Articles dropdown
Diffstat (limited to 'pydis_site/templates/content')
-rw-r--r-- | pydis_site/templates/content/base.html | 12 | ||||
-rw-r--r-- | pydis_site/templates/content/dropdown.html | 2 | ||||
-rw-r--r-- | pydis_site/templates/content/page.html | 6 |
3 files changed, 13 insertions, 7 deletions
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"> |