diff options
author | Derek Severin <severinderek@gmail.com> | 2019-03-25 14:31:13 +0300 |
---|---|---|
committer | Derek Severin <severinderek@gmail.com> | 2019-03-25 14:31:13 +0300 |
commit | 3632f71bfbfd93fb20c9b795e2b97872a3e19e7e (patch) | |
tree | 10daa07729d2fe422906ea789036dfdd62ac6ea7 | |
parent | e4ea3e19f5e36642b211f9c23f6d496c1d74294b (diff) |
No tags+catagories for taxonomies & 'back' link
-rw-r--r-- | layouts/partials/pages/sidebar.html | 60 |
1 files changed, 35 insertions, 25 deletions
diff --git a/layouts/partials/pages/sidebar.html b/layouts/partials/pages/sidebar.html index f5a71e2..503f9ca 100644 --- a/layouts/partials/pages/sidebar.html +++ b/layouts/partials/pages/sidebar.html @@ -21,15 +21,23 @@ {{ "<!-- Navigation Tree -->" | safeHTML }} <div class="sidebar-tree"> - {{ with .Parent }} - <a class="parent-link" href="{{ .Permalink }}"> - {{ if not .IsHome }} - <i class="fas fa-chevron-circle-left"></i> - {{ .Title }} - {{ else }} - <i class="fas fa-home"></i> - HOME - {{ end }} + {{ if .Parent }} + {{ with .Parent }} + <a class="parent-link" href="{{ .Permalink }}"> + {{ if not .IsHome }} + <i class="fas fa-chevron-circle-left"></i> + {{ .Title }} + {{ else }} + <i class="fas fa-home"></i> + HOME + {{ end }} + </a> + {{ end }} + {{ else }} + {{/* JavaScript should be moved to common/external JS file */}} + <a href="javascript:void(0)" class="parent-link" onclick="javascript:window.history.back()"> + <i class="fas fa-chevron-circle-left"></i> + BACK </a> {{ end }} @@ -59,22 +67,24 @@ {{ end }} </div> - <br> - {{ "<!-- Categories -->" | safeHTML }} - <div> - <div class="tag-title">CATEGORIES</div> - <div class="tags"> - {{/* List categories without duplicates */}} - {{ partial "utils/list-keywords.html" (dict "type" "categories" "context" . "scratch" .Scratch "removeDuplicates" true) }} + {{ if .Parent }} + <br> + {{ "<!-- Categories -->" | safeHTML }} + <div> + <div class="tag-title">CATEGORIES</div> + <div class="tags"> + {{/* List categories without duplicates */}} + {{ partial "utils/list-keywords.html" (dict "type" "categories" "context" . "scratch" .Scratch "removeDuplicates" true) }} + </div> </div> - </div> - <br> - {{ "<!-- Tags -->" | safeHTML }} - <div> - <div class="tag-title">TAGS</div> - <div class="tags"> - {{/* List tags without duplicates */}} - {{ partial "utils/list-keywords.html" (dict "type" "tags" "context" . "scratch" .Scratch "removeDuplicates" true) }} + <br> + {{ "<!-- Tags -->" | safeHTML }} + <div> + <div class="tag-title">TAGS</div> + <div class="tags"> + {{/* List tags without duplicates */}} + {{ partial "utils/list-keywords.html" (dict "type" "tags" "context" . "scratch" .Scratch "removeDuplicates" true) }} + </div> </div> - </div> + {{ end }} </div> |