Commit 8b08a606 authored by key-amb's avatar key-amb
Browse files

Show pages in categories on sidebar

parent 5728b94b
{{ $baseUrl := .Site.BaseURL }}
<div class="col-sm-3 col-sm-offset-1 doc-sidebar">
<div class="sidebar-module">
<h4>Categories</h4>
<ul class="list-unstyled">
<h4 class="sidebar-heading">Pages in Categories</h4>
<ul class="sidebar-category-list">
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
<li><a class="tag-item" href="{{ $baseUrl }}/categories/{{ $name | urlize }}">{{ $name }}</a></li>
<li>
<a href="{{ $baseUrl }}/categories/{{ $name | urlize }}">
<span class="doc-list-category">{{ $name | title }}</span>
</a>
<ul>{{ range $taxonomy.Pages }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} #Draft{{ end }}</a></li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</div>
<div class="sidebar-module">
<h4>Tags</h4>
<h4 class="sidebar-heading">Tags</h4>
<div class="tag-box">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<a class="tag-item" href="{{ $baseUrl }}/tags/{{ $name | urlize }}">{{ $name }}</a>
......
......@@ -130,6 +130,10 @@ div.doc-search-form {
.doc-entry-meta.in-list {
font-size: 80%;
}
span.doc-list-category {
font-style: italic;
background-color: #f5f5ff;
}
/* Tables */
main > article > section > table {
......@@ -194,9 +198,12 @@ div#sidebar {
/* Sidebar modules for boxing content */
.sidebar-module {
padding: 15px;
padding: 0px 15px 5px;
margin: 0 -15px 15px;
}
.sidebar-heading {
border-bottom: 1px solid #eee;
}
.sidebar-module-inset {
padding: 15px;
background-color: #f5f5f5;
......@@ -214,6 +221,25 @@ div#sidebar {
padding: 0;
}
ul.sidebar-category-list > li {
list-style-type: none;
margin-left: -1.5em;
font-size: 15px;
}
ul.sidebar-category-list > li,
ul.sidebar-category-list > li > ul > li {
list-style-position: outside;
padding: 0;
}
ul.sidebar-category-list > li > ul > li {
font-size: 14px;
font-style: normal;
}
ul.sidebar-category-list > li > ul > li > span.active {
color: #999;
font-weight: 500;
}
.tag-box {
padding: 10px 15px;
background-color: #f5f5f5;
......@@ -257,4 +283,3 @@ div#sidebar {
.doc-footer-em {
font-size: 16px;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment