Added category page

This commit is contained in:
Asutosh Palai
2016-06-19 18:58:51 +05:30
parent cbece234c8
commit 1807e27097
9 changed files with 86 additions and 8 deletions

28
_layouts/category.html Normal file
View File

@ -0,0 +1,28 @@
---
layout: layout
no_header: true
---
{% include cat_header.html %}
<div class="category-posts container">
{% for post in site.categories[page.category] %}
<div class="category-post row">
{% if post.image != nil %}
<div class="col-sm-3 center-fill-container img-container">
<img src="/images/posts/{{post.image}}" alt="" class="img-center-fill {% if post.image == null %}hidden{% endif %}">
</div>
<div class="col-sm-9 details">
<h3 class="title">{{ post.title}}</h3>
<p class="tag">{{ post.excerpt }}</p>
</div>
{% else %}
<div class="col-sm-12 details">
<h3 class="title">{{ post.title}}</h3>
<p class="tag">{{ post.excerpt }}</p>
</div>
{% endif %}
</div>
{% endfor %}
</div>

View File

@ -7,7 +7,9 @@
{% include navbar.html %}
{% include header.html %}
{% if page.no_header %}
{% include header.html %}
{% endif %}
{{ content }}