-
Notifications
You must be signed in to change notification settings - Fork 4
/
blog.html
121 lines (119 loc) · 4.02 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
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
121
---
layout: search
title: Ceptr Blog
nav_title: Blog
navigation_weight: 2
permalink: /blog/
description: Ceptr News, Resources, and Reflections
---
<section class="blog">
<div class="container">
<div class="row">
<div class="col-md-8">
<div id="tag-results-container" class="hidden">
<div class="row no-gutters" style="margin-top:0px;">
<div class="col-md-12">
<h2>Posts tagged as: <span id="searched-tag"></span></h2>
</div>
</div>
<div class="row">
<div class="col-md-11">
<ul id="tag-results" style="list-style-type: none;padding:0 0 0 5px;"></ul>
</div>
</div>
</div>
<ul id="blog-posts" style="list-style-type: none;padding: 0px;" class="blog-posts">
{% for post in site.posts %}
<li>
<post-meta class="tags">
{% for tag in post.tags %}
<a href="{{ site.baseurl }}/blog?tag={{tag|url_escape}}" class="tag">{{tag}}</a>
{% endfor %}
</post-meta>
<div class="pull-left">
<post-meta class="read-time">Read Time:
{% assign words = post.content | number_of_words %}
{% if words < 360 %}
1 min
{% else %}
{{ words | divided_by: 180 }} mins
{% endif %}
</post-meta>
</div>
<div class="pull-right">
<post-meta class="author">
{% if post.author %} <a href="{{post.author_url}}">{{ post.author }}</a> • {% endif %}{% if post.meta %} • {{ post.meta }}{% endif %}</post-meta>
<post-meta class="post-date">
{{ post.date | date: "%d %B %Y" }}
</post-meta>
</div>
<h2 class="text-left section-heading">
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h2>
<div class="post-excerpt">
<p>
{{ post.excerpt }}
</p>
<p class="text-right read-more">
<a href="{{ site.baseurl }}{{ post.url }}" class="btn btn-primary btn-xl">Read More</a></p>
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="col-md-4">
<div class="row">
<div class="col-md-11 col-md-offset-1" style="border: 1px dashed #ccc;">
<div class="row no-gutters" style="margin-top:0px;">
<div class="col-md-12">
<h3>Search blog posts</h3>
</div>
</div>
<form action="{{ site.baseurl }}/blog/" method="get" class="search-form">
<div class="form-group">
<div class="row no-gutters">
<div class="col-lg-8 col-md-7">
<input type="text" id="search-box" name="query" placeholder="Search blogs" class="form-control input-lg">
</div>
<div class="col-lg-4 col-md-5">
<div class="pull-right">
<input type="submit" value="search" class="btn btn-primary btn-lg">
</div>
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-md-11">
<ul id="search-results" style="list-style-type: none;padding:0 0 0 5px;"></ul>
</div>
</div>
<script>
window.store = {
{% for post in site.posts %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"author": "{{ post.author | xml_escape }}",
"tags": {{ post.tags | jsonify }},
"content": {{ post.content | strip_html | strip_newlines | jsonify }},
"url": "{{ post.url | xml_escape }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
};
</script>
</div>
<div class="col-md-11 col-md-offset-1">
<h3>Tags:</h3>
<post-meta class="tags">
{% for tag in site.tags %}
{% assign t = tag | first %}
<a href="{{ site.baseurl }}/blog?tag={{t|url_escape}}" class="tag">{{t}}</a>
{% endfor %}
</post-meta>
</div>
</div>
</div>
</div>
</div>
</section>