enableListSidebarTitles added

This commit is contained in:
zzossig 2020-01-18 22:38:55 +09:00
parent f03148857f
commit 510f4407ab
4 changed files with 17 additions and 14 deletions

View File

@ -263,6 +263,7 @@ enableSidebar = true # Set to false to create the full width of the content.
enableSidebarTags = true # if you want to use tags. enableSidebarTags = true # if you want to use tags.
enableSidebarSeries = true enableSidebarSeries = true
enableSidebarCategories = true enableSidebarCategories = true
enableListSidebarTitles = true
enableToc = true # single page table of contents, you can replace this param to toc(toc = true) enableToc = true # single page table of contents, you can replace this param to toc(toc = true)
hideToc = false # Hide or Show toc hideToc = false # Hide or Show toc
enableTocSwitch = true # single page table of contents visibility switch enableTocSwitch = true # single page table of contents visibility switch

View File

@ -254,9 +254,11 @@ link = "https://github.com/zzossig/hugo-theme-zzo"
# sidebar # sidebar
enableBio = true # home page sidebar enableBio = true # home page sidebar
enableSidebar = true # Set to false to create the full width of the content. enableSidebar = true # Set to false to create the full width of the content.
enableSidebarTitles = true
enableSidebarTags = true # if you want to use tags. enableSidebarTags = true # if you want to use tags.
enableSidebarSeries = true enableSidebarSeries = true
enableSidebarCategories = true enableSidebarCategories = true
enableListSidebarTitles = true
enableToc = true # single page table of contents, you can replace this param to toc(toc = true) enableToc = true # single page table of contents, you can replace this param to toc(toc = true)
hideToc = false # Hide or Show toc hideToc = false # Hide or Show toc
enableTocSwitch = true # single page table of contents visibility switch enableTocSwitch = true # single page table of contents visibility switch

View File

@ -40,6 +40,7 @@ enableSidebar = true
enableSidebarTags = true enableSidebarTags = true
enableSidebarSeries = true enableSidebarSeries = true
enableSidebarCategories = true enableSidebarCategories = true
enableListSidebarTitles = true
enableToc = true enableToc = true
hideToc = false hideToc = false
enableTocSwitch = true enableTocSwitch = true

View File

@ -3,22 +3,21 @@
<div class="sidebar"> <div class="sidebar">
{{ partial "search/site-search" . }} {{ partial "search/site-search" . }}
{{ partial "sidebar/custom-list" . }} {{ partial "sidebar/custom-list" . }}
{{ if .Site.Params.itemsPerCategory }} {{ if and .Site.Params.itemsPerCategory .Site.Params.enableListSidebarTitles }}
{{ range first .Site.Params.itemsPerCategory .Pages }} {{ range first .Site.Params.itemsPerCategory .Pages }}
<section class="sidebar-recent"> <section class="sidebar-recent">
<a href="{{ .RelPermalink }}" class="sidebar-recent__title p1">{{ .Title }}</a> <a href="{{ .RelPermalink }}" class="sidebar-recent__title p1">{{ .Title }}</a>
<ul class="sidebar-recent__ul"> <ul class="sidebar-recent__ul">
{{ range first .Site.Params.itemsPerCategory .Pages }} {{ range first .Site.Params.itemsPerCategory .Pages }}
<li><a href="{{ .RelPermalink }}" class="sidebar-recent__a p2">{{ .Title }}</a> <li><a href="{{ .RelPermalink }}" class="sidebar-recent__a p2">{{ .Title }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
</section> </section>
{{ end }} {{ end }}
<hr class="hr-fade sidebar-hr" />
{{ end }} {{ end }}
</div> </div>
<hr class="hr-fade sidebar-hr" />
<div class="taxo-root"> <div class="taxo-root">
{{ partial "taxonomy/taxonomy-tags" . }} {{ partial "taxonomy/taxonomy-tags" . }}
{{ partial "taxonomy/taxonomy-categories" . }} {{ partial "taxonomy/taxonomy-categories" . }}