You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by wc...@apache.org on 2016/03/22 01:49:49 UTC

[2/4] incubator-quarks-website git commit: Apply dropdown menu, Home redirection(#home)

Apply dropdown menu, Home redirection(#home)


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

Branch: refs/heads/master
Commit: ca50a78958a39a07238ec20cfa6ec5f9e0b840f5
Parents: f4e2179
Author: cazen.lee <ca...@samsung.com>
Authored: Mon Mar 21 16:53:43 2016 +0900
Committer: cazen.lee <ca...@samsung.com>
Committed: Mon Mar 21 16:53:43 2016 +0900

----------------------------------------------------------------------
 site/_config.yml                      |  2 +-
 site/_data/mydoc/mydoc_topnav.yml     | 28 ++++++++++++++++++++++++----
 site/_includes/custom/conditions.html |  1 +
 site/_includes/header.html            |  4 ++--
 site/_includes/topnav.html            | 24 ++++++++++++++++++++++++
 5 files changed, 52 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/ca50a789/site/_config.yml
----------------------------------------------------------------------
diff --git a/site/_config.yml b/site/_config.yml
index 5c6d8fd..1fe9270 100755
--- a/site/_config.yml
+++ b/site/_config.yml
@@ -125,4 +125,4 @@ host:    127.0.0.1
 #Base URLs
 docsurl: http://quarks-edge.github.io/quarks.documentation/
 sourceurl: https://github.com/apache/incubator-quarks
-projurl: http://quarks-edge.github.io/quarks
+projurl: http://quarks.incubator.apache.org/

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/ca50a789/site/_data/mydoc/mydoc_topnav.yml
----------------------------------------------------------------------
diff --git a/site/_data/mydoc/mydoc_topnav.yml b/site/_data/mydoc/mydoc_topnav.yml
index 3fa8b34..3daa7e7 100644
--- a/site/_data/mydoc/mydoc_topnav.yml
+++ b/site/_data/mydoc/mydoc_topnav.yml
@@ -1,8 +1,5 @@
 ## Topnav single links
 ## if you want to list an external url, use external_url instead of url. the theme will apply a different link base.
-topnav:
-- title: Topnav
-  subcategories:
 #    - title: Sample
 #      url: /mydoc/sample.html
 #      audience: writers, designers
@@ -11,13 +8,36 @@ topnav:
 #      version: all
 #      output: web
 
+
+githubrepos_dropdowns:
+- title: Github Repos dropdowns
+  subcategories:
     - title: Github Repos
-      external_url: https://github.com/apache/incubator-quarks
       audience: writers, designers
       platform: all
       product: all
       version: all
       output: web
+      items:
+        - title: Source code
+          external_url: https://github.com/apache/incubator-quarks
+          audience: writers, designers
+          platform: all
+          product: all
+          version: all
+          output: web
+
+        - title: Website/Documentation
+          external_url: https://github.com/apache/incubator-quarks-website
+          audience: writers, designers
+          platform: all
+          product: all
+          version: all
+          output: web
+
+topnav:
+- title: Topnav
+  subcategories:
     - title: Javadoc
       external_url: https://quarks-edge.github.io/quarks/docs/javadoc/index.html
       audience: writers, designers

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/ca50a789/site/_includes/custom/conditions.html
----------------------------------------------------------------------
diff --git a/site/_includes/custom/conditions.html b/site/_includes/custom/conditions.html
index b7add78..cc2fd81 100644
--- a/site/_includes/custom/conditions.html
+++ b/site/_includes/custom/conditions.html
@@ -32,6 +32,7 @@ ____            _
 {% if site.project == "mydoc_designers" %}
 {% assign audience = "designers" %}
 {% assign sidebar = site.data.mydoc.mydoc_sidebar.entries %}
+{% assign githubrepos_dropdowns = site.data.mydoc.mydoc_topnav.githubrepos_dropdowns %}
 {% assign topnav = site.data.mydoc.mydoc_topnav.topnav %}
 {% assign topnav_dropdowns = site.data.mydoc.mydoc_topnav.topnav_dropdowns %}
 {% assign version = "all" %}

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/ca50a789/site/_includes/header.html
----------------------------------------------------------------------
diff --git a/site/_includes/header.html b/site/_includes/header.html
index 535209e..a0599ce 100755
--- a/site/_includes/header.html
+++ b/site/_includes/header.html
@@ -65,7 +65,7 @@ limitations under the License.
                     <span class="icon-bar"></span>
                     <span class="icon-bar"></span>
                 </button>
-                <a class="navbar-brand page-scroll" href="{{ site.projurl}}/">Home</a>
+                <a class="navbar-brand page-scroll" href="{{ site.projurl }}/#home">Home</a>
             </div>
             <!-- Collect the nav links, forms, and other content for toggling -->
             <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
@@ -97,7 +97,7 @@ limitations under the License.
                       <ul class="dropdown-menu">
                         <li><a href="docs/home">Documentation Home</a></li>
                         <li><a href="docs/quarks-getting-started">Getting Started Guide</a></li>
-                        <li><a href="{{ site.projurl}}/docs/javadoc/index.html">Javadoc</a></li>
+                        <li><a href="{{ site.projurl }}/docs/javadoc/index.html">Javadoc</a></li>
                       </ul>
                     </li>
                     <li class="dropdown">

http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/ca50a789/site/_includes/topnav.html
----------------------------------------------------------------------
diff --git a/site/_includes/topnav.html b/site/_includes/topnav.html
index 1e232ea..87b52ad 100644
--- a/site/_includes/topnav.html
+++ b/site/_includes/topnav.html
@@ -17,6 +17,30 @@
                 <!-- entries without drop-downs appear here -->
                 <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
                 {% include custom/conditions.html %}
+                <li class="dropdown">
+                    {% for entry in githubrepos_dropdowns %}
+                    {% for subcategory in entry.subcategories %}
+                    {% if subcategory.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.output contains "web" %}
+                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ subcategory.title }}<b class="caret"></b></a>
+                    <ul class="dropdown-menu">
+                        {% for subitem in subcategory.items %}
+                        {% if subitem.audience contains audience and subitem.product contains product and subitem.platform contains platform and subcategory.version contains version and subitem.output contains "web" %}
+                        {% if subitem.external_url %}
+                        <li><a href="{{subitem.external_url}}" target="_blank">{{subitem.title}}</a></li>
+                        {% elsif page.url contains subitem.url %}
+                        <li class="dropdownActive"><a href="{{subitem.url}}">{{subitem.title}}</a></li>
+                        {% else %}
+                        <li><a href="{{subitem.url | replace: "/",""}}">{{subitem.title}}</a></li>
+                        {% endif %}
+                        {% endif %}
+                        {% endfor %}
+                        {% endif %}
+
+                    </ul>
+                </li>
+                {% endfor %}
+                {% endfor %}
+
 
                 {% for entry in topnav %}
                 {% for subcategory in entry.subcategories %}