From: Vladimír Vondruš Date: Tue, 4 Jul 2017 09:20:08 +0000 (+0200) Subject: Initial version of the Pelican theme. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=871522b8c990bfc5addd9b5c1111785fcc56fdab;p=blog.git Initial version of the Pelican theme. --- diff --git a/pelican-theme/static/inc/m-components.css b/pelican-theme/static/inc/m-components.css new file mode 120000 index 00000000..74118bd5 --- /dev/null +++ b/pelican-theme/static/inc/m-components.css @@ -0,0 +1 @@ +../../../css/m-components.css \ No newline at end of file diff --git a/pelican-theme/static/inc/m-dark.css b/pelican-theme/static/inc/m-dark.css new file mode 120000 index 00000000..259c177b --- /dev/null +++ b/pelican-theme/static/inc/m-dark.css @@ -0,0 +1 @@ +../../../css/m-dark.css \ No newline at end of file diff --git a/pelican-theme/static/inc/m-debug.css b/pelican-theme/static/inc/m-debug.css new file mode 120000 index 00000000..f5314515 --- /dev/null +++ b/pelican-theme/static/inc/m-debug.css @@ -0,0 +1 @@ +../../../css/m-debug.css \ No newline at end of file diff --git a/pelican-theme/static/inc/m-grid.css b/pelican-theme/static/inc/m-grid.css new file mode 120000 index 00000000..d56b15ec --- /dev/null +++ b/pelican-theme/static/inc/m-grid.css @@ -0,0 +1 @@ +../../../css/m-grid.css \ No newline at end of file diff --git a/pelican-theme/static/inc/m-light.css b/pelican-theme/static/inc/m-light.css new file mode 120000 index 00000000..8762e445 --- /dev/null +++ b/pelican-theme/static/inc/m-light.css @@ -0,0 +1 @@ +../../../css/m-light.css \ No newline at end of file diff --git a/pelican-theme/static/inc/pygments-dark.css b/pelican-theme/static/inc/pygments-dark.css new file mode 120000 index 00000000..16978322 --- /dev/null +++ b/pelican-theme/static/inc/pygments-dark.css @@ -0,0 +1 @@ +../../../css/pygments-dark.css \ No newline at end of file diff --git a/pelican-theme/templates/.kateconfig b/pelican-theme/templates/.kateconfig new file mode 100644 index 00000000..b46a48b0 --- /dev/null +++ b/pelican-theme/templates/.kateconfig @@ -0,0 +1 @@ +// kate: indent-width 2; diff --git a/pelican-theme/templates/archives.html b/pelican-theme/templates/archives.html new file mode 100644 index 00000000..fe744bd5 --- /dev/null +++ b/pelican-theme/templates/archives.html @@ -0,0 +1,23 @@ +{% extends "base_blog.html" %} +{% block content %} +
+ {% block content_title %} + {% endblock content_title %} + {% for article in articles_page.object_list %} +
+ {% include "article_header.html" %} + {% if loop.first and articles_page.number == 1 %} +
+ {{ article.content }} + {% endif %} + {% include "article_footer.html" %} + {% if not loop.first or articles_page.number != 1 %} +
+ {% endif %} +
+ {% endfor %} + {% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} + {% endif %} +
+{% endblock content %} diff --git a/pelican-theme/templates/article.html b/pelican-theme/templates/article.html new file mode 100644 index 00000000..36ebfdc3 --- /dev/null +++ b/pelican-theme/templates/article.html @@ -0,0 +1,75 @@ +{% extends "base_blog.html" %} + +{% block title %}{{ article.title }} | {{ BLOGNAME }}{% endblock %} + +{% block head %} + {{- super() -}} + {% if article.description %} + + {% endif %} + + + + + {% if article.cover %} + + {% endif %} + +{% endblock %} + +{% block content %} +{% if article.cover %} +
+
+
+
+
+
+
{{ article.locale_date }}
+
{% for author in article.authors %}{{ author }}{% endfor %}
+
+
+
+ {% set title = article.title.split(' — ') %} +

+ {{ title[0] }} +

+ {% if title|length >= 2 %}

{{ title[1] }}

{% endif %} +
+
+
+
+
+
+
+
+ {{ article.summary }} +
+
+
+
+
+
+
+ {{ article.content }} +
+
+
+
+
+
+

Posted {% if article.authors %}by {% for author in article.authors %}{{ author }}{% endfor %}{% endif %} on in {{ article.category }}.{% if article.tags %} Tags: {% for tag in article.tags %}{{ tag }}{% if not loop.last %}, {% endif %}{% endfor %}.{% endif %}

+
+
+
+
+{% else %} +
+ {% include "article_header.html" %} +
+ {{ article.content }} + {% include "article_footer.html" %} +
+{% endif %} +{% endblock %} diff --git a/pelican-theme/templates/article_footer.html b/pelican-theme/templates/article_footer.html new file mode 100644 index 00000000..b69bad59 --- /dev/null +++ b/pelican-theme/templates/article_footer.html @@ -0,0 +1,3 @@ + diff --git a/pelican-theme/templates/article_header.html b/pelican-theme/templates/article_header.html new file mode 100644 index 00000000..23492071 --- /dev/null +++ b/pelican-theme/templates/article_header.html @@ -0,0 +1,11 @@ +
+

+ + {{ article.title }} +

+ {{ article.summary }} +
diff --git a/pelican-theme/templates/author.html b/pelican-theme/templates/author.html new file mode 100644 index 00000000..c69de751 --- /dev/null +++ b/pelican-theme/templates/author.html @@ -0,0 +1,9 @@ +{% extends "base_blog_section.html" %} + +{% block title %}Posts by {{ author }} | {{ BLOGNAME }}{% endblock %} + +{% block content_title %} +
+ Showing only posts by {{ author }}. Show all posts. +
+{% endblock %} diff --git a/pelican-theme/templates/base.html b/pelican-theme/templates/base.html new file mode 100644 index 00000000..626c0b54 --- /dev/null +++ b/pelican-theme/templates/base.html @@ -0,0 +1,143 @@ + + + + {% block head %} + {% block title %}{{ SITENAME }}{% endblock title %} + {% for href in CSS_FILES %} + + {% endfor %} + + + + {% if FEED_ALL_ATOM %} + + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + + {% endif %} + {% endblock head %} + + +
+ +
+
+ {% block main %} + {% endblock %} +
+ + + diff --git a/pelican-theme/templates/base_blog.html b/pelican-theme/templates/base_blog.html new file mode 100644 index 00000000..c421ac4d --- /dev/null +++ b/pelican-theme/templates/base_blog.html @@ -0,0 +1,55 @@ +{% set page_title = 'Blog' %} +{% extends 'base.html' %} + +{% block title %}{{ BLOGNAME }}{% endblock %} + +{% block main %} +{% if article and article.cover %} +{% else %} +
+
+{% endif %} +{% block content %} +{% endblock %} +{% if article and article.cover %} + +{% else %} + +
+
+{% endif %} +{% endblock %} diff --git a/pelican-theme/templates/base_blog_section.html b/pelican-theme/templates/base_blog_section.html new file mode 100644 index 00000000..45634a84 --- /dev/null +++ b/pelican-theme/templates/base_blog_section.html @@ -0,0 +1,16 @@ +{% extends "base_blog.html" %} +{% block content %} +
+ {% block content_title %} + {% endblock content_title %} + {% for article in articles_page.object_list %} +
+ {% include "article_header.html" %} + {% include "article_footer.html" %} +
+ {% endfor %} + {% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} + {% endif %} +
+{% endblock content %} diff --git a/pelican-theme/templates/category.html b/pelican-theme/templates/category.html new file mode 100644 index 00000000..7c443273 --- /dev/null +++ b/pelican-theme/templates/category.html @@ -0,0 +1,9 @@ +{% extends "base_blog_section.html" %} + +{% block title %}{{ category }} | {{ BLOGNAME }}{% endblock %} + +{% block content_title %} +
+ Showing only posts in {{ category }}. Show all posts. +
+{% endblock %} diff --git a/pelican-theme/templates/index.html b/pelican-theme/templates/index.html new file mode 100644 index 00000000..ee6776e8 --- /dev/null +++ b/pelican-theme/templates/index.html @@ -0,0 +1,3 @@ +{% extends "base.html" %} +{% block main %} +{% endblock %} diff --git a/pelican-theme/templates/page.html b/pelican-theme/templates/page.html new file mode 100644 index 00000000..b3ebd553 --- /dev/null +++ b/pelican-theme/templates/page.html @@ -0,0 +1,15 @@ +{% set page_title = page.title|replace('­', '') %} +{% extends "base.html" %} + +{% block title %}{{ page.title }} | {{ SITENAME }}{%endblock%} + +{% block main %} +
+
+
+

{{ page.title }}

+ {{ page.content }} +
+
+
+{% endblock %} diff --git a/pelican-theme/templates/pagination.html b/pelican-theme/templates/pagination.html new file mode 100644 index 00000000..ecbb6dfd --- /dev/null +++ b/pelican-theme/templates/pagination.html @@ -0,0 +1,11 @@ +{% if DEFAULT_PAGINATION %} +
+ {% if articles_page.has_previous() %} + « newer articles | + {% endif %} + page {{ articles_page.number }} + {% if articles_page.has_next() %} + | older articles » + {% endif %} +
+{% endif %} diff --git a/pelican-theme/templates/tag.html b/pelican-theme/templates/tag.html new file mode 100644 index 00000000..24e62040 --- /dev/null +++ b/pelican-theme/templates/tag.html @@ -0,0 +1,9 @@ +{% extends "base_blog_section.html" %} + +{% block title %}Posts tagged {{ tag }} | {{ BLOGNAME }}{% endblock %} + +{% block content_title %} +
+ Showing only posts tagged {{ tag }}. Show all posts. +
+{% endblock %}