diff options
author | Alexis Metaireau <alexis@notmyidea.org> | 2012-11-20 15:31:35 -0800 |
---|---|---|
committer | Alexis Metaireau <alexis@notmyidea.org> | 2012-11-20 15:31:35 -0800 |
commit | 975a43dac221322aaf0c973e0042c9af334e804b (patch) | |
tree | 90d8ff2bb7f51f45104fa31d749f1ee05109352a /dev-random2/templates/index.html | |
parent | c3ecf17533a32561e77c023df469cab1c467ffe2 (diff) | |
parent | 958bcd6cb5e8215033d5505282e2e61b2b5ea778 (diff) | |
download | pelican-themes-975a43dac221322aaf0c973e0042c9af334e804b.tar.gz |
Merge pull request #45 from m-r-r/master
New theme
Diffstat (limited to 'dev-random2/templates/index.html')
-rw-r--r-- | dev-random2/templates/index.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/dev-random2/templates/index.html b/dev-random2/templates/index.html new file mode 100644 index 0000000..84ad5df --- /dev/null +++ b/dev-random2/templates/index.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} + +{%- block content %} + <h1 class="small-title">{% block index_title %}Tous les articles{% endblock index_title %}</h1> + + {% for article in articles_page.object_list %} + <article class="post"> + <header class="post-header"> + <h1> + <a rel="bookmark" + href="{{ SITEURL }}/{{ article.url }}" + title="Lien permanent vers «{{ article.title }}»"> + {{ article.title }} + </a> + </h1> + <div class="meta"> + {% include "includes/article_meta.html" %} + </div> + </header> + <div class="post-content"> + {{ article.summary }} + </div> + <footer class="post-footer"> + <a class="readmore" href="{{ SITEURL }}/{{ article.url }}">Lire la suite...</a> + </footer> + </article> + {% set article = False %} + {% endfor %} + + {%- if articles_page %} + <nav id="pagination"> + {%- if articles_page.has_previous() %} + <a id="first_page" href="{{ SITEURL }}/{{ page_name }}.html"><<</a> + <a id="prev_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() if articles_page.previous_page_number() != 1 else "" }}.html"><</a> + {% else %} + <!-- <span id="first_page" class="a inactive"><<</span> + <span id="first_page" class="a inactive"><</span> --> + {% endif -%} + + {%- for i in range(1,articles_paginator.num_pages+1) %} + {%- if articles_page.number - 5 < i < articles_page.number + 5 %} + {%- if i == articles_page.number %} + <span class="a active">{{loop.index}}</span> + {% else %} + <a href="{{SITEURL}}/{{ page_name }}{{ ( i if i != 1 else "" ) }}.html">{{loop.index}}</a> + {% endif -%} + {% endif -%} + {% endfor -%} + + {%- if articles_page.has_next() %} + <a id="next_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">></a> + <a id="last_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_paginator.num_pages }}.html">>></a> + {% else %} + <!-- <span id="next_page" class="a inactive">></span> + <span id="next_page" class="a inactive">>></span> --> + {% endif -%} + </nav> + {%- endif%} +{% endblock content -%} |