summaryrefslogtreecommitdiff
path: root/themes/simple/templates
diff options
context:
space:
mode:
Diffstat (limited to 'themes/simple/templates')
-rw-r--r--themes/simple/templates/archives.html14
-rw-r--r--themes/simple/templates/article.html65
-rw-r--r--themes/simple/templates/author.html7
-rw-r--r--themes/simple/templates/authors.html12
-rw-r--r--themes/simple/templates/base.html108
-rw-r--r--themes/simple/templates/categories.html12
-rw-r--r--themes/simple/templates/category.html7
-rw-r--r--themes/simple/templates/index.html29
-rw-r--r--themes/simple/templates/page.html33
-rw-r--r--themes/simple/templates/pagination.html17
-rw-r--r--themes/simple/templates/period_archives.html14
-rw-r--r--themes/simple/templates/tag.html7
-rw-r--r--themes/simple/templates/tags.html12
-rw-r--r--themes/simple/templates/translations.html16
14 files changed, 353 insertions, 0 deletions
diff --git a/themes/simple/templates/archives.html b/themes/simple/templates/archives.html
new file mode 100644
index 0000000..a61bf3c
--- /dev/null
+++ b/themes/simple/templates/archives.html
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME|striptags }} - Archives{% endblock %}
+
+{% block content %}
+ <h2>Archives for {{ SITENAME }}</h2>
+
+ <dl>
+ {% for article in dates %}
+ <dt>{{ article.locale_date }}</dt>
+ <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
+ {% endfor %}
+ </dl>
+{% endblock %}
diff --git a/themes/simple/templates/article.html b/themes/simple/templates/article.html
new file mode 100644
index 0000000..a01de10
--- /dev/null
+++ b/themes/simple/templates/article.html
@@ -0,0 +1,65 @@
+{% extends "base.html" %}
+{% block html_lang %}{{ article.lang }}{% endblock %}
+
+{% block title %}{{ SITENAME|striptags }} - {{ 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 %}
+ <meta name="description" content="{{article.description}}" />
+ {% endif %}
+
+ {% for tag in article.tags %}
+ <meta name="tags" content="{{tag}}" />
+ {% endfor %}
+
+{% endblock %}
+
+{% block content %}
+ <article>
+ <header>
+ <h2>
+ <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
+ title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
+ {% import 'translations.html' as translations with context %}
+ {{ translations.translations_for(article) }}
+ </header>
+ {{ article.content }}
+ <footer>
+ <p>Published: <time datetime="{{ article.date.isoformat() }}">
+ {{ article.locale_date }}
+ </time></p>
+ {% if article.modified %}
+ <p>Last updated: <time datetime="{{ article.modified.isoformat() }}">
+ {{ article.locale_modified }}
+ </time></p>
+ {% endif %}
+ {% if article.authors %}
+ <address>
+ By {% for author in article.authors %}
+ <a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+ {% endfor %}
+ </address>
+ {% endif %}
+ {% if article.category %}
+ <p>
+ Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
+ </p>
+ {% endif %}
+ {% if article.tags %}
+ <p>
+ Tags:
+ {% for tag in article.tags %}
+ <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
+ {% endfor %}
+ </p>
+ {% endif %}
+ </footer>
+ </article>
+{% endblock %}
diff --git a/themes/simple/templates/author.html b/themes/simple/templates/author.html
new file mode 100644
index 0000000..06f871d
--- /dev/null
+++ b/themes/simple/templates/author.html
@@ -0,0 +1,7 @@
+{% extends "index.html" %}
+
+{% block title %}{{ SITENAME|striptags }} - Articles by {{ author }}{% endblock %}
+
+{% block content_title %}
+ <h2>Articles by {{ author }}</h2>
+{% endblock %}
diff --git a/themes/simple/templates/authors.html b/themes/simple/templates/authors.html
new file mode 100644
index 0000000..97a7457
--- /dev/null
+++ b/themes/simple/templates/authors.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME|striptags }} - Authors{% endblock %}
+
+{% block content %}
+ <h2>Authors on {{ SITENAME }}</h2>
+ <ul>
+ {% for author, articles in authors|sort %}
+ <li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
+ {% endfor %}
+ </ul>
+{% endblock %}
diff --git a/themes/simple/templates/base.html b/themes/simple/templates/base.html
new file mode 100644
index 0000000..f34054f
--- /dev/null
+++ b/themes/simple/templates/base.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
+ <head>
+ {% block head %}
+ <title>{% block title %}{{ SITENAME|striptags }}{% endblock title %}</title>
+ <meta charset="utf-8" />
+ <meta name="generator" content="Pelican" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ {% if SITESUBTITLE %}
+ <meta name="description" content="{{ SITESUBTITLE }}" />
+ {% endif %}
+ {% if CSS_FILE %}
+ <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}" />
+ {% endif %}
+ {% if STYLESHEET_URL %}
+ <link rel="stylesheet" type="text/css" href="{{ STYLESHEET_URL }}" />
+ {% endif %}
+ {% if FEED_ALL_ATOM %}
+ <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Full Atom Feed" />
+ {% endif %}
+ {% if FEED_ALL_RSS %}
+ <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} Full RSS Feed" />
+ {% endif %}
+ {% if FEED_ATOM %}
+ <link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Atom Feed" />
+ {% endif %}
+ {% if FEED_RSS %}
+ <link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} RSS Feed" />
+ {% endif %}
+ {% if CATEGORY_FEED_ATOM and category %}
+ <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM.format(slug=category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ category.slug.title() }} Category Atom Feed" />
+ {% endif %}
+ {% if CATEGORY_FEED_RSS and category %}
+ <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_RSS.format(slug=category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ category.slug.title() }} Category RSS Feed" />
+ {% endif %}
+ {% if TAG_FEED_ATOM and tag %}
+ <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_ATOM.format(slug=tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ tag.slug.title() }} Tag Atom Feed" />
+ {% endif %}
+ {% if TAG_FEED_RSS and tag %}
+ <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_RSS.format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ tag.slug.title() }} Tag RSS Feed" />
+ {% endif %}
+ {% endblock head %}
+ </head>
+
+ <body>
+ {% block body %}
+ <div id="container">
+ <header id="header">
+ {% block header %}
+ <hgroup>
+ <h1>
+ <a href="{{ SITEURL }}/">{{ SITENAME }}</a>
+ </h1>
+ {% if SITESUBTITLE %}
+ <p>{{ SITESUBTITLE }}</p>{% endif %}</hgroup>
+ {% endblock header %}
+ </header>
+ <div id="content">
+ <aside>
+ <div id="navs">
+ <div class="nav">
+ <header>
+ <span class="nav-title">Website</span>
+ </header>
+ <nav aria-label="Navigation: Website">
+ {% for title, link in MENUITEMS %}
+ <a class="nav-item" href="{{ link }}">{{ title }}</a></li>
+ {% endfor %}
+ {% if DISPLAY_PAGES_ON_MENU %}
+ {% for p in pages %}
+ <a class="nav-item" href="{{ SITEURL }}/{{ p.url }}" {% if p==page %} aria-current="page" {% endif %}>{{ p.title }}</a>
+ {% endfor %}
+ {% endif %}
+ {% if DISPLAY_CATEGORIES_ON_MENU %}
+ {% for cat, null in categories %}
+ <a class="nav-item" href="{{ SITEURL }}/{{ cat.url }}" {% if cat==category %} aria-current="page" {% endif %}>{{ cat}}</a>
+ {% endfor %}
+ {% endif %}
+ </nav>
+ </div>
+ <div class="nav">
+ <header>
+ <span class="nav-title">Links</span>
+ </header>
+ <nav aria-label="Navigation: Links">
+ {% for name, link in LINKS %}
+ <a class="nav-item" href="{{link}}">{{ name }}</a>
+ {% endfor %}
+ </nav>
+ </div>
+ </div>
+ </aside>
+ <main>
+ {% block content %}
+ {% endblock content %}
+ </main>
+ <footer>
+ {% block footer %}
+ <address>
+ Made with <a rel="nofollow" href="https://getpelican.com/">Pelican</a>,
+ </address>
+ {% endblock footer %}
+ </footer>
+ </div>
+ </div>
+ {% endblock body %}
+ </body>
+</html>
diff --git a/themes/simple/templates/categories.html b/themes/simple/templates/categories.html
new file mode 100644
index 0000000..c723f8a
--- /dev/null
+++ b/themes/simple/templates/categories.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME|striptags }} - Categories{% endblock %}
+
+{% block content %}
+ <h2>Categories on {{ SITENAME }}</h2>
+ <ul>
+ {% for category, articles in categories|sort %}
+ <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
+ {% endfor %}
+ </ul>
+{% endblock %}
diff --git a/themes/simple/templates/category.html b/themes/simple/templates/category.html
new file mode 100644
index 0000000..bfad391
--- /dev/null
+++ b/themes/simple/templates/category.html
@@ -0,0 +1,7 @@
+{% extends "index.html" %}
+
+{% block title %}{{ SITENAME|striptags }} - {{ category }} category{% endblock %}
+
+{% block content_title %}
+ <h2>Articles in the {{ category }} category</h2>
+{% endblock %}
diff --git a/themes/simple/templates/index.html b/themes/simple/templates/index.html
new file mode 100644
index 0000000..100a720
--- /dev/null
+++ b/themes/simple/templates/index.html
@@ -0,0 +1,29 @@
+{% extends "base.html" %}
+{% block content %}
+ {% block content_title %}
+ <h2>All articles</h2>
+ {% endblock %}
+
+
+ {% for article in articles_page.object_list %}
+ <article>
+ <header> <h2><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
+ <section>{{ article.summary }}</section>
+ <footer>
+ <p>Published: <time datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time></p>
+ {%- if article.authors %}
+ <address>By
+ {% for author in article.authors %}
+ <a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+ {% endfor %}
+ </address>
+ {%- endif %}
+ </footer>
+ </article>
+ {% 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..4096e7a
--- /dev/null
+++ b/themes/simple/templates/page.html
@@ -0,0 +1,33 @@
+{% extends "base.html" %}
+{% block html_lang %}{{ page.lang }}{% endblock %}
+
+{% block title %}{{ SITENAME|striptags }} - {{ 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 %}
+ <article>
+ <header>
+ <h2>{{ page.title }}</h2>
+ </header>
+ {% import 'translations.html' as translations with context %}
+ {{ translations.translations_for(page) }}
+
+ {% block page_content %}{{ page.content }}{% endblock page_content %}
+
+ {% if page.modified %}
+ <footer>
+ <p>
+ Last updated: {{ page.locale_modified }}
+ </p>
+ </footer>
+ {% endif %}
+ </article>
+{% endblock %}
diff --git a/themes/simple/templates/pagination.html b/themes/simple/templates/pagination.html
new file mode 100644
index 0000000..9511fdb
--- /dev/null
+++ b/themes/simple/templates/pagination.html
@@ -0,0 +1,17 @@
+{% if DEFAULT_PAGINATION %}
+ {% set first_page = articles_paginator.page(1) %}
+ {% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
+ <nav>
+ <ul>
+ {% if articles_page.has_previous() %}
+ <li><a href="{{ SITEURL }}/{{ first_page.url }}">&Lang;</a></li>
+ <li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&lang;</a></li>
+ {% endif %}
+ <li>Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</li>
+ {% if articles_page.has_next() %}
+ <li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">&rang;</a></li>
+ <li><a href="{{ SITEURL }}/{{ last_page.url }}">&Rang;</a></li>
+ {% endif %}
+ </ul>
+ </nav>
+{% endif %}
diff --git a/themes/simple/templates/period_archives.html b/themes/simple/templates/period_archives.html
new file mode 100644
index 0000000..181f493
--- /dev/null
+++ b/themes/simple/templates/period_archives.html
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME|striptags }} - {{ period | reverse | join(' ') }} archives{% endblock %}
+
+{% block content %}
+ <h2>Archives for {{ period | reverse | join(' ') }}</h2>
+
+ <dl>
+ {% for article in dates %}
+ <dt>{{ article.locale_date }}</dt>
+ <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
+ {% endfor %}
+ </dl>
+{% endblock %}
diff --git a/themes/simple/templates/tag.html b/themes/simple/templates/tag.html
new file mode 100644
index 0000000..be21778
--- /dev/null
+++ b/themes/simple/templates/tag.html
@@ -0,0 +1,7 @@
+{% extends "index.html" %}
+
+{% block title %}{{ SITENAME|striptags }} - {{ tag }} tag{% endblock %}
+
+{% block content_title %}
+ <h2>Articles tagged with {{ tag }}</h2>
+{% endblock %}
diff --git a/themes/simple/templates/tags.html b/themes/simple/templates/tags.html
new file mode 100644
index 0000000..b21e5b5
--- /dev/null
+++ b/themes/simple/templates/tags.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME|striptags }} - Tags{% endblock %}
+
+{% block content %}
+ <h2>Tags for {{ SITENAME }}</h2>
+ <ul>
+ {% for tag, articles in tags|sort %}
+ <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
+ {% endfor %}
+ </ul>
+{% endblock %}
diff --git a/themes/simple/templates/translations.html b/themes/simple/templates/translations.html
new file mode 100644
index 0000000..eed0703
--- /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 %}
+ <a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
+ {% endfor %}
+ {% endif %}
+{% endmacro %}
+
+{% macro entry_hreflang(entry) %}
+ {% if entry.translations %}
+ {% for translation in entry.translations %}
+ <link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
+ {% endfor %}
+ {% endif %}
+{% endmacro %}