aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/content/article.html
blob: fcb29f3271f39804515695ae1b73e4d898ebd087 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{% extends 'base/base.html' %}
{% load static %}

{% block title %}{{ article.metadata.title }}{% endblock %}
{% block head %}
  <meta property="og:title" content="Python Discord - {{ article.metadata.title }}" />
  <meta property="og:type" content="website" />
  <meta property="og:description" content="{{ article.metadata.short_description }}" />
  <link rel="stylesheet" href="{% static "css/content/articles.css" %}">
  <link rel="stylesheet"
    href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/styles/atom-one-dark-reasonable.min.css">
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js"></script>
  <script>hljs.initHighlightingOnLoad();</script>
{% endblock %}

{% block content %}
    {% include "base/navbar.html" %}

    <section class="breadcrumb-section section">
        <div class="container">
            <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs">
                <ul>
                    <li><a href="{% url "content:articles" %}">Articles</a></li>
                    {% for item in breadcrumb_items %}
                        <li><a href="{% url "content:article_category" location=item.path %}">{{ item.name }}</a></li>
                    {% endfor %}
                    <li class="is-active"><a href="#">{{ article.metadata.title }}</a></li>
                </ul>
            </nav>
        </div>
    </section>

    <section class="section">
        <div class="content">
            <div class="container">
                <h1 class="title">{{ article.metadata.title }}</h1>
                <p class="subtitle is-size-6"><strong>Last modified:</strong> {{ github_data.last_modified }}</p>
                <div class="columns is-variable is-8">
                    <div class="column is-two-thirds">
                        {{ article.article|safe }}
                    </div>
                    <div class="column">
                        <div class="card">
                            <div class="card-header">
                                <p class="card-header-title">Contributors</p>
                            </div>
                            <div class="card-content">
                                {% if github_data.contributors|length %}
                                    <div class="tags">
                                        {% for user, profile_url in github_data.contributors.items %}
                                            <span class="tag"><a href="{{ profile_url }}">{{ user }}</a></span>
                                        {% endfor %}
                                    </div>
                                {% else %}
                                <p>N/A</p>
                                {% endif %}
                            </div>
                        </div>

                        {% if relevant_links|length > 0 %}
                        <div class="box">
                            <p class="menu-label">Relevant links</p>
                            <ul class="menu-list">
                                {% for link, value in relevant_links.items %}
                                    <li><a class="has-text-link" href="{{link}}">{{ value }}</a></li>
                                {% endfor %}
                            </ul>
                        </div>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </section>

{% endblock %}