aboutsummaryrefslogtreecommitdiff
path: root/theme/templates
diff options
context:
space:
mode:
authorChimrod <contact+git@chimrod.com>2013-04-16 21:27:30 +0200
committerChimrod <contact+git@chimrod.com>2013-04-16 21:27:30 +0200
commit66a5a0cdccd464930a232c87f91e1b0805f255a5 (patch)
tree1563108cc22cfdc250108eb25b3beaf51d398dff /theme/templates
initial commit
Diffstat (limited to 'theme/templates')
-rwxr-xr-xtheme/templates/archives.html17
-rwxr-xr-xtheme/templates/article.html40
-rwxr-xr-xtheme/templates/author.html2
-rwxr-xr-xtheme/templates/authors.html0
-rwxr-xr-xtheme/templates/base.html55
-rwxr-xr-xtheme/templates/categories.html17
-rwxr-xr-xtheme/templates/category.html31
-rwxr-xr-xtheme/templates/header.html3
-rwxr-xr-xtheme/templates/index.html31
-rwxr-xr-xtheme/templates/menu.html53
-rwxr-xr-xtheme/templates/meta.html5
-rwxr-xr-xtheme/templates/navigator.html15
-rwxr-xr-xtheme/templates/page.html12
-rwxr-xr-xtheme/templates/tag.html31
-rwxr-xr-xtheme/templates/tags.html13
15 files changed, 325 insertions, 0 deletions
diff --git a/theme/templates/archives.html b/theme/templates/archives.html
new file mode 100755
index 0000000..f3c2990
--- /dev/null
+++ b/theme/templates/archives.html
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+
+{%block title %}{{ SITENAME }} - Archives{%endblock%}
+
+{% block content %}
+ <h2 class="page_title">Archives</h2>
+ <table id="archives">
+ <tbody>
+ {% for article in dates %}
+ <tr>
+ <td>{{ article.date.date() }}</td>
+ <td><a href='{{ article.url }}'>{{ article.title }}</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+{% endblock %}
diff --git a/theme/templates/article.html b/theme/templates/article.html
new file mode 100755
index 0000000..f66fe72
--- /dev/null
+++ b/theme/templates/article.html
@@ -0,0 +1,40 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME }} - {{ article.title }}{% endblock %}
+
+{% block content %}
+ <article class="post">
+ <h2 class="page_title"><a href="{{ article.url }}" rel="bookmark" title="{{SITENAME}} - {{ article.title }}">{{ article.title }}</a></h2>
+ {%include 'meta.html'%}
+
+ <section class="post_content">
+ {{ article.content }}
+ </section>
+
+ </article>
+
+ {% if DISQUS_SITENAME %}
+ <div class="comments">
+ <h2>Commentaires&nbsp;:</h2>
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ var disqus_identifier = "{{ article.url }}";
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ </div>
+ {% endif %}
+
+{#
+ {% if article.related_posts %}
+ <ul>
+ {% for related_post in article.related_posts %}
+ <li>{{ related_post.url }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+#}
+{% endblock %}
diff --git a/theme/templates/author.html b/theme/templates/author.html
new file mode 100755
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 100755
index 0000000..e69de29
--- /dev/null
+++ b/theme/templates/authors.html
diff --git a/theme/templates/base.html b/theme/templates/base.html
new file mode 100755
index 0000000..93ae32c
--- /dev/null
+++ b/theme/templates/base.html
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html>
+<html lang="{{ DEFAULT_LANG }}" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{% block title %}{{ SITENAME }}{%endblock%}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />
+ <link href="{{ SITEURL }}/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} - Flux ATOM" />
+ {% if tag %}
+ {% if TAG_FEED_ATOM %}
+ <link href="{{ SITEURL }}/{{ TAG_FEED_ATOM % tag|e }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} » {{ tag|e }} - Flux ATOM" />
+ {% endif %}
+ {% if TAG_FEED_RSS %}
+ <link href="{{ SITEURL }}/{{ TAG_FEED_RSS % tag|e }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} » {{ tag }} - Flux RSS" />
+ {% endif %}
+ {% endif %}
+
+ {% if category %}
+ {% if CATEGORY_FEED_ATOM %}
+ <link href="{{ SITEURL }}/{{ CATEGORY_FEED_ATOM % category }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} » {{ category|e }} - Flux ATOM" />
+ {% endif %}
+ {% if CATEGORY_FEED_RSS %}
+ <link href="{{ SITEURL }}/{{ CATEGORY_FEED_RSS % category }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} » {{ category|e }} - Flux RSS" />
+ {% endif %}
+ {% endif %}
+
+ {% if GOOGLE_ANALYTICS %}
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("{{GOOGLE_ANALYTICS}}");
+ pageTracker._trackPageview();
+ } catch(err) {}</script>
+ {% endif %}
+</head>
+<body>
+<div id="page">
+
+{% include 'header.html' %}
+{% include 'menu.html' %}
+
+ <section id="content">
+{% block content %}
+{% endblock %}
+ </section> <!-- /#content -->
+
+ <footer id="footer">
+ <p>Propulsé par <a href="http://getpelican.com/">Pelican</a>.</p>
+ </footer>
+</div> <!-- /#page -->
+</body>
+</html>
diff --git a/theme/templates/categories.html b/theme/templates/categories.html
new file mode 100755
index 0000000..0cd25d4
--- /dev/null
+++ b/theme/templates/categories.html
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME }} - Catégories{% endblock %}
+
+{% block content %}
+<h2 class="page_title">Liste des catégories</h2>
+<ul>
+{% for category, articles in categories %}
+ <li>
+ <a href="{{ category.url }}">{{ category }}</a> ({{ articles|count }})
+ {% if CATEGORY_FEED_RSS %}
+ <a href="{{ SITEURL }}/{{ CATEGORY_FEED_RSS % category }}" ><img src="theme/images/rss.png" /></a>
+ {% endif %}
+ </li>
+{% endfor %}
+</ul>
+{% endblock %}
diff --git a/theme/templates/category.html b/theme/templates/category.html
new file mode 100755
index 0000000..f476d93
--- /dev/null
+++ b/theme/templates/category.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+{% block title %}{{ SITENAME }} - {{ category}}{% endblock %}
+
+{% block content %}
+ <h2 class="page_title">Articles dans la catégorie «{{ category }}»</h2>
+ {% if articles %}
+ {% for article in (articles_page.object_list if articles_page else articles) %}
+ <article class="post">
+ <h2 class="title"><a href="{{ SITEURL }}/{{ article.url}}">{{ article.title }}</a></h2>
+ <time class="meta" datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time>
+
+ <section class="post_content">
+ {{ article.summary }}
+ {% if not loop.last %}
+ <hr>
+ {% endif %}
+ </section>
+ </article>
+ {% endfor %}
+ {% endif %}
+ {% include 'navigator.html' %}
+
+ {% if CATEGORY_FEED_RSS %}
+ <a href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS % category|e}}" ><img src="../theme/images/rss.png" /></a>
+ {% endif %}
+
+ {% if CATEGORY_FEED_ATOM %}
+ <a href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM % category|e}}" ><img src="../theme/images/atom.png" /></a>
+ {% endif %}
+
+{% endblock %}
diff --git a/theme/templates/header.html b/theme/templates/header.html
new file mode 100755
index 0000000..066d71a
--- /dev/null
+++ b/theme/templates/header.html
@@ -0,0 +1,3 @@
+<header id="header">
+ <h1><a href="{{ SITEURL }}/index.html">{{ SITENAME }}</a></h1>
+</header>
diff --git a/theme/templates/index.html b/theme/templates/index.html
new file mode 100755
index 0000000..245c708
--- /dev/null
+++ b/theme/templates/index.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+{% block title %}{{ SITENAME }} - Accueil{% endblock %}
+
+{% block content %}
+ {% if articles %}
+ {% for article in (articles_page.object_list if articles_page else articles) %}
+ <article class="post">
+ <h2 class="title"><a href="{{ SITEURL }}/{{ article.url}}">{{ article.title }}</a></h2>
+<time class="meta" datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time>
+
+ <section class="post_content">
+ {{ article.summary }}
+ {% if not loop.last %}
+ <hr>
+ {% endif %}
+ </section>
+ </article>
+ {% endfor %}
+
+ {% include 'navigator.html' %}
+
+ {% if FEED_RSS %}
+ <a href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" ><img src="../theme/images/rss.png" /></a>
+ {% endif %}
+
+ {% if FEED_ATOM %}
+ <a href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" ><img src="../theme/images/atom.png" /></a>
+ {% endif %}
+
+ {% endif %}
+{% endblock %}
diff --git a/theme/templates/menu.html b/theme/templates/menu.html
new file mode 100755
index 0000000..b8ecd50
--- /dev/null
+++ b/theme/templates/menu.html
@@ -0,0 +1,53 @@
+{% macro submenu(elements, link, name) -%}
+ {% if elements %}
+ <li class='has-sub'><a href="{{ SITEURL }}/{{link}}.html"><span>{{name}}</span></a>
+ <ul>
+ {% for tag, articles in elements %}
+ <li><a href="{{SITEURL}}/{{tag.url}}"><span>{{ tag }}</span></a></li>
+ {% endfor %}
+ </ul>
+ </li>
+ {% endif %}
+{%- endmacro %}
+
+<div id="cssmenu">
+<ul>
+ <li class='has-sub'><a href="{{ SITEURL }}/">Articles</a>
+ <ul>
+ {% for article in articles %}
+ {% if loop.index < FEED_MAX_ITEMS %}
+ <li><a href="{{ SITEURL }}/{{ article.url}}">{{ article.title }}</a></li>
+ {% endif %}
+ {% endfor %}
+ <hr/>
+ <li><a href="{{ SITEURL }}/archives.html">Archives</a>
+ </ul>
+ </li>
+
+ {{ submenu(categories, 'categories', 'Catégories') }}
+ {{ submenu(tags, 'tags', 'Mots-clefs') }}
+
+
+{#
+ {% if FEED or FEED_RSS %}
+ <li class='has-sub'><a href="{{ SITEURL }}/#">S'abonner</a>
+ <ul>
+ {% if FEED %}
+ <li><a href="{{ SITEURL }}/{{ FEED }}" rel="alternate">Flux ATOM</a></li>
+ {% endif %}
+ {% if FEED_RSS %}
+ <li><a href="{{ SITEURL }}/{{ FEED_RSS }}" rel="alternate">Flux RSS</a></li>
+ {% endif %}
+
+ {% if categories %}
+ {% for category, articles in categories %}
+ <li><a href="{{SITEURL}}/{{CATEGORY_FEED_ATOM % (category)}}"><span>{{ category }}</span></a></li>
+ {% endfor %}
+ {% endif %}
+ </ul>
+ </li>
+ {% endif %}
+#}
+
+</ul>
+</div>
diff --git a/theme/templates/meta.html b/theme/templates/meta.html
new file mode 100755
index 0000000..db36173
--- /dev/null
+++ b/theme/templates/meta.html
@@ -0,0 +1,5 @@
+ <details class="meta">
+ Publié le <time datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time>
+ {% if article.author %} par {{ article.author }}{% endif %} dans «<a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>».
+ {% if article.tags %}Mots-clés: {% for tag in article.tags %}{%if loop.index > 1%}, {%endif%}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %}</p>{% endif %}
+ </details>
diff --git a/theme/templates/navigator.html b/theme/templates/navigator.html
new file mode 100755
index 0000000..50ca559
--- /dev/null
+++ b/theme/templates/navigator.html
@@ -0,0 +1,15 @@
+{% if articles_page %}
+ <nav class="pagination">
+ {% if articles_page.has_previous() %}
+ {% if articles_page.previous_page_number() == 1 %}
+ <a href="{{ SITEURL }}/{{ page_name }}.html">&#60;&#60;</a>
+ {% else %}
+ <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">&#60;&#60;</a>
+ {% endif %}
+ {% endif %}
+ Page <b>{{ articles_page.number }}</b> sur <b>{{ articles_paginator.num_pages }}</b>
+ {% if articles_page.has_next() %}
+ <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">&#62;&#62;</a>
+ {% endif %}
+ </nav>
+{% endif%}
diff --git a/theme/templates/page.html b/theme/templates/page.html
new file mode 100755
index 0000000..4a2a9b7
--- /dev/null
+++ b/theme/templates/page.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+{% block title %}{{ page.title }}{% endblock %}
+{% block content %}
+ <h1 class="page_title"><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></h1>
+ {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">get
+ the pdf</a>{% endif %}
+ <div style="clear: both;">&nbsp;</div>
+ <section class="page_content">
+ {{ page.content }}
+ </section>
+
+{% endblock %}
diff --git a/theme/templates/tag.html b/theme/templates/tag.html
new file mode 100755
index 0000000..49ed222
--- /dev/null
+++ b/theme/templates/tag.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+{% block title %}{{ SITENAME }} - «{{ tag }}»{% endblock %}
+
+{% block content %}
+ <h2 class="page_title">Articles avec le mot-clé «{{ tag }}»</h2>
+ {% if articles %}
+ {% for article in (articles_page.object_list if articles_page else articles) %}
+ <article class="post">
+ <h2 class="title"><a href="{{ SITEURL }}/{{ article.url}}">{{ article.title }}</a></h2>
+<time class="meta" datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time>
+
+ <section class="post_content">
+ {{ article.summary }}
+ {% if not loop.last %}
+ <hr>
+ {% endif %}
+ </section>
+ </article>
+ {% endfor %}
+ {% endif %}
+ {% include 'navigator.html' %}
+
+ {% if TAG_FEED_RSS %}
+ <a href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS % tag|e}}" ><img src="../theme/images/rss.png" /></a>
+ {% endif %}
+
+ {% if TAG_FEED_ATOM %}
+ <a href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM % tag|e}}" ><img src="../theme/images/atom.png" /></a>
+ {% endif %}
+
+ {% endblock %}
diff --git a/theme/templates/tags.html b/theme/templates/tags.html
new file mode 100755
index 0000000..681e408
--- /dev/null
+++ b/theme/templates/tags.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+{% block title %}{{ SITENAME }} - Mots-clés{% endblock %}
+
+{% block content %}
+<h2 class="page_title">Liste des mots-clés</h2>
+<ul id="tag_list">
+{% for tag, articles in tags %}
+<li><a href="{{SITEURL}}/{{tag.url}}">{{ tag }}</a> ({{ articles|count }})
+</li>
+{% endfor %}
+</ul>
+{% endblock %}