aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/templates')
-rw-r--r--pydis_site/templates/base/navbar.html3
-rw-r--r--pydis_site/templates/content/base.html6
-rw-r--r--pydis_site/templates/content/listing.html27
-rw-r--r--pydis_site/templates/content/page.html8
-rw-r--r--pydis_site/templates/content/tag.html40
-rw-r--r--pydis_site/templates/events/pages/code-jams/9/_index.html4
6 files changed, 75 insertions, 13 deletions
diff --git a/pydis_site/templates/base/navbar.html b/pydis_site/templates/base/navbar.html
index d7fb4f4c..931693c8 100644
--- a/pydis_site/templates/base/navbar.html
+++ b/pydis_site/templates/base/navbar.html
@@ -67,6 +67,9 @@
<a class="navbar-item" href="{% url "resources:index" %}">
Resources
</a>
+ <a class="navbar-item" href="{% url "content:pages" %}">
+ Content
+ </a>
<a class="navbar-item" href="{% url "events:index" %}">
Events
</a>
diff --git a/pydis_site/templates/content/base.html b/pydis_site/templates/content/base.html
index 4a19a275..2fd721a3 100644
--- a/pydis_site/templates/content/base.html
+++ b/pydis_site/templates/content/base.html
@@ -8,6 +8,10 @@
<meta property="og:description" content="{{ page_description }}" />
<link rel="stylesheet" href="{% static "css/content/page.css" %}">
<link rel="stylesheet" href="{% static "css/collapsibles.css" %}">
+ <link rel="stylesheet"
+ href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/styles/atom-one-dark.min.css">
+ <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js"></script>
+ <script>hljs.highlightAll();</script>
<script src="{% static "js/collapsibles.js" %}"></script>
{% endblock %}
@@ -35,7 +39,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/listing.html b/pydis_site/templates/content/listing.html
index ef0ef919..934b95f6 100644
--- a/pydis_site/templates/content/listing.html
+++ b/pydis_site/templates/content/listing.html
@@ -1,6 +1,22 @@
+{# Base navigation screen for resources #}
{% extends 'content/base.html' %}
+{% load static %}
+
+{# Show a GitHub button on tag pages #}
+{% block title_element %}
+{% if is_tag_listing %}
+ <link rel="stylesheet" href="{% static "css/content/color.css" %}">
+ <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>
+{% endif %}
+{% endblock %}
{% block page_content %}
+ {# Nested Categories #}
{% for category, data in categories.items %}
<div class="box" style="max-width: 800px;">
<span class="icon is-size-4 is-medium">
@@ -13,15 +29,22 @@
<p class="is-italic">{{ data.description }}</p>
</div>
{% endfor %}
+
+ {# Single Pages #}
{% for page, data in pages.items %}
<div class="box" style="max-width: 800px;">
<span class="icon is-size-4 is-medium">
<i class="{{ data.icon|default:"fab fa-python" }} is-size-3 is-black has-icon-padding" aria-hidden="true"></i>
</span>
- <a href="{% url "content:page_category" location=path|add:page %}">
+ <a href="{% url app_name location=path|add:page %}">
<span class="is-size-4 has-text-weight-bold">{{ data.title }}</span>
</a>
- <p class="is-italic">{{ data.description }}</p>
+ {% if is_tag_listing %}
+ <div class="tag-container">{{ data.description | safe }}</div>
+ {% else %}
+ <p class="is-italic">{{ data.description }}</p>
+ {% endif %}
</div>
{% endfor %}
+ <script src="{% static 'js/content/listing.js' %}"></script>
{% endblock %}
diff --git a/pydis_site/templates/content/page.html b/pydis_site/templates/content/page.html
index 759286f6..679ecec6 100644
--- a/pydis_site/templates/content/page.html
+++ b/pydis_site/templates/content/page.html
@@ -1,13 +1,5 @@
{% extends 'content/base.html' %}
-{% block head %}
- {{ block.super }}
- <link rel="stylesheet"
- href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/styles/atom-one-dark.min.css">
- <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.1/highlight.min.js"></script>
- <script>hljs.initHighlightingOnLoad();</script>
-{% endblock %}
-
{% block page_content %}
{% if relevant_links or toc %}
<div class="columns is-variable is-8">
diff --git a/pydis_site/templates/content/tag.html b/pydis_site/templates/content/tag.html
new file mode 100644
index 00000000..fa9e44f5
--- /dev/null
+++ b/pydis_site/templates/content/tag.html
@@ -0,0 +1,40 @@
+{% extends "content/page.html" %}
+{% load static %}
+
+{% block head %}
+ {{ block.super }}
+ <link rel="stylesheet" href="{% static 'css/content/color.css' %}"/>
+ <link rel="stylesheet" href="{% static 'css/content/tag.css' %}"/>
+ <title>{{ tag.name }}</title>
+{% endblock %}
+
+{% block title_element %}
+ <div class="level mb-2">
+ <div class="level-left">{{ block.super }}</div>
+ <div class="level-right">
+ <a class="level-item fab fa-github" href="{{ tag.url }}"></a>
+ </div>
+ </div>
+
+ <div class="dropdown is-size-6 is-hoverable">
+ <div class="dropdown-trigger ">
+ <a aria-haspopup="menu" href="{{ tag.last_commit.url }}">
+ <span class="update-time">
+ Last Updated: {{ tag.last_commit.date | date:"F j, Y g:i A e" }}
+ </span>
+ </a>
+ </div>
+ <div class="dropdown-menu">
+ <div class="dropdown-content">
+ <div class="dropdown-item">Last edited by:</div>
+ {% for user in tag.last_commit.format_authors %}
+ <div class="dropdown-item">{{ user }}</div>
+ {% endfor %}
+ <div class="dropdown-divider"></div>
+ {% for line in tag.last_commit.lines %}
+ <div class="dropdown-item">{{ line }}</div>
+ {% endfor %}
+ </div>
+ </div>
+ </div>
+{% endblock %}
diff --git a/pydis_site/templates/events/pages/code-jams/9/_index.html b/pydis_site/templates/events/pages/code-jams/9/_index.html
index 7c2617d7..ca7c4f90 100644
--- a/pydis_site/templates/events/pages/code-jams/9/_index.html
+++ b/pydis_site/templates/events/pages/code-jams/9/_index.html
@@ -27,8 +27,8 @@
<li><strike>Wednesday, July 6 - Voting for the theme opens</strike></li>
<li><strike>Wednesday, July 13 - The Qualifier closes</strike></li>
<li><strike>Thursday, July 21 - Code Jam Begins</strike></li>
- <li>Sunday, July 31 - Coding portion of the jam ends</li>
- <li>Sunday, August 4 - Code Jam submissions are closed</li>
+ <li><strike>Sunday, July 31 - Coding portion of the jam ends</strike></li>
+ <li><strike>Sunday, August 4 - Code Jam submissions are closed</strike></li>
</ul>
<h3 id="qualifier"><a href="#how-to-join">The Qualifier</a></h3>