Created
June 18, 2014 23:57
-
-
Save frankV/6822988cb886ef004488 to your computer and use it in GitHub Desktop.
PelicanArticleLoopHack
This file contains hidden or 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
<section class="wrapper style1 container special"> | |
<div class="row"> | |
<h2 class="space-above">Latest Posts</h2> | |
</div> | |
<div class="row"> | |
{% for article in all_articles %} | |
{% if loop.index < 4 %} | |
<div class="4u"> | |
<section> | |
<span class="icon feature fa-{{ article.icon }}"></span> | |
<header> | |
<a href="/{{ article.url }}" rel='bookmark'><h3>{{ article.title }}</h3></a> | |
</header> | |
<p>{{ article.content[:196]|striptags }}...</p> | |
<footer> | |
<ul class="buttons"> | |
<li><a href="/{{ article.url }}" class="button small">Read More</a></li> | |
</ul> | |
</footer> | |
</section> | |
</div> | |
{% else %} | |
{% endif %} | |
{% endfor %} | |
</div> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment