diff options
Diffstat (limited to 'pydis_site/templates')
| -rw-r--r-- | pydis_site/templates/content/article.html | 75 | ||||
| -rw-r--r-- | pydis_site/templates/content/listing.html | 62 | ||||
| -rw-r--r-- | pydis_site/templates/resources/resources.html | 2 |
3 files changed, 138 insertions, 1 deletions
diff --git a/pydis_site/templates/content/article.html b/pydis_site/templates/content/article.html new file mode 100644 index 00000000..c7b85567 --- /dev/null +++ b/pydis_site/templates/content/article.html @@ -0,0 +1,75 @@ +{% 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="//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> +{% 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 %} diff --git a/pydis_site/templates/content/listing.html b/pydis_site/templates/content/listing.html new file mode 100644 index 00000000..8c06bccc --- /dev/null +++ b/pydis_site/templates/content/listing.html @@ -0,0 +1,62 @@ +{% extends 'base/base.html' %} +{% load static %} + +{% block title %}{{ category_info.name|default:"Articles" }}{% endblock %} +{% block head %} + <meta property="og:title" content="Python Discord - {{ category_info.name|default:"Articles" }}" /> + <meta property="og:type" content="website" /> + <meta property="og:description" content="{{ category_info.description }}" /> + <link rel="stylesheet" href="{% static "css/content/articles.css" %}"> +{% 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> + {% if in_category %} + <li><a href="{% url "content:articles" %}">Articles</a></li> + {% endif %} + {% 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="#">{{ category_info.name|default:"Articles" }}</a></li> + </ul> + </nav> + </div> + </section> + + <section class="section"> + <div class="container"> + <div class="content"> + <h1>{{ category_info.name|default:"Articles" }}</h1> + {% for category, data in categories.items %} + <div class="box" style="max-width: 800px;"> + <span class="icon is-size-4 is-medium"> + <i class="fas fa-folder is-size-3 is-black has-icon-padding" aria-hidden="true"></i> + </span> + + + <a href="{% url "content:article_category" location=path|add:category %}"> + <span class="is-size-4 has-text-weight-bold">{{ data.name }}</span> + </a> + <p class="is-italic">{{ data.description }}</p> + </div> + {% endfor %} + {% for article, data in content.items %} + <div class="box" style="max-width: 800px;"> + <span class="icon is-size-4 is-medium"> + <i class="{{ data.icon_class|default:"fab" }} {{ data.icon|default:"fa-python" }} is-size-3 is-black has-icon-padding" aria-hidden="true"></i> + </span> + <a href="{% url "content:article_category" location=path|add:article %}"> + <span class="is-size-4 has-text-weight-bold">{{ data.title }}</span> + </a> + <p class="is-italic">{{ data.short_description }}</p> + </div> + {% endfor %} + </div> + </div> + </section> +{% endblock %} diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 6eb32c97..2dc88a8c 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -15,7 +15,7 @@ <h1>Resources</h1> <div class="tile is-ancestor"> - <a class="tile is-parent" href="/articles/category/guides"> + <a class="tile is-parent" href="{% url "content:article_category" location="guides" %}"> <article class="tile is-child box hero is-primary is-bold"> <p class="title is-size-1"><i class="fad fa-info-circle" aria-hidden="true"></i> Guides</p> <p class="subtitle is-size-4">Made by us, for you</p> |