drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tshi...@apache.org
Subject [14/50] [abbrv] drill git commit: Removing categories bar and placing responsive categories button near logo. Fixing up margins to look nicer at all widths
Date Fri, 01 May 2015 18:08:10 GMT
Removing categories bar and placing responsive categories button near
logo. Fixing up margins to look nicer at all widths


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/3b66c466
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/3b66c466
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/3b66c466

Branch: refs/heads/gh-pages
Commit: 3b66c466618cc1f5f92175d486e028eb0f499214
Parents: 1e80943
Author: Danny <dkirschner@batchblue.com>
Authored: Wed Apr 29 19:48:25 2015 -0400
Committer: Danny <dkirschner@batchblue.com>
Committed: Wed Apr 29 19:48:25 2015 -0400

----------------------------------------------------------------------
 _includes/doctoccategories.html |  3 --
 _includes/menu.html             |  5 ++-
 _layouts/docpage.html           | 12 ++----
 css/breadcrumbs.css             |  1 -
 css/docpage.css                 | 80 +++++++++++++++---------------------
 css/responsive.css              | 33 ++++++++++-----
 css/style.css                   |  7 ++--
 js/drill.js                     | 24 +++--------
 8 files changed, 72 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/3b66c466/_includes/doctoccategories.html
----------------------------------------------------------------------
diff --git a/_includes/doctoccategories.html b/_includes/doctoccategories.html
index 2c371de..8b13789 100644
--- a/_includes/doctoccategories.html
+++ b/_includes/doctoccategories.html
@@ -1,4 +1 @@
-<div class='toc-categories'>
-  <span class="pull-left">Categories</span><span class="pull-right expand-toc-icon"><a
href="javascript:void(0);">☰</a></span>
-</div>
 

http://git-wip-us.apache.org/repos/asf/drill/blob/3b66c466/_includes/menu.html
----------------------------------------------------------------------
diff --git a/_includes/menu.html b/_includes/menu.html
index dcfc3f5..71a7c01 100755
--- a/_includes/menu.html
+++ b/_includes/menu.html
@@ -2,12 +2,15 @@
 
 <div id="menu" class="mw">
 <ul>
+  <li class='toc-categories'>
+    <a class="expand-toc-icon" href="javascript:void(0);">☰</a>
+  </li>
   <li class="logo"><a href="{{ site.baseurl }}/"></a></li>
   <li class='expand-menu'>
     <a href="javascript:void(0);"><span class='menu-text'>Menu</span><span
class='expand-icon'>☰</span></a>
   </li>
   <li class='clear-float'></li>
-  <li>
+  <li class="documentation-menu">
     <a href="{{ site.baseurl }}/docs/">Documentation</a>
     <ul>
       {% for doc in site.data.docs.hierarchy %}

http://git-wip-us.apache.org/repos/asf/drill/blob/3b66c466/_layouts/docpage.html
----------------------------------------------------------------------
diff --git a/_layouts/docpage.html b/_layouts/docpage.html
index a503f92..ba7da43 100644
--- a/_layouts/docpage.html
+++ b/_layouts/docpage.html
@@ -9,7 +9,6 @@ title: Documentation
 <body onResize="resized();">
 <div class="page-wrap">
   {% include menu.html %}
-  {% include doctoccategories.html %}
 
   {% include doctoc.html %}
 
@@ -28,7 +27,7 @@ title: Documentation
         <a class="edit-link" href="https://github.com/apache/drill/blob/gh-pages/{{ page.relative_path
}}" target="_blank"><i class="fa fa-pencil-square-o"></i></a>
         {% if page_data.children.size == 0 %}
           {{ content }}
-        {% else %}
+      {% else %}
           <ul>
           {% for doc0 in page_data.children %}
             <li><a href="{{ site.baseurl }}{{ doc0.url }}">{{ doc0.title }}</a></li>
@@ -42,16 +41,13 @@ title: Documentation
         {% endfor %}
         </ul>
       {% endif %}
-      </div>
-
-      {% include docnav.html %}
 
+        {% include docnav.html %}
+      </div>
     </div>
-
-
   </div>
 
-      {% include footer.html %}
+  {% include footer.html %}
 </div>
 {% include scripts.html %}
 </body>

http://git-wip-us.apache.org/repos/asf/drill/blob/3b66c466/css/breadcrumbs.css
----------------------------------------------------------------------
diff --git a/css/breadcrumbs.css b/css/breadcrumbs.css
index bde9fdb..0f72e06 100644
--- a/css/breadcrumbs.css
+++ b/css/breadcrumbs.css
@@ -5,7 +5,6 @@
   overflow: hidden;
   margin-top: 55px;
   list-style: none;
-  border-bottom: solid 1px #E4E4E4;
   width: 100%;
 }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/3b66c466/css/docpage.css
----------------------------------------------------------------------
diff --git a/css/docpage.css b/css/docpage.css
index f28b055..e66ff6f 100644
--- a/css/docpage.css
+++ b/css/docpage.css
@@ -1,35 +1,21 @@
 /*****************
  Categories Bar
 *****************/
-
-div.toc-categories {
-  background-color: #ccc;
-  line-height: 48px;
+#menu ul li.toc-categories a {
+	height:50px;
+	padding:0;
+  text-decoration: none;
+	width: 60px;
+  text-align: center;
+  color: #bababa;
+}
+#menu ul li.toc-categories {
+	float:left;
+  line-height: 45px;
   font-size: 18px;
-  color: black;
   display: none;
   overflow: auto;
 }
-div.toc-categories .pull-left {
-  float: left;
-  margin-left: 10px;
-}
-
-div.toc-categories .pull-right {
-  float: right;
-  margin-right: 10px;
-}
-
-div.toc-categories a {
-  text-decoration: none;
-}
-
-div.toc-categories.fixed {
-  position:fixed;
-  z-index: 1;
-  width: 100%;
-  top: 50px;
-}
 
 /****************
  Docs Nav (Bottom)
@@ -63,17 +49,17 @@ div.doc-nav span.next-toc {
  Main Area
 *****************/
 
-.int_text {
+.main-content .int_text {
+  margin-left: 0px;
   margin-top:30px;
-  margin-left: 30px;
 }
 .main-content .int_text img {
   margin: 30px 0px;
 }
-.int_title
+.main-content .int_title
 {
-  margin-left: 30px;
   text-align: left;
+  margin-left: 0px;
   margin-top: 30px;
 }
 .int_title::after{
@@ -318,9 +304,9 @@ span.expand.show, span.contract.show {
 
 .docsidebarwrapper li.toctree-l2.current, .docsidebarwrapper li.toctree-l3.current {
   background-color: #1A6BC7;
+  color: white;
 }
-.docsidebarwrapper li.current a {
-  background-color: #1A6BC7;
+.docsidebarwrapper li.toctree-l2.current.current > a, .docsidebarwrapper li.toctree-l3.current.current
> a {
   color: white;
 }
 .docsidebarwrapper a:hover {
@@ -372,21 +358,28 @@ span.expand.show, span.contract.show {
   #footer {
     margin-left: 0px;
   }
-  div.doc-nav {
-  }
 
-  div.toc-categories {
-    display: block;
+  #menu ul li.toc-categories {
+    display: inline-block;
+    width: 60px;
+    text-align: center;
   }
+  #menu ul li.logo {
+    padding-left: 0px;
+  }
+  #menu ul li.force-expand.toc-categories {
+    display: inline-block;
+  }
+
   .page-wrap div.int_title.margin_110 {
     margin-top:110px;
   }
 
-  div.toc-categories .expand-toc-icon {
+  li.toc-categories .expand-toc-icon {
     font-size: 24px;
     /*padding-right: 10px;*/
   }
-  div.toc-categories .expand-toc-icon a {
+  li.toc-categories a.expand-toc-icon {
     color: black;
   }
 
@@ -396,10 +389,6 @@ span.expand.show, span.contract.show {
     text-decoration: none;
   }
 
-  #menu ul li.logo {
-    /*padding-left: 70px; */
-  }
-
   .sidebar {
     left: -293px;
     box-shadow: 0 0 13px rgba(0,0,0,0.3);
@@ -410,10 +399,9 @@ span.expand.show, span.contract.show {
   }
 
   .main-content{
-    margin-left: 0;
+    margin: 0px 20px 0px 20px;
   }
   .int_title {
-    margin-left: 30px;
     margin-top: 60px;
   }
   .int_title h1 {
@@ -424,10 +412,6 @@ span.expand.show, span.contract.show {
   .main-content-wrapper {
     width: 1092px; 
   }
-  .main-content {
-
-  }
-
   div.doc-nav {
     margin-left: 30px;
   }
@@ -437,7 +421,7 @@ span.expand.show, span.contract.show {
   }
   .main-content
   {
-    margin-left: 293px;
+    margin-left: 313px;
   }
   #menu ul li.logo {
     padding-left: 30px;

http://git-wip-us.apache.org/repos/asf/drill/blob/3b66c466/css/responsive.css
----------------------------------------------------------------------
diff --git a/css/responsive.css b/css/responsive.css
index 49ee694..e1a842d 100644
--- a/css/responsive.css
+++ b/css/responsive.css
@@ -1,16 +1,12 @@
 nav.breadcrumbs{
-  margin-left: 0px;
+  margin-left: -8px;
 }
-.toc-categories {
+#menu ul li.toc-categories {
   display:none;
 }
-@media (max-width: 1393px) {
-    #menu ul li.logo {
-      padding-left: 30px;
-    }
-   #menu ul li.expand-menu {
-    display: none;
-  }
+
+#menu ul li.menu-break {
+  display:none;
 }
 
 /*@media (max-width: 768px) {
@@ -33,6 +29,13 @@ nav.breadcrumbs{
   .mw {
     min-width: 0px;
   }
+  #menu ul li.logo {
+    padding-left: 30px;
+  }
+   #menu ul li.expand-menu {
+    display: none;
+  }
+
   #menu ul li, #menu ul li.d{
     display: none;
   }
@@ -42,18 +45,22 @@ nav.breadcrumbs{
   .int_title {
     text-align: left;
     width: auto;
-    margin: 20px 20px 0px 10px;
+    margin: 80px 20px 0px 20px;
   }
   .int_title:after {
     left: 0px;
   }
   .int_text {
     width: auto;
-    margin: 60px 10px 100px 10px;
+    margin: 20px 10px 100px 20px;
   }
   #menu ul li.force-expand, #menu ul li.d.force-expand {
     display:inline-block;
   }
+
+  #menu ul li.force-expand.toc-categories {
+    display: none;
+  }
   #menu ul li.force-expand ul li{
     display:block;
   }
@@ -65,6 +72,10 @@ nav.breadcrumbs{
     display: block;
   }
   #menu ul li.expand-menu {
+    display: inline-block;
+    float: right;
+  }
+  #menu ul br.menu-break {
     display: block;
   }
   #menu ul li.expand-menu, #menu ul li.expand-menu a {

http://git-wip-us.apache.org/repos/asf/drill/blob/3b66c466/css/style.css
----------------------------------------------------------------------
diff --git a/css/style.css b/css/style.css
index 611145d..9e524e1 100755
--- a/css/style.css
+++ b/css/style.css
@@ -679,7 +679,7 @@ table.intro a {
 }
 
 .int_text {
-	margin:60px auto 60px auto;
+	margin:40px auto 60px auto;
 	width:780px;
 }
 
@@ -735,7 +735,7 @@ ul.num {
 	font-size:16px;
 	font-weight:lighter;
 	margin:auto;
-	margin-top:60px;
+	margin-top:80px;
 	padding:0 0 15px 0;
 	position:relative;
 	text-align:center;
@@ -768,7 +768,7 @@ ul.num {
 
 .int_title h1 {
 	font-size:36px;
-	margin:0;
+	margin: 20px 0px 20px 0px;
 }
 
 .int_title:after {
@@ -879,6 +879,7 @@ li p {
   font-weight: inherit;
   padding: 0 0 0 8px;
   line-height: 20px;
+  font-family: "Lato";
   width: 44px;
 }
 #menu .search-bar input[placeholder] {

http://git-wip-us.apache.org/repos/asf/drill/blob/3b66c466/js/drill.js
----------------------------------------------------------------------
diff --git a/js/drill.js b/js/drill.js
index 77725e3..914945a 100644
--- a/js/drill.js
+++ b/js/drill.js
@@ -19,7 +19,8 @@ Drill.Site = {
   },
 
   menuIsExpanded : function() {
-    var item_to_check = $($("#menu ul li")[3]).css("display");
+    // Note: depends on status of documentation-menu item to check menu visibility. May be
a cleaner approach.
+    var item_to_check = $($("#menu ul li.documentation-menu")).css("display");
     return (item_to_check != 'none');
   },
 
@@ -91,7 +92,6 @@ Drill.Docs = {
     Drill.Docs.add_expand_contract_buttons();
     Drill.Docs.show_or_hide_on_click();
     Drill.Docs.setCurrentDoc();
-    Drill.Docs.watchCategoryBar();
     Drill.Docs.watchDocTocClicks();
     Drill.Docs.watchExpandTocClicks();
     Drill.Docs.permalinkSubHeaders();
@@ -121,22 +121,10 @@ Drill.Docs = {
     parent.children("span.contract").addClass('show');
   },
 
-  watchCategoryBar : function() {
-    $(window).scroll(function(){
-      var category_bar = $(".toc-categories");
-      if ($(this).scrollTop() > 35) {
-        category_bar.addClass('fixed');
-        $(".page-wrap div.int_title").addClass("margin_110");
-      } else {
-        category_bar.removeClass('fixed');
-        $(".page-wrap div.int_title").removeClass("margin_110");
-      }
-    });
-  },
-
   watchExpandTocClicks : function () {
     $(".expand-toc-icon").on("click", function(){
-      if($(".int_text .sidebar").css('left') == '0px'){
+      //  This relies on .sidebar's 'left' attribute...may be a cleaner approach
+      if($(".sidebar").css('left') == '0px'){
         Drill.Docs._contractSidebar();
       } else {
         Drill.Docs._expandSidebar();
@@ -221,11 +209,11 @@ Drill.Docs = {
   },
 
   _expandSidebar : function(){
-    $(".int_text .sidebar").addClass("force-expand");
+    $(".sidebar").addClass("force-expand");
   },
 
   _contractSidebar : function() {
-    $(".int_text .sidebar").removeClass("force-expand");
+    $(".sidebar").removeClass("force-expand");
   },
 
   _make_current : function(that) {


Mime
View raw message