Changing layout of category and tags

This commit is contained in:
Holger Reinhardt 2016-01-04 21:04:16 +01:00
parent a488bb0f59
commit 2a4576bed7
2 changed files with 7 additions and 9 deletions

View file

@ -8,10 +8,6 @@ layout: default
<h1>{{page.title}}</h1> <h1>{{page.title}}</h1>
<p class='info'> <p class='info'>
<span>{{page.date | date: "%B %d, %Y" }}</span>
/
<span>by {{page.author}}</span>
{% if post.category %} {% if post.category %}
{% for site_category in site.data.categories %} {% for site_category in site.data.categories %}
{% if site_category.slug == post.category %} {% if site_category.slug == post.category %}
@ -26,7 +22,7 @@ layout: default
{% endif %} {% endif %}
{% if post.tags.size > 0 %} {% if post.tags.size > 0 %}
{% capture tags_content %} with {% if post.tags.size == 1 %}<i class="fa fa-tag"></i>{% else %}<i class="fa fa-tags"></i>{% endif %}: {% endcapture %} {% capture tags_content %} with tags: {% endcapture %}
{% for post_tag in post.tags %} {% for post_tag in post.tags %}
{% for data_tag in site.data.tags %} {% for data_tag in site.data.tags %}
{% if data_tag.slug == post_tag %} {% if data_tag.slug == post_tag %}
@ -42,7 +38,11 @@ layout: default
{% assign tags_content = '' %} {% assign tags_content = '' %}
{% endif %} {% endif %}
<p id="post-meta">Posted {{ category_content }}{{ tags_content }}</p> <span>{{page.date | date: "%B %d, %Y" }}</span>
/
<span>by {{page.author}}</span>
/
<span>Posted {{ category_content }}{{ tags_content }}</span>
</p> </p>
<hr/> <hr/>

View file

@ -3,7 +3,7 @@ layout: default
--- ---
<div class="posts"> <div class="posts">
{% for post in site.posts limit: 6 %} {% for post in site.posts %}
<article class="post"> <article class="post">
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1> <h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
@ -15,6 +15,4 @@ layout: default
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a> <a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article> </article>
{% endfor %} {% endfor %}
<a href="/blog/" class="pull-right">more <i class="fa fa-long-arrow-right"></i></a>
</div> </div>