Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mattbutton/silhouette-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/sidebar.html')
-rw-r--r--layouts/partials/sidebar.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
new file mode 100644
index 0000000..a3d3683
--- /dev/null
+++ b/layouts/partials/sidebar.html
@@ -0,0 +1,24 @@
+<div class="sidebar d-print-none d-none d-xl-block">
+ {{ partial "sidebar-about-me" . }}
+ <h2 class="mt-4">Top Posts</h2>
+ {{ range .Site.Taxonomies.tags.featured }}
+ <a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a>
+ {{ end }}
+ <h2 class="mt-4">Recent Posts</h2>
+ <nav class="nav flex-column">
+ {{ range first 8 .Site.Pages }}{{ if (eq .Section "post") }}
+ <a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a>
+ {{ end }}{{ end }}
+ </nav>
+ {{ range $key, $value := .Site.Taxonomies }}
+ <h2 class="mt-4 text-capitalize">{{ $key }}</h2>
+ <nav class="nav flex-column">
+ {{ range first 10 $value.ByCount }}
+ <a href='{{ $.Site.BaseURL}}{{ $key }}/{{ (replace .Name "#" "%23") | urlize }}/' class="nav-link">
+ {{ .Name }}
+ <span class="badge badge-pill badge-secondary">{{ .Count }}</span>
+ </a>
+ {{ end }}
+ </nav>
+ {{ end }}
+</div> \ No newline at end of file