diff options
author | 2020-10-04 18:55:33 +0300 | |
---|---|---|
committer | 2020-10-04 18:55:33 +0300 | |
commit | aff3a89c3cec04eda096e8f27115e36108ee6286 (patch) | |
tree | 299fb51b60916e6b552fa1ac7e0e05dbef512343 /pydis_site/templates | |
parent | Add more information to how to write a guide guide (diff) |
Change guides system to content system
As this system will be used for more than just guides,
I had to do some refactoring to match this system with plans.
Basically now there isn't guides, but articles instead.
Diffstat (limited to 'pydis_site/templates')
-rw-r--r-- | pydis_site/templates/content/article.html (renamed from pydis_site/templates/guides/guide.html) | 18 | ||||
-rw-r--r-- | pydis_site/templates/content/articles.html (renamed from pydis_site/templates/guides/guides.html) | 10 | ||||
-rw-r--r-- | pydis_site/templates/content/category.html (renamed from pydis_site/templates/guides/category.html) | 8 |
3 files changed, 18 insertions, 18 deletions
diff --git a/pydis_site/templates/guides/guide.html b/pydis_site/templates/content/article.html index 97fc8262..de6cd28d 100644 --- a/pydis_site/templates/guides/guide.html +++ b/pydis_site/templates/content/article.html @@ -3,10 +3,10 @@ {% block title %}{{ metadata.title|first }}{% endblock %} {% block head %} - <meta property="og:title" content="Python Discord - {{ guide.metadata.title|first }}" /> + <meta property="og:title" content="Python Discord - {{ article.metadata.title|first }}" /> <meta property="og:type" content="website" /> - <meta property="og:description" content="{{ guide.metadata.shortdescription|first }}" /> - <link rel="stylesheet" href="{% static "css/guides/guide.css" %}"> + <meta property="og:description" content="{{ article.metadata.shortdescription|first }}" /> + <link rel="stylesheet" href="{% static "css/content/articles.css" %}"> <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/default.min.css"> <script src="//cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> @@ -19,11 +19,11 @@ <div class="container"> <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> <ul> - <li><a href="/guides">Guides</a></li> + <li><a href="/content">Pages</a></li> {% if category_data.raw_name is not None %} - <li><a href="/guides/category/{{ category_data.raw_name }}">{{ category_data.name }}</a></li> + <li><a href="/content/category/{{ category_data.raw_name }}">{{ category_data.name }}</a></li> {% endif %} - <li class="is-active"><a href="#">{{ guide.metadata.title|first }}</a></li> + <li class="is-active"><a href="#">{{ article.metadata.title|first }}</a></li> </ul> </nav> </div> @@ -32,13 +32,13 @@ <section class="section"> <div class="content"> <div class="container"> - <h1 class="title">{{ guide.metadata.title|first }}</h1> + <h1 class="title">{{ article.metadata.title|first }}</h1> <div class="columns is-variable is-8"> <div class="column is-two-thirds"> - {{ guide.guide|safe }} + {{ article.article|safe }} <p class="has-text-weight-light is-size-7"> <strong>Last modified:</strong> {{ last_modified }}<br/> - <strong>Contributors:</strong> {{ guide.metadata.contributors|join:", " }} + <strong>Contributors:</strong> {{ article.metadata.contributors|join:", " }} </p> </div> <div class="column"> diff --git a/pydis_site/templates/guides/guides.html b/pydis_site/templates/content/articles.html index 0e6f2073..6fea66e5 100644 --- a/pydis_site/templates/guides/guides.html +++ b/pydis_site/templates/content/articles.html @@ -3,7 +3,7 @@ {% block title %}Guides{% endblock %} {% block head %} - <link rel="stylesheet" href="{% static "css/guides/guide.css" %}"> + <link rel="stylesheet" href="{% static "css/content/articles.css" %}"> {% endblock %} {% block content %} @@ -13,7 +13,7 @@ <div class="container"> <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> <ul> - <li class="is-active"><a href="/guides">Guides</a></li> + <li class="is-active"><a href="/content">Pages</a></li> </ul> </nav> </div> @@ -22,13 +22,13 @@ <section class="section"> <div class="container"> <div class="content"> - <h1>Guides</h1> - {% for guide, data in guides.items %} + <h1>Articles</h1> + {% for article, data in content.items %} <div class="box" style="max-width: 800px;"> <span class="icon is-size-4 is-medium"> <i class="fab fa-python is-size-3 is-black has-icon-padding" aria-hidden="true"></i> </span> - <a href="{{ guide }}/"> + <a href="{{ article }}/"> <span class="is-size-4 has-text-weight-bold">{{ data.title.0 }}</span> </a> <p class="is-italic">{{ data.shortdescription.0 }}</p> diff --git a/pydis_site/templates/guides/category.html b/pydis_site/templates/content/category.html index f3a8c2ce..61e20c43 100644 --- a/pydis_site/templates/guides/category.html +++ b/pydis_site/templates/content/category.html @@ -6,7 +6,7 @@ <meta property="og:title" content="Python Discord - {{ category_info.name }}" /> <meta property="og:type" content="website" /> <meta property="og:description" content="{{ category_info.description }}" /> - <link rel="stylesheet" href="{% static "css/guides/guide.css" %}"> + <link rel="stylesheet" href="{% static "css/content/articles.css" %}"> {% endblock %} {% block content %} @@ -16,7 +16,7 @@ <div class="container"> <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> <ul> - <li><a href="/guides">Guides</a></li> + <li><a href="/content">Pages</a></li> <li class="is-active"><a href="#">{{ category_info.name }}</a></li> </ul> </nav> @@ -27,12 +27,12 @@ <div class="container"> <div class="content"> <h1>{{ category_info.name }}</h1> - {% for guide, data in guides.items %} + {% for article, data in content.items %} <div class="box" style="max-width: 800px;"> <span class="icon is-size-4 is-medium"> <i class="fab fa-python is-size-3 is-black has-icon-padding" aria-hidden="true"></i> </span> - <a href="/guides/category/{{ category_name }}/{{ guide }}/"> + <a href="/content/category/{{ category_name }}/{{ article }}/"> <span class="is-size-4 has-text-weight-bold">{{ data.title.0 }}</span> </a> <p class="is-italic">{{ data.shortdescription.0 }}</p> |