-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (115 loc) · 4.89 KB
/
index.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
layout: default
---
<div class="container">
{% assign post = site.posts | where: "frontpage", true | first %}
<!-- Main jumbotron for a primary marketing message or call to action -->
{% if post %}
<div class="jumbotron mt-1 p-3 p-md-5 text-white rounded bg-dark" style="background-image: url('{{ post.image }}')">
<div class="col-md-6 px-0">
<h1 class="display-4 font-italic bg-dark">{{ post.title }}</h1>
<p class="lead my-3 bg-dark">{{ post.excerpt | remove: '<p>' | remove: '</p>' }}</p>
<p class="lead mb-0 bg-dark"><a href="{{ post.url }}" class="text-white font-weight-bold">Continue reading...</a></p>
</div>
</div>
{% endif %}
{% assign featured = site.posts | where: "featured", true %}
{% if featured.size >= 2 %}
<div class="row mb-2">
{% for post in featured limit:2 %}
<div class="col-md-6">
<div class="card flex-md-row mb-4 box-shadow h-md-250">
<div class="card-body d-flex flex-column align-items-start", style="overflow-y: hidden">
<strong class="d-inline-block mb-2 text-primary">{{ post.categories[0]}}</strong>
<h3 class="mb-0">
<a class="text-dark" href="{{ post.url }}">{{ post.title | truncate: 15 }}</a>
</h3>
<div class="mb-1 text-muted">{{ post.date | date: '%b %y' }}</div>
<p class="card-text mb-auto">{{ post.excerpt | remove: '<p>' | remove: '</p>' | truncate: 130 }}</p>
<a href="{{ featured[i].url }}">Continue reading</a>
</div>
<img class="card-img-right flex-auto d-none d-md-block" alt="Article thumbnail" style="width: 200px; height: 250px;" src="{{ post.image }}">
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
<main role="main" class="container">
<div class="row">
<div class="col-md-8 blog-main">
{% for post in paginator.posts %}
<article class="blog-post">
<h2 class="blog-post-title"><a href="{{ post.url }} ">{{ post.title }}</a></h2>
{% include categories.html categories=post.categories %}
<p class="blog-post-meta">{{ post.date | date_to_string }} by <a href="/about.html">{{ post.author }}</a></p>
{{ post.content }}
</article>
{% endfor %}
{% if paginator.total_pages > 1 %}
<nav class="blog-pagination">
{% if paginator.previous_page %}
<a class="btn btn-outline-primary" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">Newer</a>
{% else %}
<span class="btn btn-outline-secondary disabled">Newer</span>
{% endif %}
{% if paginator.next_page %}
<a class="btn btn-outline-primary" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Older</a>
{% else %}
<span class="btn btn-outline-secondary disabled">Older</span>
{% endif %}
</nav>
{% endif %}
</div><!-- /.blog-main -->
<aside class="col-md-4 blog-sidebar">
<div class="p-3 mb-3 bg-light rounded">
<h4 class="font-italic">About</h4>
<p class="mb-0">{{ site.description }}</p>
</div>
{% assign postsByYearMonth = site.posts | group_by_exp:"post", "post.date | date: '%B %Y'" %}
<div class="p-3">
<h4 class="font-italic">Archives</h4>
<ol class="list-unstyled mb-0">
{% for yearMonth in postsByYearMonth %}
<li><a href="/archives.html">{{ yearMonth.name }}</a></li>
{% endfor %}
</ol>
</div>
<div class="p-3">
<h4 class="font-italic">Elsewhere</h4>
<ol class="list-unstyled">
<li><a href="https://github.com/{{ site.github_username }}">GitHub</a></li>
<li><a href="https://twitter.com/{{ site.twitter_username }}">Twitter</a></li>
<li><a href="https://www.facebook.com/paul.mesnilgrente">Facebook</a></li>
</ol>
</div>
</aside><!-- /.blog-sidebar -->
</div><!-- /.row -->
</main>
{% comment %}
<main class="container" role="main">
<h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2>
{% if site.posts.size > 0 %}
<!-- Example row of columns -->
<div class="row">
{% for post in site.posts %}
<div class="col-md-4">
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
<span class="post-meta">{{ post.date | date: date_format }}</span>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{% if site.show_excerpts %}
<p>{{ post.excerpt }}</p>
{% endif %}
<p><a class="btn btn-secondary" href="{{ post.url | relative_url }}" role="button">View more »</a></p>
</div>
{% endfor %}
</div>
{% else %}
<h3>No articles yet.</h3>
{% endif %}
</main>
{% endcomment %}