Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit45036f7f9930e65d96f9ba36c5153684ac8618e6 (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-18 15:43:58 +0300
Committer
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-08-18 15:43:58 +0300
Files8944f32a5a9205c6be7898281d660a80b260c9d1
IPL-45036f7f9930e65d96f9ba36c5153684ac8618e6.tar
IPL-45036f7f9930e65d96f9ba36c5153684ac8618e6.tar.gz
IPL-45036f7f9930e65d96f9ba36c5153684ac8618e6.zip
Parentcf7cf134282623fb1f274ef28f271a1a9329d11e (diff)
Fix sidebar to include site description instead of author
1 files changed, 66 insertions, 0 deletions
-rw-r--r--website/layouts/partials/sidebar.html66
diff --git a/website/layouts/partials/sidebar.html b/website/layouts/partials/sidebar.html
new file mode 100644
index 0000000..738a20c
--- /dev/null
+++ b/website/layouts/partials/sidebar.html
@@ -0,0 +1,66 @@
+{{ $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">
+ {{- $onPageTags := $.Page.Params.tags }}
+ {{- $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>