-
Notifications
You must be signed in to change notification settings - Fork 469
/
search.html
106 lines (84 loc) · 2.58 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
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
---
layout: page
title: Search
description: "What are you looking for?"
header-img: "img/archive-bg.jpg"
permalink: /search/
---
<style type="text/css">
#search-input {
display: inline-block;
color: #008989;
background-color: #12161d;
border-color: #223333;
padding: .5em;
width: 100%;
font-size: 0.8em;
}
#search-input:focus {
display: inline-block;
color: #ddd;
background-color: #12161d;
border-color: #223333;
border-width: thick;
border-style: outset;
box-shadow: -1px 1px 5px 5px #008989;
outline: 0;
width: 100%;
font-size: 0.8em;
}
</style>
<!-- Html Elements for Search -->
<input type="text" id="search-input" placeholder="Enter keywords...">
<ul id="results-container" style="list-style-type: none;"></ul>
<!-- Script pointing to jekyll-search.js -->
<script src="{{ site.baseurl }}/js/jekyll-search.js" type="text/javascript"></script>
<script type="text/javascript">
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '{{ site.baseurl }}/search.json',
searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
noResultsText: 'No results found',
limit: 10,
fuzzy: true,
exclude: ['Welcome']
})
</script>
<br>
<div id="tags">
<h5>tag cloud</h5>
{% assign tags = site.tags | sort %}
{% for tag in tags %}
<span class="site-tag">
<a href="{{ site.baseurl }}/journal/tag/{{ tag | first | slugify }}/"
style="font-size: {{ tag | last | size | times: 4 | plus: 80 }}%">
{{ tag[0] | replace:'-', ' ' }} ({{ tag | last | size }})
</a>
</span>{% unless forloop.last %} {% endunless %}{% endfor %}
</div>
<style>
.site-tag a {
display: inline-block;
margin-right: 12px;
}
</style>
<br>
<div id="categories">
<h5>categories</h5>
{% assign categories = site.categories | sort %}
{% for category in categories %}
<span class="site-category">
<a href="{{ site.baseurl }}/journal/category/{{ category | first | slugify }}/">
{{ category[0] | replace:'-', ' ' }} ({{ category | last | size }})
</a>
</span>{% unless forloop.last %} {% endunless %}{% endfor %}
</div>
<br>
<h6>Image Source: <a href="https://unsplash.com/photos/I_LgQ8JZFGE">UNSPLASH</a>
<style>
.site-category a {
display: inline-block;
margin-right: 12px;
}
</style>