Commit dcf30682 authored by YASUTAKE Kiyoshi's avatar YASUTAKE Kiyoshi
Browse files

Merge pull request #15 from key-amb/develop

Change: show page hierarchy by category in all pages
parents d4282463 5f0ac901
......@@ -18,6 +18,29 @@
</div>
{{ end }}
<div class="row doc-category">
<h2>Pages in Categories</h2>
<div>
<ul class="doc-list-category">
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
<li>
<a href="{{ $baseUrl }}/categories/{{ $name | urlize }}">
<span class="doc-list-category">{{ $name | title }}</span>
</a>
<ul>{{ range $taxonomy.Pages }}
<li><a href="{{ .RelPermalink }}">
<span>{{ .Title }}{{ if .Draft }} #Draft{{ end }}</span>
<span class="doc-entry-meta">(<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time>)
</span>
</a></li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</div>
</div>
{{ if isset .Site.Params "withSitePosts" }}
<hr />
......
{{ $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>
......
{{ $baseUrl := .Site.BaseURL }}
{{ $url := .Permalink }}
<div class="col-sm-3 col-sm-offset-1 doc-sidebar">
<div id="sidebar">
<div class="sidebar-module">
<div class="sidebar-toc">
<h4>Table of Contents</h4>
<h4 class="sidebar-heading">Table of Contents</h4>
<ul>
<li><strong><a href="#title">{{ .Title }}</a></strong></li>
</ul>
......@@ -11,7 +12,26 @@
</div>
</div>
<div class="sidebar-module">
<h4>Tags</h4>
<h4 class="sidebar-heading">Pages in Categories</h4>
<ul class="sidebar-category-list">
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
<li>
<a href="{{ $baseUrl }}/categories/{{ $name | urlize }}">
<span class="doc-list-category">{{ $name | title }}</span>
</a>
<ul>{{ range $taxonomy.Pages }}
<li>{{ if eq $url .Permalink }}
<span class="active">{{ .Title }}{{ if .Draft }} #Draft{{ end }}</span>
{{ else }}<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} #Draft{{ end }}</a>
{{ end }}</li>
{{ end }}
</ul>
</li>
{{ end }}
</ul>
</div>
<div class="sidebar-module">
<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>
......
......@@ -109,6 +109,9 @@ div.doc-search-form {
.doc-main pre code {
font-size: 14px;
}
div.doc-main {
margin-bottom: 20px;
}
/* List items */
.doc-list-header {
......@@ -130,6 +133,17 @@ div.doc-search-form {
.doc-entry-meta.in-list {
font-size: 80%;
}
span.doc-list-category {
font-style: italic;
background-color: #f5f5ff;
}
ul.doc-list-category > li {
font-size: 20px;
}
ul.doc-list-category > li > ul > li {
font-size: 18px;
font-style: normal;
}
/* Tables */
main > article > section > table {
......@@ -194,9 +208,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 +231,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 +293,3 @@ div#sidebar {
.doc-footer-em {
font-size: 16px;
}
......@@ -22,7 +22,7 @@ window.onload = function() {
sideNode.css({"position": "fixed", "top": headHeight + 20 + "px"});
} else if (w.scrollTop() >= scrollStop) {
var topNext
= headHeight - (headHeight + sideHeight)
= headHeight - (headHeight + sideHeight + footHeight)
* (w.scrollTop() - scrollStop) / (totalHeight - scrollStop);
sideNode.css({
"position": "fixed", "top": topNext + "px", "bottom": footHeight + "px"
......
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