You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/06/07 04:09:47 UTC

[GitHub] szha closed pull request #11105: [MXNET-501] Navbar community fix

szha closed pull request #11105: [MXNET-501] Navbar community fix
URL: https://github.com/apache/incubator-mxnet/pull/11105
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/_static/js/navbar.js b/docs/_static/js/navbar.js
index 27191723f82..2a27c50bbc0 100644
--- a/docs/_static/js/navbar.js
+++ b/docs/_static/js/navbar.js
@@ -1,13 +1,17 @@
 var searchBox = $("#search-input-wrap");
 var TITLE = ['/install/', '/gluon/', '/api/', '/docs/', '/community/' ];
 var DOC_TITLE = ['/faq/', '/tutorials/', '/architecture/', '/model_zoo/'];
-var APISubmenu, versionSubmenu, docSubmenu;
+var APISubmenu, versionSubmenu, docSubmenu, communitySubmenu;
 $("#burgerMenu").children().each(function () {
     if($(this).children().first().html() == 'API') APISubmenu = $(this).clone();
     if($(this).children().first().html().startsWith('Versions')) versionSubmenu = $(this).clone();
+    if($(this).children().first().html().startsWith('Community')) communitySubmenu = $(this).clone();
     if($(this).children().first().html() == 'Docs') docSubmenu= $(this).clone();
 });
 
+$('.burger-link').on('click', function(e) { e.stopPropagation() });
+$('.burger-link').on('touchstart', function(e) { e.stopPropagation() });
+
 function navbar() {
     var leftOffset = 40;
     var plusMenuList = [];
@@ -50,6 +54,9 @@ function navbar() {
         else if(plusMenuList[i].attr('id') == 'dropdown-menu-position-anchor-docs') {
             $("#plusMenu").append(docSubmenu);
         }
+        else if(plusMenuList[i].attr('id') == 'dropdown-menu-position-anchor-community') {
+            $("#plusMenu").append(communitySubmenu);
+        }
         else {
             $("#plusMenu").append("<li></li>");
             plusMenuList[i].removeClass("main-nav-link");
diff --git a/docs/_static/js/options.js b/docs/_static/js/options.js
index 77ef94074c5..8fe74ee1904 100644
--- a/docs/_static/js/options.js
+++ b/docs/_static/js/options.js
@@ -1,3 +1,6 @@
+//$('.burger-link').on('click', function(e) { e.stopPropagation() });
+//$('.burger-link').on('touchstart', function(e) { e.stopPropagation() });
+
 $(document).ready(function () {
     function label(lbl) {
         return lbl.replace(/[ .]/g, '-').toLowerCase();
diff --git a/docs/_static/mxnet-theme/navbar.html b/docs/_static/mxnet-theme/navbar.html
index 8ea2f9f2161..05ec5c42ce3 100644
--- a/docs/_static/mxnet-theme/navbar.html
+++ b/docs/_static/mxnet-theme/navbar.html
@@ -55,17 +55,18 @@ <h1 id="logo-wrap">
           <ul id="burgerMenu" class="dropdown-menu">
               <li><a href="{{url_root}}install/index.html">Install</a></li>
               <li><a class="main-nav-link" href="{{url_root}}tutorials/index.html">Tutorials</a></li>
-              <li class="dropdown-submenu">
-                <a href="#" tabindex="-1">Community</a>
+              <li class="dropdown-submenu dropdown">
+                <a href="#" tabindex="-1" aria-haspopup="true" role="button" class="dropdown-toggle burger-link" data-toggle="dropdown">Community</a>
                 <ul class="dropdown-menu">
-                  <li><a tabindex="-1"  href="{{url_root}}community/index.html">Community</a></li>
+                  <li><a tabindex="-1"  href="http://discuss.mxnet.io">Forum</a></li>
+                  <li><a tabindex="-1"  href="https://github.com/apache/incubator-mxnet">Github</a></li>
                   <li><a tabindex="-1"  href="{{url_root}}community/contribute.html">Contribute</a></li>
                   <li><a tabindex="-1"  href="{{url_root}}community/powered_by.html">Powered By</a></li>
                 </ul>
               </li>
               {% for name in ['API'] %}
               <li class="dropdown-submenu">
-                <a href="#" tabindex="-1">{{name}}</a>
+                <a href="#" tabindex="-1" role="button" aria-haspopup="true" class="dropdown-toggle burger-link" data-toggle="dropdown">{{name}}</a>
                 <ul class="dropdown-menu">
                   {% for lang in ['Python', 'Scala', 'R', 'Julia', 'C++', 'Perl'] %}
                     <li><a tabindex="-1" href="{{url_root}}{{name.lower()|replace(" ", "_")}}/{{lang.lower()}}/index.html">{{lang}}</a>
@@ -75,7 +76,7 @@ <h1 id="logo-wrap">
               </li>
               {% endfor %}
               <li class="dropdown-submenu">
-                <a href="#" tabindex="-1">Docs</a>
+                <a href="#" tabindex="-1" aria-haspopup="true" aria-expanded="true" class="dropdown-toggle burger-link" data-toggle="dropdown">Docs</a>
                 <ul class="dropdown-menu">
                   <li><a tabindex="-1"  href="{{url_root}}tutorials/index.html">Tutorials</a></li>
                   <li><a tabindex="-1"  href="{{url_root}}faq/index.html">FAQ</a></li>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services