diff options
Diffstat (limited to 'bricabrac/templates')
-rw-r--r-- | bricabrac/templates/archives.html | 16 | ||||
-rw-r--r-- | bricabrac/templates/article.html | 15 | ||||
-rw-r--r-- | bricabrac/templates/author.html | 2 | ||||
-rw-r--r-- | bricabrac/templates/base.html | 47 | ||||
-rw-r--r-- | bricabrac/templates/categories.html | 15 | ||||
-rw-r--r-- | bricabrac/templates/index.html | 32 | ||||
-rw-r--r-- | bricabrac/templates/page.html | 13 | ||||
-rw-r--r-- | bricabrac/templates/pagination.html | 15 | ||||
-rw-r--r-- | bricabrac/templates/taglist.html | 2 | ||||
-rw-r--r-- | bricabrac/templates/tags.html | 16 | ||||
-rw-r--r-- | bricabrac/templates/translations.html | 6 |
11 files changed, 179 insertions, 0 deletions
diff --git a/bricabrac/templates/archives.html b/bricabrac/templates/archives.html new file mode 100644 index 0000000..2f424f8 --- /dev/null +++ b/bricabrac/templates/archives.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block content %} +<header> +<h1> +<a href="{{ SITEURL }}" id="site-title">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a> : +<a href="{{ SITEURL }}/archives.html" id="page-title">archives</a></h1> +</header> +<section id="content" class="body"> +<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/bricabrac/templates/article.html b/bricabrac/templates/article.html new file mode 100644 index 0000000..61d4a45 --- /dev/null +++ b/bricabrac/templates/article.html @@ -0,0 +1,15 @@ +{%- if article.lang %}{% set DEFAULT_LANG = article.lang %}{% endif -%} +{% extends "base.html" %} +{% block title %}{{ super() }} : {{ article.title }}{% endblock %} +{% block content %} +<header> +<h1> +<a href="{{ SITEURL }}" id="site-title">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a> : +<a href="{{ SITEURL }}/{{ article.url }}" id="page-title">{{ article.title }}</a></h1> +{% if not HIDE_DATE %}<time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>{% endif %} +</header> +<article> +<div class="meta" style="text-align:right;">{% if article.translations %}{% for translation in article.translations %}{{ article.lang or DEFAULT_LANG }} | <a href="{{ SITEURL }}/{{ translation.url }}"><u>{{ translation.lang }}</u></a>{% endfor %}{% endif %}</div> +{{ article.content }} +</article> +{% endblock %} diff --git a/bricabrac/templates/author.html b/bricabrac/templates/author.html new file mode 100644 index 0000000..0b37290 --- /dev/null +++ b/bricabrac/templates/author.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ author }}{% endblock %} diff --git a/bricabrac/templates/base.html b/bricabrac/templates/base.html new file mode 100644 index 0000000..03b0099 --- /dev/null +++ b/bricabrac/templates/base.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html lang="fr"> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1" /> +<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" /> +<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} ATOM Feed" /> +<link rel="icon" type="image/png" href="{{ SITEURL }}/theme/fav.png" /> +<title>{% block title %}{{ SITENAME }} {%endblock%}</title> +<!--[if IE]> +<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> +<!--[if lte IE 7]> +<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie.css"/> +<script src="{{ SITEURL }}/js/IE8.js" type="text/javascript"></script><![endif]--> +<!--[if lt IE 7]> +<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie6.css"/><![endif]--> +</head> +<body> +<div id="conteneur"> +{% block content %} +{% endblock %} +<footer> +<nav> +<ul> +<li><a href="https://blog.getpelican.com/">Pelican</a> & <a href="https://github.com/Bricabraque/bricabrac-pelican-theme">bricabrac</a></li> +{% for page in pages %} +<li> :: <a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a>{% if not loop.last %}{% endif %}</li> +{% endfor %} +<li> :: <a href="{{ SITEURL }}/archives.html">archives</a></li> +{% if categories|length > 1 %} +<li> :: <a href="{{ SITEURL }}/categories.html">catégories</a></li> +{% endif %} +{% if tags|length > 1 %} +<li> :: <a href="{{ SITEURL }}/tags.html">tags</a></li> +{% endif %} +<li> :: <a href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}">atom</a></li> +{% if SOCIAL %} +{% for name, link in SOCIAL %} +<li> :: <a href="{{ link }}">{{ name }}</a></li> +{% endfor %} +{% endif %} +</ul> +</nav> +</footer> +</div> +</body> +</html> diff --git a/bricabrac/templates/categories.html b/bricabrac/templates/categories.html new file mode 100644 index 0000000..380bddc --- /dev/null +++ b/bricabrac/templates/categories.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block content %} +<header> +<h1> +<a href="{{ SITEURL }}" id="site-title">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a> : +<a href="{{ SITEURL }}/archives.html" id="page-title">catégories</a></h1> +</header> +<section id="content" class="body"> +<ul> +{% for category, articles in categories %} + <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li> +{% endfor %} +</ul> +</section> +{% endblock %} diff --git a/bricabrac/templates/index.html b/bricabrac/templates/index.html new file mode 100644 index 0000000..6797900 --- /dev/null +++ b/bricabrac/templates/index.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block content %} +{% if articles %} + {% for article in articles %} + + {# First item #} +{% if loop.first %} +<header> +<h1><a href="{{ SITEURL }}" id="site-title">{{ SITENAME }} {% if SITEDESCRIPTION %} <strong>{{ SITEDESCRIPTION }}</strong>{% endif %}</a> : <a href="{{ SITEURL }}/{{ article.url }}" id="page-title">{{ article.title }}</a></h1> +{% if not HIDE_DATE %}<time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>{% endif %} +</header> +<article> +{{ article.summary }} +<p><a href="{{ SITEURL }}/{{ article.url }}" id="page-title"><u>lire la suite</u></a></p> +</article> + {% if loop.length > 1 %} +<section id="article-list"> +<h2>Tous les articles</h2> +<ol> + {% endif %} + {# other items #} + {% else %} +<li><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalien vers {{ article.title|striptags }}">{{ article.title }}</a></li> + {% endif %} +{% endfor %} + </ol> + </section><!-- #article-list --> +{% else %} + No posts found. +{% endif %} +{% endblock content %} diff --git a/bricabrac/templates/page.html b/bricabrac/templates/page.html new file mode 100644 index 0000000..4509e10 --- /dev/null +++ b/bricabrac/templates/page.html @@ -0,0 +1,13 @@ +{%- if page.lang %}{% set DEFAULT_LANG = page.lang %}{% endif -%} +{% extends "base.html" %} +{% block title %}{{ super() }} : {{ page.title }}{% endblock %} +{% block content %} +<header> +<h1><a href="{{ SITEURL }}" id="site-title">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a> : +<a href="{{ SITEURL }}/{{ page.url }}" id="page-title">{{ page.title }}</a></h1> +</header> +<article> +<div class="meta" style="text-align:right;">{% if page.translations %}{% for translation in page.translations %}{{ page.lang or DEFAULT_LANG }} | <a href="{{ SITEURL }}/{{ translation.url }}"><u>{{ translation.lang }}</u></a>{% endfor %}{% endif %}</div> +{{ page.content }} +</article> +{% endblock %} diff --git a/bricabrac/templates/pagination.html b/bricabrac/templates/pagination.html new file mode 100644 index 0000000..839a6d0 --- /dev/null +++ b/bricabrac/templates/pagination.html @@ -0,0 +1,15 @@ +{% if DEFAULT_PAGINATION %} +<p class="paginator"> +{% if articles_page.has_previous() %} +{% if articles_page.previous_page_number() == 1 %} +<a href="{{ SITEURL }}/{{ page_name }}.html">«</a> +{% else %} +<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">«</a> +{% endif %} +{% endif %} +Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} +{% if articles_page.has_next() %} +<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">»</a> +{% endif %} +</p> +{% endif %}
\ No newline at end of file diff --git a/bricabrac/templates/taglist.html b/bricabrac/templates/taglist.html new file mode 100644 index 0000000..4c783e8 --- /dev/null +++ b/bricabrac/templates/taglist.html @@ -0,0 +1,2 @@ +{% if article.tags %}<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %}</p>{% endif %} +{% if PDF_PROCESSOR %}<p><a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">exporter en pdf</a></p>{% endif %} diff --git a/bricabrac/templates/tags.html b/bricabrac/templates/tags.html new file mode 100644 index 0000000..11a8862 --- /dev/null +++ b/bricabrac/templates/tags.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block content %} +<header> +<h1> +<a href="{{ SITEURL }}" id="site-title">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a> : +<a href="{{ SITEURL }}/archives.html" id="page-title">tags</a></h1> +</header> +<section id="content" class="body"> +<ul> +{% for tag, articles in tags %} + <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li> +{% endfor %} +</ul> +</section> +{% endblock %} + diff --git a/bricabrac/templates/translations.html b/bricabrac/templates/translations.html new file mode 100644 index 0000000..0079883 --- /dev/null +++ b/bricabrac/templates/translations.html @@ -0,0 +1,6 @@ +{% if article.translations %} +Translations: + {% for translation in article.translations %} + <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> + {% endfor %} +{% endif %} |