From 432285bda8a96f0e5bdff52d4d726ad2397b3ac8 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Sun, 23 Oct 2016 22:38:55 +0200 Subject: initial approach for new flug website --- theme/templates/archives.html | 13 +++++++ theme/templates/article.html | 36 +++++++++++++++++++ theme/templates/article_infos.html | 23 ++++++++++++ theme/templates/author.html | 2 ++ theme/templates/authors.html | 16 +++++++++ theme/templates/base.html | 70 ++++++++++++++++++++++++++++++++++++ theme/templates/category.html | 2 ++ theme/templates/comments.html | 1 + theme/templates/index.html | 64 +++++++++++++++++++++++++++++++++ theme/templates/page.html | 12 +++++++ theme/templates/period_archives.html | 13 +++++++ theme/templates/tag.html | 2 ++ theme/templates/taglist.html | 2 ++ theme/templates/tags.html | 16 +++++++++ theme/templates/translations.html | 8 +++++ 15 files changed, 280 insertions(+) create mode 100644 theme/templates/archives.html create mode 100644 theme/templates/article.html create mode 100644 theme/templates/article_infos.html create mode 100644 theme/templates/author.html create mode 100644 theme/templates/authors.html create mode 100644 theme/templates/base.html create mode 100644 theme/templates/category.html create mode 100644 theme/templates/comments.html create mode 100644 theme/templates/index.html create mode 100644 theme/templates/page.html create mode 100644 theme/templates/period_archives.html create mode 100644 theme/templates/tag.html create mode 100644 theme/templates/taglist.html create mode 100644 theme/templates/tags.html create mode 100644 theme/templates/translations.html (limited to 'theme/templates') diff --git a/theme/templates/archives.html b/theme/templates/archives.html new file mode 100644 index 0000000..f678494 --- /dev/null +++ b/theme/templates/archives.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% block content %} +
+

Archives for {{ SITENAME }}

+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+
+{% endblock %} diff --git a/theme/templates/article.html b/theme/templates/article.html new file mode 100644 index 0000000..03ece2c --- /dev/null +++ b/theme/templates/article.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% block title %}{{ article.title|striptags }}{% endblock %} +{% block content %} +
+
+
+

+ {{ article.title }}

+
+ +
+ {% include 'article_infos.html' %} + {{ article.content }} +
+ {% if DISQUS_SITENAME and SITEURL and article.status != "draft" %} +
+

Comments !

+
+ + +
+ {% endif %} + +
+
+{% endblock %} diff --git a/theme/templates/article_infos.html b/theme/templates/article_infos.html new file mode 100644 index 0000000..718967e --- /dev/null +++ b/theme/templates/article_infos.html @@ -0,0 +1,23 @@ + diff --git a/theme/templates/author.html b/theme/templates/author.html new file mode 100644 index 0000000..0b37290 --- /dev/null +++ b/theme/templates/author.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ author }}{% endblock %} diff --git a/theme/templates/authors.html b/theme/templates/authors.html new file mode 100644 index 0000000..e61a332 --- /dev/null +++ b/theme/templates/authors.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Authors{% endblock %} + +{% block content %} + +
+

Authors on {{ SITENAME }}

+ +
+ +{% endblock %} diff --git a/theme/templates/base.html b/theme/templates/base.html new file mode 100644 index 0000000..7cceb5e --- /dev/null +++ b/theme/templates/base.html @@ -0,0 +1,70 @@ + + + + + {% block title %}{{ SITENAME }}{%endblock%} + + {% if FEED_ALL_ATOM %} + + {% endif %} + {% if FEED_ALL_RSS %} + + {% endif %} + + + + + + + {% block content %} + {% endblock %} +
+ {% if LINKS %} +
+

blogroll

+
    + {% for name, link in LINKS %} +
  • {{ name }}
  • + {% endfor %} +
+
+ {% endif %} + {% if SOCIAL or FEED_ALL_ATOM or FEED_ALL_RSS %} + + {% endif %} +
+ + diff --git a/theme/templates/category.html b/theme/templates/category.html new file mode 100644 index 0000000..56f8e93 --- /dev/null +++ b/theme/templates/category.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ category }}{% endblock %} diff --git a/theme/templates/comments.html b/theme/templates/comments.html new file mode 100644 index 0000000..bb033c0 --- /dev/null +++ b/theme/templates/comments.html @@ -0,0 +1 @@ +{% if DISQUS_SITENAME %}

There are comments.

{% endif %} diff --git a/theme/templates/index.html b/theme/templates/index.html new file mode 100644 index 0000000..c898247 --- /dev/null +++ b/theme/templates/index.html @@ -0,0 +1,64 @@ +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block content %} +{% if articles %} + {% for article in articles_page.object_list %} + + {# First item #} + {% if loop.first and not articles_page.has_previous() %} + + {% if loop.length > 1 %} +
+

Other articles

+
+
    + {% endif %} + {# other items #} + {% else %} + {% if loop.first and articles_page.has_previous %} +
    +
      + {% endif %} +
    1. +
      +

      {{ article.title }}

      +
      + +
      + {% include 'article_infos.html' %} + {{ article.summary }} + read more + {% include 'comments.html' %} +
      +
    2. + {% endif %} + {% if loop.last %} + {% if loop.length > 1 %} +
    + {% endif %} + {% if articles_page.has_previous() or loop.length > 1 %} + {% include 'pagination.html' %} + {% endif %} + {% if loop.length > 1 %} +
    + {% endif %} + {% endif %} + {% endfor %} +{% else %} +
    +

    Pages

    + {% for page in PAGES %} +
  1. {{ page.title }}
  2. + {% endfor %} +
    +{% endif %} +{% endblock content %} diff --git a/theme/templates/page.html b/theme/templates/page.html new file mode 100644 index 0000000..5ac50b6 --- /dev/null +++ b/theme/templates/page.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }}{% endblock %} +{% block content %} +
    +

    {{ page.title }}

    + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + {% if PDF_PROCESSOR %}get + the pdf{% endif %} + {{ page.content }} +
    +{% endblock %} diff --git a/theme/templates/period_archives.html b/theme/templates/period_archives.html new file mode 100644 index 0000000..252e002 --- /dev/null +++ b/theme/templates/period_archives.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% block content %} +
    +

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

    + +
    +{% for article in dates %} +
    {{ article.locale_date }}
    +
    {{ article.title }}
    +{% endfor %} +
    +
    +{% endblock %} diff --git a/theme/templates/tag.html b/theme/templates/tag.html new file mode 100644 index 0000000..68cdcba --- /dev/null +++ b/theme/templates/tag.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %} diff --git a/theme/templates/taglist.html b/theme/templates/taglist.html new file mode 100644 index 0000000..1e0b95a --- /dev/null +++ b/theme/templates/taglist.html @@ -0,0 +1,2 @@ +{% if article.tags %}

    tags: {% for tag in article.tags %}{{ tag | escape }} {% endfor %}

    {% endif %} +{% if PDF_PROCESSOR %}

    get the pdf

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

    Tags for {{ SITENAME }}

    +
      + {% for tag, articles in tags|sort %} +
    • {{ tag }} ({{ articles|count }})
    • + {% endfor %} +
    +
    + +{% endblock %} diff --git a/theme/templates/translations.html b/theme/templates/translations.html new file mode 100644 index 0000000..7894bb0 --- /dev/null +++ b/theme/templates/translations.html @@ -0,0 +1,8 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} +{% endif %} +{% endmacro %} -- cgit v1.2.3