diff options
author | 2022-08-13 06:10:38 +0200 | |
---|---|---|
committer | 2022-08-13 06:10:38 +0200 | |
commit | 42124deb7ea5f17bc6faf959baba8e951b567655 (patch) | |
tree | d485bbeecc278cff5fa24eba566d5a95a2b5cff0 /pydis_site/templates | |
parent | Add Tags To Content Listings (diff) |
Add Tag Page Template
Add a template for the tag page itself, and add a route to use it.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/templates')
-rw-r--r-- | pydis_site/templates/content/base.html | 2 | ||||
-rw-r--r-- | pydis_site/templates/content/tag.html | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/pydis_site/templates/content/base.html b/pydis_site/templates/content/base.html index 4a19a275..dbd303a1 100644 --- a/pydis_site/templates/content/base.html +++ b/pydis_site/templates/content/base.html @@ -35,7 +35,7 @@ <section class="section"> <div class="container"> <div class="content"> - <h1 class="title">{{ page_title }}</h1> + <h1 class="title">{% block title_element %}{{ page_title }}{% endblock %}</h1> {% block page_content %}{% endblock %} </div> </div> diff --git a/pydis_site/templates/content/tag.html b/pydis_site/templates/content/tag.html new file mode 100644 index 00000000..264f63d0 --- /dev/null +++ b/pydis_site/templates/content/tag.html @@ -0,0 +1,21 @@ +{% extends "content/page.html" %} +{% load static %} + +{% block head %} + {{ block.super }} + <link rel="stylesheet" href="{% static 'css/content/tag.css' %}"/> + <title>{{ tag.name }}</title> +{% endblock %} + +{% block title_element %} + <div class="level"> + <div class="level-left">{{ block.super }}</div> + <div class="level-right"> + <a class="level-item fab fa-github" href="{{ tag.url }}"></a> + </div> + </div> +{% endblock %} + +{% block page_content %} + {{ block.super }} +{% endblock %} |