-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathblog.html
More file actions
30 lines (29 loc) · 1.01 KB
/
blog.html
File metadata and controls
30 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
layout: page
title: "Blog"
permalink: /blog/
img: /assets/img/panel.jpg
---
<div class="section">
<div class="row">
{%- for post in site.posts -%}
{% assign loopindex = forloop.index | modulo: 3 %}
{%- capture post_class -%}{% if loopindex == 0 %}12{%- else -%}6{%- endif -%}{%- endcapture -%}
{%- assign img_path = "/assets/img/bg9.jpg" -%}{%- if post.img -%}{% assign img_path = post.img %}{%- endif -%}
<div class="col-md-{{ post_class }}">
<div class="card card-raised card-background" style="background-image: url('{{ img_path }}')">
<div class="card-body">
<h6 class="card-category text-info">{{ post.date | date_to_string }}</h6>
<a href="#{{ post.id | slugify }}">
<h3 class="card-title">{{ post.title }}</h3>
</a>
<p class="card-description">{{ post.excerpt | strip_html }}</p>
<a href="{{ post.url }}" class="btn btn-success btn-round">
<i class="material-icons">format_align_left</i> Read Post
</a>
</div>
</div>
</div>
{%- endfor -%}
</div>
</div>