summaryrefslogtreecommitdiff
path: root/theme/templates
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2016-10-23 22:38:55 +0200
committerUwe Kleine-König <uwe@kleine-koenig.org>2016-10-23 22:38:55 +0200
commit432285bda8a96f0e5bdff52d4d726ad2397b3ac8 (patch)
treeb86acea2dc86e2e4fc9c3e09f6965a8c6260a5f3 /theme/templates
initial approach for new flug website
Diffstat (limited to 'theme/templates')
-rw-r--r--theme/templates/archives.html13
-rw-r--r--theme/templates/article.html36
-rw-r--r--theme/templates/article_infos.html23
-rw-r--r--theme/templates/author.html2
-rw-r--r--theme/templates/authors.html16
-rw-r--r--theme/templates/base.html70
-rw-r--r--theme/templates/category.html2
-rw-r--r--theme/templates/comments.html1
-rw-r--r--theme/templates/index.html64
-rw-r--r--theme/templates/page.html12
-rw-r--r--theme/templates/period_archives.html13
-rw-r--r--theme/templates/tag.html2
-rw-r--r--theme/templates/taglist.html2
-rw-r--r--theme/templates/tags.html16
-rw-r--r--theme/templates/translations.html8
15 files changed, 280 insertions, 0 deletions
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 %}
+<section id="content" class="body">
+<h1>Archives for {{ SITENAME }}</h1>
+
+<dl>
+{% for article in dates %}
+ <dt>{{ article.locale_date }}</dt>
+ <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
+{% endfor %}
+</dl>
+</section>
+{% 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 %}
+<section id="content" class="body">
+ <article>
+ <header>
+ <h1 class="entry-title">
+ <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
+ title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h1>
+ </header>
+
+ <div class="entry-content">
+ {% include 'article_infos.html' %}
+ {{ article.content }}
+ </div><!-- /.entry-content -->
+ {% if DISQUS_SITENAME and SITEURL and article.status != "draft" %}
+ <div class="comments">
+ <h2>Comments !</h2>
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ var disqus_shortname = '{{ DISQUS_SITENAME }}';
+ var disqus_identifier = '{{ article.url }}';
+ var disqus_url = '{{ SITEURL }}/{{ article.url }}';
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the comments.</noscript>
+ </div>
+ {% endif %}
+
+ </article>
+</section>
+{% 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 @@
+<footer class="post-info">
+ <abbr class="published" title="{{ article.date.isoformat() }}">
+ Published: {{ article.locale_date }}
+ </abbr>
+ {% if article.modified %}
+ <br />
+ <abbr class="modified" title="{{ article.modified.isoformat() }}">
+ Updated: {{ article.locale_modified }}
+ </abbr>
+ {% endif %}
+
+ {% if article.authors %}
+ <address class="vcard author">
+ By {% for author in article.authors %}
+ <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+ {% endfor %}
+ </address>
+ {% endif %}
+<p>In <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
+{% include 'taglist.html' %}
+{% import 'translations.html' as translations with context %}
+{{ translations.translations_for(article) }}
+</footer><!-- /.post-info -->
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 %}
+
+<section id="content" class="body">
+ <h1>Authors on {{ SITENAME }}</h1>
+ <ul>
+ {% for author, articles in authors|sort %}
+ <li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
+ {% endfor %}
+ </ul>
+</section>
+
+{% 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 @@
+<!DOCTYPE html>
+<html lang="{{ DEFAULT_LANG }}">
+<head>
+ <meta charset="utf-8" />
+ <title>{% block title %}{{ SITENAME }}{%endblock%}</title>
+ <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/{{ CSS_FILE }}" />
+ {% if FEED_ALL_ATOM %}
+ <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
+ {% endif %}
+ {% if FEED_ALL_RSS %}
+ <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
+ {% endif %}
+
+ <!--[if IE]>
+ <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+</head>
+
+<body id="index" class="home">
+ <header id="banner" class="body">
+ <h1><a href="{{ SITEURL }}/">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1>
+ <nav><ul>
+ {% for title, link in MENUITEMS %}
+ <li><a href="{{ link }}">{{ title }}</a></li>
+ {% endfor %}
+ {% if DISPLAY_PAGES_ON_MENU -%}
+ {% for pg in PAGES %}
+ <li{% if pg == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ pg.url }}">{{ pg.title }}</a></li>
+ {% endfor %}
+ {% endif %}
+ {% if DISPLAY_CATEGORIES_ON_MENU -%}
+ {% for cat, null in categories %}
+ <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
+ {% endfor %}
+ {% endif %}
+ </ul></nav>
+ </header><!-- /#banner -->
+ {% block content %}
+ {% endblock %}
+ <section id="extras" class="body">
+ {% if LINKS %}
+ <div class="blogroll">
+ <h2>blogroll</h2>
+ <ul>
+ {% for name, link in LINKS %}
+ <li><a href="{{ link }}">{{ name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div><!-- /.blogroll -->
+ {% endif %}
+ {% if SOCIAL or FEED_ALL_ATOM or FEED_ALL_RSS %}
+ <div class="social">
+ <h2>social</h2>
+ <ul>
+ {% if FEED_ALL_ATOM %}
+ <li><a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate">atom feed</a></li>
+ {% endif %}
+ {% if FEED_ALL_RSS %}
+ <li><a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate">rss feed</a></li>
+ {% endif %}
+
+ {% for name, link in SOCIAL %}
+ <li><a href="{{ link }}">{{ name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div><!-- /.social -->
+ {% endif %}
+ </section><!-- /#extras -->
+</body>
+</html>
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 %}<p>There are <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">comments</a>.</p>{% 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() %}
+ <aside id="featured" class="body">
+ <article>
+ <h1 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
+ {% include 'article_infos.html' %}{{ article.content }}{% include 'comments.html' %}
+ </article>
+ {% if loop.length == 1 %}
+ {% include 'pagination.html' %}
+ {% endif %}
+ </aside><!-- /#featured -->
+ {% if loop.length > 1 %}
+ <section id="content" class="body">
+ <h1>Other articles</h1>
+ <hr />
+ <ol id="posts-list" class="hfeed">
+ {% endif %}
+ {# other items #}
+ {% else %}
+ {% if loop.first and articles_page.has_previous %}
+ <section id="content" class="body">
+ <ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}">
+ {% endif %}
+ <li><article class="hentry">
+ <header>
+ <h1><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
+ title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h1>
+ </header>
+
+ <div class="entry-content">
+ {% include 'article_infos.html' %}
+ {{ article.summary }}
+ <a class="readmore" href="{{ SITEURL }}/{{ article.url }}">read more</a>
+ {% include 'comments.html' %}
+ </div><!-- /.entry-content -->
+ </article></li>
+ {% endif %}
+ {% if loop.last %}
+ {% if loop.length > 1 %}
+ </ol><!-- /#posts-list -->
+ {% endif %}
+ {% if articles_page.has_previous() or loop.length > 1 %}
+ {% include 'pagination.html' %}
+ {% endif %}
+ {% if loop.length > 1 %}
+ </section><!-- /#content -->
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+{% else %}
+<section id="content" class="body">
+<h2>Pages</h2>
+ {% for page in PAGES %}
+ <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
+ {% endfor %}
+</section>
+{% 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 %}
+<section id="content" class="body">
+ <h1 class="entry-title">{{ page.title }}</h1>
+ {% import 'translations.html' as translations with context %}
+ {{ translations.translations_for(page) }}
+ {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">get
+ the pdf</a>{% endif %}
+ {{ page.content }}
+</section>
+{% 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 %}
+<section id="content" class="body">
+<h1>Archives for {{ period | reverse | join(' ') }}</h1>
+
+<dl>
+{% for article in dates %}
+ <dt>{{ article.locale_date }}</dt>
+ <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
+{% endfor %}
+</dl>
+</section>
+{% 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 %}<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag | escape }}</a> {% endfor %}</p>{% endif %}
+{% if PDF_PROCESSOR %}<p><a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a></p>{% 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 %}
+
+<section id="content" class="body">
+ <h1>Tags for {{ SITENAME }}</h1>
+ <ul>
+ {% for tag, articles in tags|sort %}
+ <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
+ {% endfor %}
+ </ul>
+</section>
+
+{% 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 %}
+ <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
+ {% endfor %}
+{% endif %}
+{% endmacro %}