Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/progrhyme/hugo-theme-bootie-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkey-amb <yasutake.kiyoshi@gmail.com>2016-05-07 04:39:45 +0300
committerkey-amb <yasutake.kiyoshi@gmail.com>2016-05-07 05:30:32 +0300
commit8b08a606d4da2ef8887465da10aa5b4e12e76c08 (patch)
treed41eb5a8b322fbb5c921556aac76d09263fca80f
parent5728b94beac6e28c353970dfb2024d5d509263d9 (diff)
Show pages in categories on sidebar
-rw-r--r--layouts/partials/sidebar-list.html16
-rw-r--r--static/css/bootie-docs.css29
2 files changed, 39 insertions, 6 deletions
diff --git a/layouts/partials/sidebar-list.html b/layouts/partials/sidebar-list.html
index b0dc7a3..491fe95 100644
--- a/layouts/partials/sidebar-list.html
+++ b/layouts/partials/sidebar-list.html
@@ -1,15 +1,23 @@
{{ $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>
diff --git a/static/css/bootie-docs.css b/static/css/bootie-docs.css
index a518d24..3abc5a1 100644
--- a/static/css/bootie-docs.css
+++ b/static/css/bootie-docs.css
@@ -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;
}
-