Add icon to link post heading in indexes

This commit is contained in:
Michael Rose
2014-03-26 16:13:24 -04:00
parent bcf509c352
commit 70d3af0bf4
8 changed files with 33 additions and 27 deletions

View File

@ -35,11 +35,15 @@
</div>
<div id="index">
<h3><a href="{{ site.url}}/articles/">Articles</a></h3>
<h3><a href="{{ site.url}}/articles/">Recent Posts</a></h3>
{% for post in site.posts limit:5 %}
<article>
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
{% if post.link %}
<h2><a href="{{ post.link }}" target="_blank" title="{{ post.title }}">{{ post.title }} <i class="icon-link"></i></a></h2>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>
{% endif %}
</article>
{% endfor %}
</div><!-- /#index -->

View File

@ -48,9 +48,7 @@
{% endunless %}
<article>
{% if post.link %}
<h4><a href="{{ post.link }}" target="_blank" title="{{ post.title }}">{{ post.title }}</a></h4>
<p><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.date | date: "%B %d %H:%M %Z"}}</p>
<p>{{ post.content }}</p>
<h2><a href="{{ post.link }}" target="_blank" title="{{ post.title }}">{{ post.title }} <i class="icon-link"></i></a></h2>
{% else %}
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}</p>