diff options
author | 2020-09-21 16:10:56 +0300 | |
---|---|---|
committer | 2020-09-21 16:10:56 +0300 | |
commit | 27315dacdc76e07ee910e31fe65c9357de34bcaf (patch) | |
tree | 29df0e6026f5c3de1029d8f46d23045b0098c1c4 /pydis_site/templates/guides/guide.html | |
parent | Add unit tests for guides app (diff) |
Move guides and categories getting logic to utils for better testability
Diffstat (limited to 'pydis_site/templates/guides/guide.html')
-rw-r--r-- | pydis_site/templates/guides/guide.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pydis_site/templates/guides/guide.html b/pydis_site/templates/guides/guide.html index 8f841c53..bab82415 100644 --- a/pydis_site/templates/guides/guide.html +++ b/pydis_site/templates/guides/guide.html @@ -4,9 +4,9 @@ {% block title %}{{ metadata.title|first }}{% endblock %} {% block head %} - <meta property="og:title" content="Python Discord - {{ metadata.title|first }}" /> + <meta property="og:title" content="Python Discord - {{ guide.metadata.title|first }}" /> <meta property="og:type" content="website" /> - <meta property="og:description" content="{{ metadata.shortdescription }}" /> + <meta property="og:description" content="{{ guide.metadata.shortdescription|first }}" /> <link rel="stylesheet" href="{% static "css/guides/guide.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> @@ -21,10 +21,10 @@ <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> <ul> <li><a href="/guides">Guides</a></li> - {% if category_data.name is not None %} - <li><a href="/guides/category/{{ category_data.name }}">{{ category_data.title }}</a></li> + {% if category_data.raw_name is not None %} + <li><a href="/guides/category/{{ category_data.raw_name }}">{{ category_data.name }}</a></li> {% endif %} - <li class="is-active"><a href="#">{{ metadata.title|first }}</a></li> + <li class="is-active"><a href="#">{{ guide.metadata.title|first }}</a></li> </ul> </nav> </div> @@ -33,13 +33,13 @@ <section class="section"> <div class="content"> <div class="container"> - <h1 class="title">{{ metadata.title|first }}</h1> + <h1 class="title">{{ guide.metadata.title|first }}</h1> <div class="columns is-variable is-8"> <div class="column is-two-thirds"> - {{ guide|safe }} + {{ guide.guide|safe }} <p class="has-text-weight-light is-size-7"> <strong>Last modified:</strong> {{ last_modified }}<br/> - <strong>Contributors:</strong> {{ metadata.contributors|join:", " }} + <strong>Contributors:</strong> {{ guide.metadata.contributors|join:", " }} </p> </div> <div class="column"> |