-
Notifications
You must be signed in to change notification settings - Fork 1
/
blog.html
47 lines (45 loc) · 1.49 KB
/
blog.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: My blog
layout: default
permalink: /blog/
keywords: trm, therandommelon blog, therandommelon
description: My thoughts put into a blog that no one cares about.
desc: My thoughts put into a blog that no one cares about.
---
<div class="m-4">
<h2 class="mb-4 text-center">Latest posts</h2>
{% for post in site.posts limit:5 %}
<div class="homepage-card">
<div class="card mb-3 clearfix">
<div class="card-body">
<div class="float-left">
{% if post.badge-text %}
<h4 class="card-title"><span class="badge badge-danger">{{ post.badge-text }}</span> {{ post.title }}</h4>
{% else %}
<h4 class="card-title">{{ post.title }}</h4>
{% endif %}
{% if post.via %}
<p class="card-text">
{{ post.desc }}<br>
<span class="text-muted">Posted on {{ post.date | date: '%B %d, %Y' }} on {{ post.via }}</span>
</p>
{% else %}
<p class="card-text">
{{ post.desc }}<br>
<span class="text-muted">Posted on {{ post.date | date: '%B %d, %Y' }}</span>
</p>
{% endif %}
</div>
{% if post.via %}
<a href="{{ post.via-link }}" class="btn btn-primary btn-blog-home">Read this post on {{ post.via }}</a>
{% else %}
<a href="{{ post.url }}" class="btn btn-primary btn-blog-home">Read this post</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
<br>
<h2 class="mb-4 mt-4">Want more posts?</h2>
<a href="/posts" class="btn btn-primary text-center">See all posts</a>
</div>