forked from StartBootstrap/startbootstrap-clean-blog-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
45 lines (39 loc) · 1.12 KB
/
search.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
---
layout: page
title: "Search"
description: "through past articles"
background: /img/headers/dino_park.jpg
---
<div id="google-custom-search">
<script>
(function() {
var cx = '014787142624113834316:lmyefqjkzq8';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:search></gcse:search>
</div>
<style>
ul li time {
display: inline-block;
font-family: "Monaco", "Courier", monospace;
font-size: 12px;
padding-right: 10px
}
</style>
{% for post in site.posts %}
{% assign currentdate = post.date | date: "%Y" %}
{% if currentdate != date %}
{% unless forloop.first %}</ul>{% endunless %}
<h2 id="y{{post.date | date: "%Y"}}">{{ currentdate }}</h2>
<ul>
{% assign date = currentdate %}
{% endif %}
<li><time>{{ post.date | date:"%b %d" }} - </time><a href="{{ post.url }}">{{ post.title }}</a></li>
{% if forloop.last %}</ul>{% endif %}
{% endfor %}