more sidebar options
notAllowedTypesInHomeSidebar enableHomeSidebarTitles
This commit is contained in:
parent
510f4407ab
commit
6d9ab52197
|
@ -228,6 +228,7 @@ useFaviconGenerator = false # https://www.favicon-generator.org/
|
||||||
|
|
||||||
themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"] # select options for site color theme
|
themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"] # select options for site color theme
|
||||||
notAllowedTypesInHome = ["contact", "talks", "about"] # not allowed page types in home page. type can be set in front matter or default to folder name.
|
notAllowedTypesInHome = ["contact", "talks", "about"] # not allowed page types in home page. type can be set in front matter or default to folder name.
|
||||||
|
notAllowedTypesInHomeSidebar = ["about", "archive"] # not allowed page types in home page sidebar(recent post titles).
|
||||||
|
|
||||||
# header
|
# header
|
||||||
homeHeaderType = "text" # text, img, slide
|
homeHeaderType = "text" # text, img, slide
|
||||||
|
@ -263,6 +264,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
|
||||||
|
enableHomeSidebarTitles = true
|
||||||
enableListSidebarTitles = 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
|
||||||
|
|
|
@ -222,6 +222,7 @@ useFaviconGenerator = false # https://www.favicon-generator.org/
|
||||||
|
|
||||||
themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"] # select options for site color theme
|
themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"] # select options for site color theme
|
||||||
notAllowedTypesInHome = ["contact", "talks", "about"] # not allowed page types in home page. type can be set in front matter or default to folder name.
|
notAllowedTypesInHome = ["contact", "talks", "about"] # not allowed page types in home page. type can be set in front matter or default to folder name.
|
||||||
|
notAllowedTypesInHomeSidebar = ["about", "archive"] # not allowed page types in home page sidebar(recent post titles).
|
||||||
|
|
||||||
# header
|
# header
|
||||||
homeHeaderType = "text" # text, img, slide
|
homeHeaderType = "text" # text, img, slide
|
||||||
|
@ -254,10 +255,10 @@ 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
|
||||||
|
enableHomeSidebarTitles = true
|
||||||
enableListSidebarTitles = 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
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
z-index: z('toc');
|
z-index: z('toc');
|
||||||
|
|
||||||
@include no-select;
|
@include no-select;
|
||||||
|
@include animation('slide-in-down-little .2s .6s 1 ease-in both');
|
||||||
|
|
||||||
#TableOfContents {
|
#TableOfContents {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -3,11 +3,13 @@
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
|
|
||||||
&-recent {
|
&-recent {
|
||||||
padding: 0.5rem;
|
padding: 0.25rem;
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
font-family: $title-font;
|
font-family: $title-font;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
|
||||||
@include themify($themes) {
|
@include themify($themes) {
|
||||||
color: themed('sidebar-title-color');
|
color: themed('sidebar-title-color');
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@ -17,12 +19,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&__ul {
|
&__ul {
|
||||||
margin-left: 0.5rem;
|
margin-left: 0.25rem;
|
||||||
li {
|
li {
|
||||||
text-indent: -0.35em;
|
text-indent: -0.4em;
|
||||||
padding-left: 0.5em;
|
padding-left: 0.5em;
|
||||||
&::before {
|
&::before {
|
||||||
padding-right: 0.5rem;
|
padding-right: 0.125rem;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
content: "\2022";
|
content: "\2022";
|
||||||
|
@ -31,6 +33,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&__a {
|
&__a {
|
||||||
|
font-size: 0.95rem;
|
||||||
@include themify($themes) {
|
@include themify($themes) {
|
||||||
color: themed('sidebar-li-color');
|
color: themed('sidebar-li-color');
|
||||||
}
|
}
|
||||||
|
@ -41,3 +44,14 @@
|
||||||
margin: 1.5rem 0;
|
margin: 1.5rem 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li.sidebar-recent {
|
||||||
|
text-indent: -0.4em;
|
||||||
|
padding-left: 0.5em;
|
||||||
|
&::before {
|
||||||
|
padding-right: 0.125rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
display: inline-block;
|
||||||
|
content: "\2022";
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ useFaviconGenerator = true # https://www.favicon-generator.org/
|
||||||
|
|
||||||
themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"]
|
themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"]
|
||||||
notAllowedTypesInHome = ["contact", "talks", "about"]
|
notAllowedTypesInHome = ["contact", "talks", "about"]
|
||||||
|
notAllowedTypesInHomeSidebar = ["about", "archive"]
|
||||||
|
|
||||||
# header
|
# header
|
||||||
homeHeaderType = "text" # text, img, slide
|
homeHeaderType = "text" # text, img, slide
|
||||||
|
@ -40,6 +41,7 @@ enableSidebar = true
|
||||||
enableSidebarTags = true
|
enableSidebarTags = true
|
||||||
enableSidebarSeries = true
|
enableSidebarSeries = true
|
||||||
enableSidebarCategories = true
|
enableSidebarCategories = true
|
||||||
|
enableHomeSidebarTitles = true
|
||||||
enableListSidebarTitles = true
|
enableListSidebarTitles = true
|
||||||
enableToc = true
|
enableToc = true
|
||||||
hideToc = false
|
hideToc = false
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,22 +4,28 @@
|
||||||
{{ partial "sidebar/site-bio" . }}
|
{{ partial "sidebar/site-bio" . }}
|
||||||
{{ partial "sidebar/custom-home" . }}
|
{{ partial "sidebar/custom-home" . }}
|
||||||
|
|
||||||
{{ range (and (where .Site.Sections "Type" "!=" "about") (where .Site.Sections "Type" "!=" "archive")) }}
|
{{ if and .Site.Params.itemsPerCategory .Site.Params.enableHomeSidebarTitles }}
|
||||||
<section class="sidebar-recent">
|
{{ $filteredSections := .Site.Sections }}
|
||||||
<a href="{{ .RelPermalink }}" class="sidebar-recent__title p2">{{ .Title }}</a>
|
{{ range .Site.Params.notAllowedTypesInHomeSidebar }}
|
||||||
<ul class="sidebar-recent__ul">
|
{{ $filteredSections = (where $filteredSections "Type" "!=" (lower .)) }}
|
||||||
{{ if .Site.Params.itemsPerCategory }}
|
{{ end }}
|
||||||
{{ range first .Site.Params.itemsPerCategory .Pages }}
|
|
||||||
<li><a href="{{ .RelPermalink }}" class="sidebar-recent__a p2">{{ .Title }}</a>
|
{{ range $filteredSections }}
|
||||||
</li>
|
<section class="sidebar-recent">
|
||||||
{{ end }}
|
<a href="{{ .RelPermalink }}" class="sidebar-recent__title p2">{{ .Title }}</a>
|
||||||
{{ end }}
|
<ul class="sidebar-recent__ul">
|
||||||
</ul>
|
{{ range first .Site.Params.itemsPerCategory .Pages }}
|
||||||
</section>
|
<li>
|
||||||
|
<a href="{{ .RelPermalink }}" class="sidebar-recent__a p2">{{ .Title }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
<hr class="hr-fade sidebar-hr" />
|
||||||
|
{{ end }}
|
||||||
{{ 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" . }}
|
||||||
|
|
|
@ -1,23 +1,17 @@
|
||||||
{{ if $.Param "enableSidebar" }}
|
{{ if $.Param "enableSidebar" }}
|
||||||
|
|
||||||
<div class="sidebar">
|
<ul class="sidebar">
|
||||||
{{ partial "search/site-search" . }}
|
{{ partial "search/site-search" . }}
|
||||||
{{ partial "sidebar/custom-list" . }}
|
{{ partial "sidebar/custom-list" . }}
|
||||||
{{ if and .Site.Params.itemsPerCategory .Site.Params.enableListSidebarTitles }}
|
{{ if and .Site.Params.itemsPerCategory .Site.Params.enableListSidebarTitles }}
|
||||||
{{ range first .Site.Params.itemsPerCategory .Pages }}
|
{{ range first .Site.Params.itemsPerCategory .Pages }}
|
||||||
<section class="sidebar-recent">
|
<li 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">
|
</li>
|
||||||
{{ range first .Site.Params.itemsPerCategory .Pages }}
|
|
||||||
<li><a href="{{ .RelPermalink }}" class="sidebar-recent__a p2">{{ .Title }}</a>
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<hr class="hr-fade sidebar-hr" />
|
<hr class="hr-fade sidebar-hr" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</ul>
|
||||||
<div class="taxo-root">
|
<div class="taxo-root">
|
||||||
{{ partial "taxonomy/taxonomy-tags" . }}
|
{{ partial "taxonomy/taxonomy-tags" . }}
|
||||||
{{ partial "taxonomy/taxonomy-categories" . }}
|
{{ partial "taxonomy/taxonomy-categories" . }}
|
||||||
|
|
Loading…
Reference in New Issue