diff options
author | Matt <kendoran@gmail.com> | 2019-01-15 11:28:45 +0300 |
---|---|---|
committer | Matt <kendoran@gmail.com> | 2019-01-15 12:06:34 +0300 |
commit | 1d65cb7262ad3d919a1aee6d18b80d26c1ffb446 (patch) | |
tree | 8907c18e2996bb974d892067d14c9613c579f39e | |
parent | 0bcdf0a16dd768b054adc752cbd368a3b9aa7d61 (diff) |
simplified sidebar
-rw-r--r-- | layouts/_default/list.html | 4 | ||||
-rw-r--r-- | layouts/partials/sidebar-about-me.html | 5 | ||||
-rw-r--r-- | layouts/partials/sidebar-no-about.html | 23 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 12 |
4 files changed, 10 insertions, 34 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8883086..7eb6a73 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -93,11 +93,7 @@ {{ template "_internal/pagination.html" . }} </div> </div> - {{ if .IsHome }} - {{ partial "sidebar-no-about" . }} - {{ else }} {{ partial "sidebar" . }} - {{ end }} {{ end }} diff --git a/layouts/partials/sidebar-about-me.html b/layouts/partials/sidebar-about-me.html deleted file mode 100644 index 957d790..0000000 --- a/layouts/partials/sidebar-about-me.html +++ /dev/null @@ -1,5 +0,0 @@ -<h2>{{ .Site.Params.Author }}</h2> -<div> - {{ .Site.Params.IntroDescription }} -</div> -<a href='{{ "about/" | absURL }}' class="btn btn-outline-secondary mt-3" role="button">Read More...</a>
\ No newline at end of file diff --git a/layouts/partials/sidebar-no-about.html b/layouts/partials/sidebar-no-about.html deleted file mode 100644 index 3e911cd..0000000 --- a/layouts/partials/sidebar-no-about.html +++ /dev/null @@ -1,23 +0,0 @@ -<div class="sidebar d-print-none d-none d-xl-block"> - <h2>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 diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index a3d3683..6c86850 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,6 +1,14 @@ <div class="sidebar d-print-none d-none d-xl-block"> - {{ partial "sidebar-about-me" . }} - <h2 class="mt-4">Top Posts</h2> + {{ if .IsHome }} + <h2>Top Posts</h2> + {{ else }} + <h2>{{ .Site.Params.Author }}</h2> + <div> + {{ .Site.Params.IntroDescription }} + </div> + <a href='{{ "about/" | absURL }}' class="btn btn-outline-secondary mt-3" role="button">Read More...</a> + <h2 class="mt-4">Top Posts</h2> + {{ end }} {{ range .Site.Taxonomies.tags.featured }} <a href="{{ .Permalink }}" class="nav-link">{{ .Title }}</a> {{ end }} |