1
0
Fork 0

Import of the new theme

This commit is contained in:
Luca Beltrame 2015-05-07 07:32:01 +02:00
parent 04104f0bff
commit 0693a85c3f
331 changed files with 21077 additions and 8782 deletions

53
_includes/list-posts.html Normal file
View file

@ -0,0 +1,53 @@
{% comment %}
*
* Possible parameter for this loop:
*
* entries
* offset
* category
* tag
*
* Example for Category: {% include list-posts.html entries='3' offset='1' category='design' %}
*
* Example for Tag: {% include list-posts.html entries='5' tag='terminal' %}
*
*
* This loop works like this:
*
* 1. First we check if there was given a category for filtering if include.categories == NULL
* 2. If no category is given for filtering do a general loop.
* 3. If a category/tag was given, assign category/tag to the variable category/tag assign category = include.categories
*
{% endcomment %}
{% assign category = include.category %}
{% assign tag = include.tag %}
<ul class="side-nav">
{% if category == NULL and tag == NULL %}
{% for post in site.posts limit:include.entries offset:include.offset %}
<li><a href="{{ site.url }}{{ post.url }}">{% if post.subheadline %}{{ post.subheadline }} &middot; {% endif %}<strong>{{ post.title }}</strong></a></li>
{% endfor %}
<li class="text-right"><a href="{{ site.url }}{{ site.blog_root }}archive/"><strong>{{ site.data.language.more }}</strong></a></li>
{% elsif category %}
{% for post in site.categories.[category] limit:include.entries offset:include.offset %}
<li><a href="{{ site.url }}{{ post.url }}">{% if post.subheadline %}{{ post.subheadline }} &middot; {% endif %}<strong>{{ post.title }}</strong></a></li>
{% endfor %}
<li class="text-right"><a href="{{ site.url }}{{ site.blog_root }}archive/"><strong>{{ site.data.language.more }}</strong></a></li>
{% elsif tag %}
{% for post in site.tags.[tag] limit:include.entries %}
<li><a href="{{ site.url }}{{ post.url }}">{% if post.subheadline %}{{ post.subheadline }} &middot; {% endif %}<strong>{{ post.title }}</strong></a></li>
{% endfor %}
{% endif %}
</ul>