Skip to content

Commit bdd0a6a

Browse files
author
Rodrigo Techera
committed
integrating post nav as a module
1 parent 56ef16c commit bdd0a6a

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

_includes/blog_post_nav.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="vertical-blog-container">
2+
<div class="col-md-4">
3+
<p class="blog-date">{{ post.date | date: '%B %d, %Y' }}</p>
4+
<h4>
5+
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
6+
</h4>
7+
<p>{{ post.excerpt | remove: '<p>' | remove: '</p>' | truncate: 500}}</p>
8+
<img src="{{ post.image }}" class="img-fluid">
9+
</div>
10+
<a href="{{ site.baseurl }}{{ post.url }}" class="btn btn-lg with-right-arrow">
11+
Read More
12+
</a>
13+
</div>

_includes/blog_tags_filter.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
{% for tag in site.tags %}
5757
<div class="blog-tag-container" data-tag="{{ tag[0] }}">
5858
{% for post in tag[1] %}
59-
{{ post }}
59+
60+
{% include blog_post_nav.html %}
61+
6062
{% endfor %}
6163
</div>
6264
{% endfor %}

_layouts/blog.html

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,9 @@ <h1 class="blog-index-title">
3939
<div class="container">
4040
<div class="row blog-vertical">
4141
{% for post in posts %}
42-
<div class="vertical-blog-container">
43-
<div class="col-md-4">
44-
<p class="blog-date">{{ post.date | date: '%B %d, %Y' }}</p>
45-
<h4>
46-
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
47-
</h4>
48-
<p>{{ post.excerpt | remove: '<p>' | remove: '</p>' | truncate: 500}}</p>
49-
<img src="{{ post.image }}" class="img-fluid">
50-
</div>
51-
<a href="{{ site.baseurl }}{{ post.url }}" class="btn btn-lg with-right-arrow">
52-
Read More
53-
</a>
54-
</div>
42+
43+
{% include blog_post_nav.html %}
44+
5545
{% endfor %}
5646
</div>
5747

0 commit comments

Comments
 (0)