/
filtertags.html
52 lines (50 loc) · 2 KB
/
filtertags.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
---
title: Tag Search
layout: default
search_omit: true
---
{% capture tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
{% assign sortedtags = tags | split:',' | sort %}
<center>
<div id="s-tag-button" class='s-tags-toggle' style="font-size:15px">Show Tags</div>
<div id="s-tags-div">
<!-- <button id="goog-wm-sb" class="search-tags" value='{{tag}}' >{{ tag }}</button> -->
{% for tag in sortedtags %}
<button style="margin:2px;" id="s-tag-button" class="search-tags" onclick="tagClick('{{tag}}')" >{{ tag }}</button>
{% endfor %}
</div>
<!-- Search form -->
<form method="get" action="/filtertags" class="search-wrapper cf">
<input type="text" name="q" id="search" placeholder="e.g. read" autocomplete="off" />
<button type="submit">Search</button>
<span class="nav-hint-mob" > Hit Ctrl+← to delete whole word </span>
</form>
<!-- Search results placeholder -->
<section>
<ul>
<div id="search-results">
<h2 style="background:#ad141e;border-radius: 20px;margin-bottom: 56px;color: white;" class="post_title">Found {{ site.posts | size }} result(s)</h2>
{% for post in site.posts %}
<li style="padding-top: 1rem;" class="s-post-list">
<section><a style="float:left;font-size:1.1rem" class="title" href="{{ post.url }}">{{ post.title }}</a><div style="float:right;display:inline-block;">
{% for tag in post.tags %}
<a class="tags" style="float:right" href="/tag/{{ tag }}">{{ tag }}</a>
{% endfor %}
</div></section></li>
{% endfor %}
</div>
</ul>
</section>
</center>
<script>
loadJquery();
function loadJquery() {
if( window.$ ) {
checkloadjscssfile("/assets/js/lunr-tags.js","js");
} else {
window.setTimeout( loadJquery, 50 );
}
};
</script>
<noscript><META HTTP-EQUIV="Refresh" CONTENT="0;URL=nojs"></noscript>
<!--<script src="/js/lunr-tags.js" defer></script> -->