diff --git a/pelicanconf.py b/pelicanconf.py index 1148336..8dbcfb5 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -6,11 +6,11 @@ SITENAME = 'Bots as Digital Infrapuncture' SITEURL = '' PATH = 'content' -USE_FOLDER_AS_CATEGORY = True -TIMEZONE = 'Europe/Paris' +TIMEZONE = 'Europe/Amsterdam' DEFAULT_LANG = 'en' +DEFAULT_DATE = 'fs' # Feed generation is usually not desired when developing FEED_ALL_ATOM = None @@ -19,20 +19,16 @@ TRANSLATION_FEED_ATOM = None AUTHOR_FEED_ATOM = None AUTHOR_FEED_RSS = None -# Blogroll -# LINKS = (('Pelican', 'https://getpelican.com/'), -# ('Python.org', 'https://www.python.org/'), -# ('Jinja2', 'https://palletsprojects.com/p/jinja/'), -# ('You can modify those links in your config file', '#'),) +#STATIC_PATHS = ['extra/favicon.ico', 'images'] + +THEME = 'themes/default' +THEME_STATIC_DIR = 'theme' -# Social widget -# SOCIAL = (('You can add links in your config file', '#'), -# ('Another social link', '#'),) +USE_FOLDER_AS_CATEGORY = True DEFAULT_PAGINATION = False # Uncomment following line if you want document-relative URLs when developing #RELATIVE_URLS = True -STATIC_PATHS = ['extra/favicon.ico', 'images', 'pdfs', 'stream'] diff --git a/themes/default/static/css/main.css b/themes/default/static/css/main.css new file mode 100644 index 0000000..5ad9f61 --- /dev/null +++ b/themes/default/static/css/main.css @@ -0,0 +1,58 @@ +body{ + margin:2em auto; + max-width: 980px; +} +header#banner{ + width: 100%; + text-align: center; +} + header#banner h1{ + margin: 2em 0; + } + header#banner h1 a{ + text-decoration: none; + } +nav#menu{ + width: 100%; + text-align: center; + background-color: magenta; + border-radius: 1em; +} + nav#menu li{ + background-color: white; + border-radius: 1em; + margin:1em 0; + padding:1em; + list-style: none; + display: inline-block; + } + +section#content{ + margin: 4em 0; +} +article{ + margin: 0 0 2em; +} +h1.category{ + width: calc(100% - 4em); + background-color: magenta; + padding: 2em; + margin: 2em 0; + color:white; + font-size: 32px; + text-align: center; +} + +/* general elements */ +a, +a:visited, +a:hover, +a:active{ + color:inherit; +} +hr{ + width: 100%; + border:0; + border-bottom:1px solid; + margin:3em auto; +} \ No newline at end of file diff --git a/themes/default/templates/article.html b/themes/default/templates/article.html new file mode 100644 index 0000000..c8c9a4f --- /dev/null +++ b/themes/default/templates/article.html @@ -0,0 +1,67 @@ +{% extends "base.html" %} +{% block html_lang %}{{ article.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ article.title|striptags }}{% endblock %} + +{% block head %} + {{ super() }} + + {% import 'translations.html' as translations with context %} + {% if translations.entry_hreflang(article) %} + {{ translations.entry_hreflang(article) }} + {% endif %} + + {% if article.description %} + + {% endif %} + + {% for tag in article.tags %} + + {% endfor %} + +{% endblock %} + +{% block content %} +
+
+

+ {{ article.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} +
+ +
+ {{ article.content }} +
+
+{% endblock %} diff --git a/themes/default/templates/base.html b/themes/default/templates/base.html new file mode 100644 index 0000000..4bc16d7 --- /dev/null +++ b/themes/default/templates/base.html @@ -0,0 +1,48 @@ + + + + {% block head %} + {% block title %}{{ SITENAME }}{% endblock title %} + + + + {% endblock head %} + + + + + + + + +
+ {% block content %} + {% endblock %} +
+ + + + + diff --git a/themes/default/templates/categories.html b/themes/default/templates/categories.html new file mode 100644 index 0000000..867b98c --- /dev/null +++ b/themes/default/templates/categories.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Categories{% endblock %} + +{% block content_title %} +

Overview

+{% endblock %} diff --git a/themes/default/templates/category.html b/themes/default/templates/category.html new file mode 100644 index 0000000..db211e9 --- /dev/null +++ b/themes/default/templates/category.html @@ -0,0 +1,8 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - {{ category }} category{% endblock %} + +{% block content_title %} +

{{ category }}

+{% endblock %} + diff --git a/themes/default/templates/index.html b/themes/default/templates/index.html new file mode 100644 index 0000000..cff98b8 --- /dev/null +++ b/themes/default/templates/index.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% block content %} +{% block content_title %} +{% endblock %} + +{% for article in articles_page.object_list %} +
+
+

{{ article.title }}

+
+
{{ article.summary }}
+ +
+{% endfor %} + + + + + +{% endblock content %} diff --git a/themes/default/templates/page.html b/themes/default/templates/page.html new file mode 100644 index 0000000..eff0e62 --- /dev/null +++ b/themes/default/templates/page.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} +{% block html_lang %}{{ page.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ page.title|striptags }}{%endblock%} + +{% block head %} + {{ super() }} + + {% import 'translations.html' as translations with context %} + {% if translations.entry_hreflang(page) %} + {{ translations.entry_hreflang(page) }} + {% endif %} +{% endblock %} + +{% block content %} +
+

{{ page.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + + {{ page.content }} + + {% if page.modified %} +

+ Last updated: {{ page.locale_modified }} +

+ {% endif %} +
+{% endblock %} diff --git a/themes/default/templates/pagination.html b/themes/default/templates/pagination.html new file mode 100644 index 0000000..588f130 --- /dev/null +++ b/themes/default/templates/pagination.html @@ -0,0 +1,15 @@ +{% if DEFAULT_PAGINATION %} +{% set first_page = articles_paginator.page(1) %} +{% set last_page = articles_paginator.page(articles_paginator.num_pages) %} +

+ {% if articles_page.has_previous() %} + + « + {% endif %} + Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} + {% if articles_page.has_next() %} + » + + {% endif %} +

+{% endif %} diff --git a/themes/simple/templates/archives.html b/themes/simple/templates/archives.html new file mode 100644 index 0000000..cd12950 --- /dev/null +++ b/themes/simple/templates/archives.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Archives{% endblock %} + +{% block content %} +

Archives for {{ SITENAME }}

+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+{% endblock %} diff --git a/themes/simple/templates/article.html b/themes/simple/templates/article.html new file mode 100644 index 0000000..c8c9a4f --- /dev/null +++ b/themes/simple/templates/article.html @@ -0,0 +1,67 @@ +{% extends "base.html" %} +{% block html_lang %}{{ article.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ article.title|striptags }}{% endblock %} + +{% block head %} + {{ super() }} + + {% import 'translations.html' as translations with context %} + {% if translations.entry_hreflang(article) %} + {{ translations.entry_hreflang(article) }} + {% endif %} + + {% if article.description %} + + {% endif %} + + {% for tag in article.tags %} + + {% endfor %} + +{% endblock %} + +{% block content %} +
+
+

+ {{ article.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} +
+ +
+ {{ article.content }} +
+
+{% endblock %} diff --git a/themes/simple/templates/author.html b/themes/simple/templates/author.html new file mode 100644 index 0000000..a190194 --- /dev/null +++ b/themes/simple/templates/author.html @@ -0,0 +1,8 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %} + +{% block content_title %} +

Articles by {{ author }}

+{% endblock %} + diff --git a/themes/simple/templates/authors.html b/themes/simple/templates/authors.html new file mode 100644 index 0000000..9aee5db --- /dev/null +++ b/themes/simple/templates/authors.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Authors{% endblock %} + +{% block content %} +

Authors on {{ SITENAME }}

+ +{% endblock %} diff --git a/themes/simple/templates/base.html b/themes/simple/templates/base.html new file mode 100644 index 0000000..2c17dbf --- /dev/null +++ b/themes/simple/templates/base.html @@ -0,0 +1,63 @@ + + + + {% block head %} + {% block title %}{{ SITENAME }}{% endblock title %} + + + {% if FEED_ALL_ATOM %} + + {% endif %} + {% if FEED_ALL_RSS %} + + {% endif %} + {% if FEED_ATOM %} + + {% endif %} + {% if FEED_RSS %} + + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + + {% endif %} + {% if TAG_FEED_ATOM and tag %} + + {% endif %} + {% if TAG_FEED_RSS and tag %} + + {% endif %} + {% endblock head %} + + + + + + {% block content %} + {% endblock %} + + + diff --git a/themes/simple/templates/categories.html b/themes/simple/templates/categories.html new file mode 100644 index 0000000..7999de4 --- /dev/null +++ b/themes/simple/templates/categories.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Categories{% endblock %} + +{% block content %} +

Categories on {{ SITENAME }}

+ +{% endblock %} diff --git a/themes/simple/templates/category.html b/themes/simple/templates/category.html new file mode 100644 index 0000000..14d7ff0 --- /dev/null +++ b/themes/simple/templates/category.html @@ -0,0 +1,8 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - {{ category }} category{% endblock %} + +{% block content_title %} +

Articles in the {{ category }} category

+{% endblock %} + diff --git a/themes/simple/templates/gosquared.html b/themes/simple/templates/gosquared.html new file mode 100644 index 0000000..49ccbbe --- /dev/null +++ b/themes/simple/templates/gosquared.html @@ -0,0 +1,14 @@ +{% if GOSQUARED_SITENAME %} + +{% endif %} diff --git a/themes/simple/templates/index.html b/themes/simple/templates/index.html new file mode 100644 index 0000000..ab4bc34 --- /dev/null +++ b/themes/simple/templates/index.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% block content %} +
+{% block content_title %} +

All articles

+{% endblock %} + +
    +{% for article in articles_page.object_list %} +
  1. +

    {{ article.title }}

    +
    + +
    By + {% for author in article.authors %} + {{ author }} + {% endfor %} +
    +
    +
    {{ article.summary }}
    +
  2. +{% endfor %} +
+{% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} +{% endif %} +
+{% endblock content %} diff --git a/themes/simple/templates/page.html b/themes/simple/templates/page.html new file mode 100644 index 0000000..33344ea --- /dev/null +++ b/themes/simple/templates/page.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} +{% block html_lang %}{{ page.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ page.title|striptags }}{%endblock%} + +{% block head %} + {{ super() }} + + {% import 'translations.html' as translations with context %} + {% if translations.entry_hreflang(page) %} + {{ translations.entry_hreflang(page) }} + {% endif %} +{% endblock %} + +{% block content %} +

{{ page.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + + {{ page.content }} + + {% if page.modified %} +

+ Last updated: {{ page.locale_modified }} +

+ {% endif %} +{% endblock %} diff --git a/themes/simple/templates/pagination.html b/themes/simple/templates/pagination.html new file mode 100644 index 0000000..588f130 --- /dev/null +++ b/themes/simple/templates/pagination.html @@ -0,0 +1,15 @@ +{% if DEFAULT_PAGINATION %} +{% set first_page = articles_paginator.page(1) %} +{% set last_page = articles_paginator.page(articles_paginator.num_pages) %} +

+ {% if articles_page.has_previous() %} + + « + {% endif %} + Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} + {% if articles_page.has_next() %} + » + + {% endif %} +

+{% endif %} diff --git a/themes/simple/templates/period_archives.html b/themes/simple/templates/period_archives.html new file mode 100644 index 0000000..e1ddf62 --- /dev/null +++ b/themes/simple/templates/period_archives.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - {{ period | reverse | join(' ') }} archives{% endblock %} + +{% block content %} +

Archives for {{ period | reverse | join(' ') }}

+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+{% endblock %} diff --git a/themes/simple/templates/tag.html b/themes/simple/templates/tag.html new file mode 100644 index 0000000..9c95803 --- /dev/null +++ b/themes/simple/templates/tag.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - {{ tag }} tag{% endblock %} + +{% block content_title %} +

Articles tagged with {{ tag }}

+{% endblock %} diff --git a/themes/simple/templates/tags.html b/themes/simple/templates/tags.html new file mode 100644 index 0000000..b90b0ac --- /dev/null +++ b/themes/simple/templates/tags.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Tags{% endblock %} + +{% block content %} +

Tags for {{ SITENAME }}

+ +{% endblock %} diff --git a/themes/simple/templates/translations.html b/themes/simple/templates/translations.html new file mode 100644 index 0000000..f0e2478 --- /dev/null +++ b/themes/simple/templates/translations.html @@ -0,0 +1,16 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: +{% for translation in article.translations %} +{{ translation.lang }} +{% endfor %} +{% endif %} +{% endmacro %} + +{% macro entry_hreflang(entry) %} +{% if entry.translations %} + {% for translation in entry.translations %} + + {% endfor %} +{% endif %} +{% endmacro %}