-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd041c8
commit eb959aa
Showing
1 changed file
with
19 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> | ||
{% include 'include/head.html.twig' %} | ||
<body> | ||
<body> | ||
{% include 'include/sidebar.html.twig' %} | ||
<div class="content container"> | ||
<div class="posts"> | ||
{% if not site.paginate.disabled %} | ||
{% for post in page.pagination.pages %} | ||
<div class="content container"> | ||
<div class="posts"> | ||
{% for post in site.pages|filterBy('section', 'blog')|sortByDate|slice(0, 1) %} | ||
<div class="post"> | ||
<h1 class="post-title"> | ||
<a href="{{ url(post) }}">{{ post.title }}</a> | ||
</h1> | ||
<span class="post-date">{{ post.date|date("j M Y") }}</span> | ||
{{ post.content|excerpt }} | ||
<h1 class="post-title"><a href="{{ url(post) }}">{{ post.title }}</a></h1> | ||
<span class="post-date">{{ post.date|date("j M Y") }}</span> | ||
{{ post.content|excerpt }} | ||
<footer class="readmore"> | ||
<a href="{{ url(post) }}#more">Lire la suite ›</a> | ||
</footer> | ||
</div> | ||
{% endfor %} | ||
{% else %} | ||
{% for post in site.pages|filterBy('section', 'blog')|sortByDate %} | ||
{% if post.id != 'blog/index' %} | ||
<div class="post"> | ||
<h1 class="post-title"> | ||
<a href="{{ url(post) }}">{{ post.title }}</a> | ||
</h1> | ||
<span class="post-date">{{ post.date|date("j M Y") }}</span> | ||
{{ post.content|excerpt }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
<div class="lastposts"> | ||
<h2>Recent posts</h2> | ||
<ul> | ||
{% for post in site.pages|filterBy('section', 'blog')|sortByDate|slice(0, 5) %} | ||
<li><a href="{{ url(post) }}">{{ post.title }}</a></li> | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
{% if not site.paginate.disabled %} | ||
<div class="pagination"> | ||
{% if page.pagination.prev is defined %} | ||
<a class="pagination-item newer" href="{{ url(page.pagination.prev) }}">Newer</a> | ||
{% else %} | ||
<span class="pagination-item newer">Newer</span> | ||
{% endif %} | ||
{% if page.pagination.next is defined %} | ||
<a class="pagination-item older" href="{{ url(page.pagination.next) }}">Older</a> | ||
{% else %} | ||
<span class="pagination-item older">Older</span> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</body> | ||
</body> | ||
</html> |