Sort articles by date. A bit more templates. Add an author field.

--HG--
rename : pelican/templates/archives.html => pelican/themes/archives.html
rename : pelican/templates/article.html => pelican/themes/article.html
rename : pelican/templates/categories.html => pelican/themes/categories.html
rename : pelican/templates/category.html => pelican/themes/category.html
rename : pelican/templates/index.html => pelican/themes/index.html
rename : pelican/templates/tag.html => pelican/themes/tag.html
rename : pelican/templates/tags.html => pelican/themes/tags.html
This commit is contained in:
Alexis Metaireau 2010-08-17 20:28:51 +02:00
commit 3634e5c49d
20 changed files with 123 additions and 30 deletions

View file

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block content %}
<h1>Archives for {{ blogname }}</h1>
<dl>
{% for date, articles in dates %}
{% for article in articles %}
<dt>{{ date }}</dt>
<dd><a href='{{ article.url }}'>{{ article.title }}</a></dd>
{% endfor %}
{% endfor %}
</dl>
{% endblock %}

View file

@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block content %}
<section id="content" class="body">
<header> <h2 class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="{{ article.date.isoformat() }}">
{{ article.date.strftime('%Y-%m-%d %H:%M') }}
</abbr>
{% if article.author %}
<address class="vcard author">
By <a class="url fn" href="#">{{ article.author }}</a>
</address>
{% endif %}
</footer><!-- /.post-info -->
<div class="entry-content">
{{ article.content }}
</div><!-- /.entry-content -->
</section>
{% endblock %}

View file

View file

17
pelican/themes/index.html Normal file
View file

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block content %}
<section id="content">
<ol id="post-list">
{% for article in articles %}
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="{{ article.date.isoformat() }}"> {{ article.date.strftime('%Y-%m-%d %H:%M') }} </abbr>
{% if article.author %}<address class="vcard author">By <a class="url fn" href="#">{{ article.author }}</a></address>{% endif %}
</footer><!-- /.post-info -->
<div class="entry-content"> {{ article.summary }} </div><!-- /.entry-content -->
</article></li>
{% endfor %}
</ol><!-- /#posts-list -->
</section><!-- /#content -->
{% endblock content %}

0
pelican/themes/tag.html Normal file
View file

0
pelican/themes/tags.html Normal file
View file