forked from kannansuresh/jekyll-blog-archive-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postbox.html
29 lines (28 loc) · 1.78 KB
/
postbox.html
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
{% assign showFeaturedImage = include.showImage | default: false %}
<div class="col-lg-4 col-md-6 mb-30px card-group">
<div class="card h-100">
{% if showFeaturedImage and post.image and site.data.settings.showImagesInPostbox %}
<div class="maxthumb">
<a href="{{ site.baseurl }}{{ post.url }}">
{% if site.lazyimages == "enabled" %}
<img class="img-fluid lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ site.baseurl }}/{{ post.image }}{% endif %}" alt="{{ post.title }}">
{% else %}
<img class="img-fluid" src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ site.baseurl }}/{{ post.image }}{% endif %}" alt="{{ post.title }}">
{% endif %}
</a>
</div>
{% endif %}
<div class="card-body">
<small class="text-muted"><a href="{{ site.baseurl }}/category/{{ post.categories[0] | replace: " ","-" | replace: ".","-" | replace: "#","sharp" | downcase }}">{{ post.categories[0] }}</a></small>
<h2 class="card-title">
<a class="text-dark" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a> {% if post.rating %}
<div class="mb-2 mt-2 font-weight-normal">
{% include star_rating_postbox.html %}
</div>
{% endif %}
</h2>
<small class="text-muted">{{ post.date | date_to_string }}</small>
<h4 class="card-text mt-2">{{ post.excerpt | strip_html | truncatewords:35 }}</h4>
</div>
</div>
</div>