Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13114929
D7205.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D7205.diff
View Options
diff --git a/_config.yml b/_config.yml
--- a/_config.yml
+++ b/_config.yml
@@ -148,19 +148,22 @@
# Default YAML values (more information on Jekyll's site)
defaults:
- -
- scope:
+ - scope:
path: ""
- type: "posts"
+ type: posts
values:
- layout: "post"
+ layout: post
comments: true # add comments to all blog posts
social-share: true # add social media sharing buttons to all blog posts
- -
- scope:
+ - scope:
+ path: ""
+ type: doc
+ values:
+ layout: doc
+ - scope:
path: "" # all files
values:
- layout: "page"
+ layout: page
show-avatar: true
# Use tags index page and make tags on each post clickable
diff --git a/_layouts/doc.html b/_layouts/doc.html
new file mode 100644
--- /dev/null
+++ b/_layouts/doc.html
@@ -0,0 +1,36 @@
+---
+layout: base
+---
+
+{% assign groups = site.doc | where:"version", page.version | group_by:"group" | sort: "name" %}
+<div class="subnav">
+{% for group in groups %}
+{% assign maybeHideOnStart = '' %}
+{% if group.name != page.group %}
+ {% assign maybeHideOnStart = 'js-hide-on-start' %}
+{% endif %}
+ <header>
+ <h3 class="subnav-header">
+ <i class="fa fa-book"></i>
+ {{ group.name }}
+ </h3>
+ <div class="subnav-drawer {{ maybeHideOnStart }}">
+ <ul>
+ {% for article in group.items %}
+ <li><a href="{{ article.url }}">{{ article.name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ </header>
+{% endfor %}
+</div>
+
+{% include header.html type="page" %}
+
+<div class="container" role="main" style="min-height: 500px">
+ <div class="row">
+ <div class="col-lg-11 col-lg-offset-1 col-md-10 col-md-offset-2">
+ {% highlight text %}{{ content }}{% endhighlight %}
+ </div>
+ </div>
+</div>
diff --git a/css/main.css b/css/main.css
--- a/css/main.css
+++ b/css/main.css
@@ -420,6 +420,7 @@
.intro-header {
margin: 80px 0 20px;
position: relative;
+ pointer-events: none;
}
.intro-header.big-img {
background: no-repeat center center;
@@ -780,3 +781,40 @@
margin: 10px 30px;
}
+.subnav {
+ font-size: 14px;
+ position: relative;
+}
+@media only screen and (max-width: 1000px) {
+ .subnav {
+ margin-top: 100px;
+ }
+}
+@media only screen and (min-width: 1000px) {
+ .subnav {
+ position: absolute;
+ left: 0;
+ }
+}
+.subnav h3 {
+ font-size: 18px;
+ margin: 5px;
+ text-transform: uppercase;
+}
+.subnav h3:hover {
+ cursor: pointer;
+}
+.subnav li {
+ list-style-type: none;
+}
+
+.subnav-header {
+}
+
+.subnav-drawer {
+}
+
+.js-hidden {
+ max-height: 0;
+ overflow: hidden;
+}
diff --git a/js/main.js b/js/main.js
--- a/js/main.js
+++ b/js/main.js
@@ -138,3 +138,18 @@
// 2fc73a3a967e97599c9763d05e564189
document.addEventListener('DOMContentLoaded', main.init);
+
+// sub navigation toggle
+$(function() {
+ $(".subnav header").each(function(){
+ var header = $(this);
+ var drawer = header.find(".subnav-drawer");
+ header.find(".subnav-header").click(function(){
+ drawer.toggleClass("js-hidden");
+ });
+ });
+ $(".subnav-drawer.js-hide-on-start").each(function(){
+ var drawer = $(this);
+ drawer.toggleClass("js-hidden");
+ });
+});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 08:39 (31 m, 34 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187113
Default Alt Text
D7205.diff (3 KB)
Attached To
D7205: Add sub navigation for RPC documentation
Event Timeline
Log In to Comment