mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
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:
parent
9351152152
commit
3634e5c49d
20 changed files with 123 additions and 30 deletions
13
pelican/themes/archives.html
Normal file
13
pelican/themes/archives.html
Normal 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 %}
|
||||
19
pelican/themes/article.html
Normal file
19
pelican/themes/article.html
Normal 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 %}
|
||||
0
pelican/themes/categories.html
Normal file
0
pelican/themes/categories.html
Normal file
0
pelican/themes/category.html
Normal file
0
pelican/themes/category.html
Normal file
17
pelican/themes/index.html
Normal file
17
pelican/themes/index.html
Normal 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
0
pelican/themes/tag.html
Normal file
0
pelican/themes/tags.html
Normal file
0
pelican/themes/tags.html
Normal file
Loading…
Add table
Add a link
Reference in a new issue