diff options
author | 2022-08-13 06:08:22 +0200 | |
---|---|---|
committer | 2022-08-13 06:08:22 +0200 | |
commit | d50028d6b92909a39139007f0f3bcd7c90a88420 (patch) | |
tree | 6e4547b999be8797e71c087a7c795af271fc64ac /pydis_site/templates | |
parent | Add Setting For Static Builds (diff) |
Add Tags To Content Listings
Adds bot tags to the content page, as well as a model to go along with
it.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/templates')
-rw-r--r-- | pydis_site/templates/content/listing.html | 10 | ||||
-rw-r--r-- | pydis_site/templates/content/page.html | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/pydis_site/templates/content/listing.html b/pydis_site/templates/content/listing.html index ef0ef919..eeb6b5e2 100644 --- a/pydis_site/templates/content/listing.html +++ b/pydis_site/templates/content/listing.html @@ -1,6 +1,8 @@ +{# Base navigation screen for resources #} {% extends 'content/base.html' %} {% block page_content %} + {# Nested Categories #} {% for category, data in categories.items %} <div class="box" style="max-width: 800px;"> <span class="icon is-size-4 is-medium"> @@ -13,6 +15,8 @@ <p class="is-italic">{{ data.description }}</p> </div> {% endfor %} + + {# Single Pages #} {% for page, data in pages.items %} <div class="box" style="max-width: 800px;"> <span class="icon is-size-4 is-medium"> @@ -21,7 +25,11 @@ <a href="{% url "content:page_category" location=path|add:page %}"> <span class="is-size-4 has-text-weight-bold">{{ data.title }}</span> </a> - <p class="is-italic">{{ data.description }}</p> + {% if "tags" in location %} + <p class="is-italic">{{ data.description | safe }}</p> + {% else %} + <p class="is-italic">{{ data.description }}</p> + {% endif %} </div> {% endfor %} {% endblock %} diff --git a/pydis_site/templates/content/page.html b/pydis_site/templates/content/page.html index 759286f6..625c01f1 100644 --- a/pydis_site/templates/content/page.html +++ b/pydis_site/templates/content/page.html @@ -5,7 +5,7 @@ <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/styles/atom-one-dark.min.css"> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js"></script> - <script>hljs.initHighlightingOnLoad();</script> + <script>hljs.highlightAll();</script> {% endblock %} {% block page_content %} |