You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by ch...@apache.org on 2016/03/02 23:26:28 UTC

[30/31] incubator-toree-website git commit: Added documentation sidebar and data

Added documentation sidebar and data


Project: http://git-wip-us.apache.org/repos/asf/incubator-toree-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-toree-website/commit/9f6d3ba3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-toree-website/tree/9f6d3ba3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-toree-website/diff/9f6d3ba3

Branch: refs/heads/OverhaulSite
Commit: 9f6d3ba3b0b4244c2107a8e04dcd441e21b2f868
Parents: ec6388b
Author: Chip Senkbeil <ch...@gmail.com>
Authored: Wed Mar 2 15:27:13 2016 -0600
Committer: Chip Senkbeil <ch...@gmail.com>
Committed: Wed Mar 2 15:27:13 2016 -0600

----------------------------------------------------------------------
 _data/documentation.yml                      | 28 +++++++++++
 _includes/themes/apache/_doc_navigation.html | 57 +++++++++++++++++++++++
 _includes/themes/apache/_navigation.html     |  8 ++--
 _includes/themes/apache/default.html         | 12 +----
 _includes/themes/apache/docpage.html         | 13 ++++++
 _layouts/docpage.html                        |  7 +++
 documentation/advanced/index.md              | 13 ++++++
 documentation/index.md                       | 13 ++++++
 documentation/quick-start/index.md           | 13 ++++++
 index.md                                     |  1 +
 10 files changed, 150 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/_data/documentation.yml
----------------------------------------------------------------------
diff --git a/_data/documentation.yml b/_data/documentation.yml
new file mode 100644
index 0000000..af4c6e9
--- /dev/null
+++ b/_data/documentation.yml
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+- section_name: "Quick Start"
+  section_id: "quick-start"
+  section_url: "/documentation/quick-start/"
+
+- section_name: "Advanced"
+  section_id: "advanced"
+  section_url: "/documentation/advanced/"
+
+- section_name: "API Reference"
+  section_id: "api-reference"
+  section_url: "/documentation/api-reference/"
+

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/_includes/themes/apache/_doc_navigation.html
----------------------------------------------------------------------
diff --git a/_includes/themes/apache/_doc_navigation.html b/_includes/themes/apache/_doc_navigation.html
new file mode 100644
index 0000000..b9e9bff
--- /dev/null
+++ b/_includes/themes/apache/_doc_navigation.html
@@ -0,0 +1,57 @@
+<nav id="navbar" class="doc-nav" data-spy="affix" data-offset-top="60" data-offset-bottom="200">
+    {% assign DOC_PAGES = .site.pages | where: "type", "doc" %}
+    {% assign DOC_GROUPS = DOC_PAGES | group_by: "section" %}
+    {% assign ACTIVE_PAGE_ID = .page.path %}
+
+    <style>
+        .doc-nav h3 {
+            text-transform: uppercase;
+            font-size: 2rem;
+            color: black;
+        }
+
+        .doc-nav a {
+            color: #666;
+            display: block;
+            margin-left: 0px;
+            font-weight: 400;
+            text-decoration: none;
+            padding-left: 0px !important;
+        }
+
+        .doc-nav a.active {
+            color: #C15757;
+        }
+
+        .doc-nav li .doc-section {
+            border-bottom: 1px solid #ccc;
+        }
+        .doc-nav li:last-child .doc-section {
+            border-bottom: 0px;
+        }
+    </style>
+    <ul class="nav">
+    {% for s in site.data.documentation %}
+        {% assign g = DOC_GROUPS | where: "name", s.section_id | first %}
+        {% assign pages = g["items"] | default: [] %}
+        {% if pages | size > 0 %}
+            {% assign pages = pages | sort: "weight" %}
+        {% endif %}
+
+        <li>
+            <div class="doc-section">
+                <h3>{{ s.section_name }}</h3>
+                <ul class="nav">
+                    {% for p in pages %}
+                        <li>
+                            <a class="{% if p.path == ACTIVE_PAGE_ID %}active{% endif %}"
+                                href="{{ p.url }}">{{ p.title }}</a>
+                        </li>
+                    {% endfor %}
+                </ul>
+            </div>
+        </li>
+    {% endfor %}
+    </ul>
+</nav>
+

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/_includes/themes/apache/_navigation.html
----------------------------------------------------------------------
diff --git a/_includes/themes/apache/_navigation.html b/_includes/themes/apache/_navigation.html
index 1a122bc..e8039b2 100644
--- a/_includes/themes/apache/_navigation.html
+++ b/_includes/themes/apache/_navigation.html
@@ -1,4 +1,4 @@
-    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
+    <div class="navbar navbar-inverse navbar-static-top" role="navigation">
       <div class="container">
         <div class="navbar-header">
           <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
@@ -17,9 +17,9 @@
             <li id="documentation">
                 <a href="#" data-toggle="dropdown" class="dropdown-toggle">Documentation<b class="caret"></b></a>
                 <ul class="dropdown-menu dropdown-left">
-                    <li><a href="/documentation/getting-started">Getting Started</a></li>
-                    <li><a href="/documentation/advanced">Advanced</a></li>
-                    <li><a href="/documentation/scaladocs">Scaladocs</a></li>
+                    {% for s in .site.data.documentation %}
+                        <li><a href="{{ s.section_url }}">{{ s.section_name }}</a></li>
+                    {% endfor %}
                 </ul>
             </li>
             <li id="community">

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/_includes/themes/apache/default.html
----------------------------------------------------------------------
diff --git a/_includes/themes/apache/default.html b/_includes/themes/apache/default.html
index a6b7cb1..c2a0620 100644
--- a/_includes/themes/apache/default.html
+++ b/_includes/themes/apache/default.html
@@ -17,8 +17,6 @@
     <!-- Le styles -->
     <link href="{{ ASSET_PATH }}/font-awesome-4.5.0/css/font-awesome.min.css">
     <link href="{{ ASSET_PATH }}/bootstrap/css/bootstrap.css" rel="stylesheet">
-    <link href="{{ ASSET_PATH }}/bootstrap-material-design-0.5.9/css/bootstrap-material-design.min.css" rel="stylesheet">
-    <link href="{{ ASSET_PATH }}/bootstrap-material-design-0.5.9/css/ripples.min.css" rel="stylesheet">
     <!-- <link href="{{ ASSET_PATH }}/css/style.css?body=1" rel="stylesheet" type="text/css"> -->
     <!-- <link href="{{ ASSET_PATH }}/css/syntax.css" rel="stylesheet"  type="text/css" media="screen" /> -->
     <!-- Le fav and touch icons -->
@@ -31,7 +29,7 @@
 
   </head>
 
-  <body>
+  <body data-spy="scroll" data-target="#navbar" style="position: relative;">
 
     {% include themes/apache/_navigation.html %}
 
@@ -47,14 +45,6 @@
     {% include JB/analytics %}
     <script src="{{ ASSET_PATH }}/jquery/jquery-2.1.1.min.js"></script>
     <script src="{{ ASSET_PATH }}/bootstrap/js/bootstrap.min.js"></script>
-    <script src="{{ ASSET_PATH }}/bootstrap-material-design-0.5.9/js/material.min.js"></script>
-    <script src="{{ ASSET_PATH }}/bootstrap-material-design-0.5.9/js/ripples.min.js"></script>
-
-    <script>
-        $(function() {
-            $.material.init();
-        });
-    </script>
 
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/_includes/themes/apache/docpage.html
----------------------------------------------------------------------
diff --git a/_includes/themes/apache/docpage.html b/_includes/themes/apache/docpage.html
new file mode 100644
index 0000000..c999f1b
--- /dev/null
+++ b/_includes/themes/apache/docpage.html
@@ -0,0 +1,13 @@
+<!--<div class="hero-unit {{ page.title | lowercase }}">
+  <h1>{% if page.tagline %} <small>{{ page.tagline }}</small>{% endif %}</h1>
+</div>
+-->
+
+<div class="row">
+    <div class="col-md-3" role="complementary">
+        {% include themes/apache/_doc_navigation.html %}
+    </div>
+    <div class="col-md-9" role="main">
+        {{ content }}
+    </div>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/_layouts/docpage.html
----------------------------------------------------------------------
diff --git a/_layouts/docpage.html b/_layouts/docpage.html
new file mode 100644
index 0000000..febc46f
--- /dev/null
+++ b/_layouts/docpage.html
@@ -0,0 +1,7 @@
+---
+layout: default
+---
+
+{% include JB/setup %}
+{% include themes/apache/docpage.html %}
+

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/documentation/advanced/index.md
----------------------------------------------------------------------
diff --git a/documentation/advanced/index.md b/documentation/advanced/index.md
new file mode 100644
index 0000000..d1662e6
--- /dev/null
+++ b/documentation/advanced/index.md
@@ -0,0 +1,13 @@
+---
+layout: docpage
+title: Advanced
+type: doc
+section: advanced
+weight: 0
+tagline: Apache Project !
+---
+
+{% include JB/setup %}
+
+Some doc page.
+

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/documentation/index.md
----------------------------------------------------------------------
diff --git a/documentation/index.md b/documentation/index.md
new file mode 100644
index 0000000..2bb4497
--- /dev/null
+++ b/documentation/index.md
@@ -0,0 +1,13 @@
+---
+layout: docpage
+title: Documentation
+type: doc
+section: something
+weight: 0
+tagline: Apache Project !
+---
+
+{% include JB/setup %}
+
+Some doc page.
+

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/documentation/quick-start/index.md
----------------------------------------------------------------------
diff --git a/documentation/quick-start/index.md b/documentation/quick-start/index.md
new file mode 100644
index 0000000..a0be381
--- /dev/null
+++ b/documentation/quick-start/index.md
@@ -0,0 +1,13 @@
+---
+layout: docpage
+title: Quick Start
+type: doc
+section: quick-start
+weight: 0
+tagline: Apache Project !
+---
+
+{% include JB/setup %}
+
+Some doc page.
+

http://git-wip-us.apache.org/repos/asf/incubator-toree-website/blob/9f6d3ba3/index.md
----------------------------------------------------------------------
diff --git a/index.md b/index.md
index 6f5e87a..89a8849 100644
--- a/index.md
+++ b/index.md
@@ -9,6 +9,7 @@ tagline: Apache Project !
 
 ## Apache Toree
 
+
 ### How to enable an interactive application against Apache Spark?
 
 There are several options to communicate with a Spark cluster, but none