blob: c29622b4066888f761fe2389845386198acc7357 (
plain) (
blame)
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
|
{{ $title := .Title }}
<aside class="sidebar">
<section class="sidebar_inner">
<h2>{{ .Site.Params.name }}</h2>
<div>
{{ .Site.Params.description }}
</div>
<h2 class="mt-4">Featured Posts</h2>
<ul>
{{ range where .Site.RegularPages "Params.featured" true }}
{{- if ne $title .Title }}
<li>
<a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a>
</li>
{{- end }}
{{ end }}
</ul>
<h2 class="mt-4">Recent Posts</h2>
<ul class="flex-column">
{{ range first 8 (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.hidden" "!=" true) }}
{{- if ne $title .Title }}
<li>
<a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a>
</li>
{{- end }}
{{- end }}
</ul>
{{- $numberOfTagsLimit := $.Site.Params.numberOfTagsShown }} <!-- See config -->
{{ range $key, $value := .Site.Taxonomies }}
<div>
<h2 class="mt-4 taxonomy" id="{{ $key }}-section">{{ $key }}</h2>
<nav class="tags_nav">
{{- $slicedTags := ($value.ByCount | first $numberOfTagsLimit) }}
{{- range $slicedTags }}
<a href='{{ absURL $key }}/{{ (replace .Name "#" "%23") | urlize }}/' class=" post_tag button button_translucent">
{{ upper .Name }}
<span class='button_tally'>{{ .Count }}</span>
</a>
{{ end }}
{{ if gt (len $value.ByCount) $numberOfTagsLimit }}
<br>
<div class="post_tags_toggle button">All {{ $key }}</div>
{{- $tagsInfo := newScratch }}
<div class="post_tags">
<div class="tags_list">
{{- range $value.Alphabetical }}
{{ $tagsInfo.Add "tagsInfo" (slice .Name .Count)}}
<a href='{{ absURL $key }}/{{ (replace .Name "#" "%23") | urlize }}/' class=" post_tag button button_translucent" data-position={{ .Count }}>
{{- upper .Name -}}
<span class='button_tally'>{{ .Count }}</span>
</a>
{{ end }}
<div class="tags_sort"><span title="sort alphabetically">[A~Z]</span><span title="sort by count">[0~9]</span>
</div>
<span class="tags_hide"><svg class="icon">
<use xlink:href="#closeme"></use>
</svg></span>
</div>
</div>
{{ end }}
</nav>
</div>
{{ end }}
</section>
</aside>
|