You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dm...@apache.org on 2020/09/30 21:04:58 UTC

[ignite] branch IGNITE-7595 updated: merging the navigation panel improvements of the docs

This is an automated email from the ASF dual-hosted git repository.

dmagda pushed a commit to branch IGNITE-7595
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/IGNITE-7595 by this push:
     new ee67611  merging the navigation panel improvements of the docs
ee67611 is described below

commit ee67611701de8f7d707a31bbf351c124ef2efe99
Author: Denis Magda <dm...@gridgain.com>
AuthorDate: Wed Sep 30 14:04:41 2020 -0700

    merging the navigation panel improvements of the docs
---
 docs/_includes/left-nav.html | 102 +++++++++++++++++++++++--------------------
 docs/_sass/docs.scss         |  96 +++++++++++++++++++++-------------------
 2 files changed, 106 insertions(+), 92 deletions(-)

diff --git a/docs/_includes/left-nav.html b/docs/_includes/left-nav.html
index 537878f..c1b5e1d 100644
--- a/docs/_includes/left-nav.html
+++ b/docs/_includes/left-nav.html
@@ -1,65 +1,71 @@
-
 {% assign prefix = site.attrs.base_url  %}
 {% assign normalized_path = page.url | replace: ".html","" | remove_first: prefix %}
 {% if page.toc != false %}
 <nav class='left-nav' data-swiftype-index='false'>
 
-      {% for guide in site.data.toc %}
-        <li>
-            {% if guide.items %}
+    {% for guide in site.data.toc %}
+    <li>
+        {% if guide.items %}
+
+        {% assign guide_class = 'collapsed' %}
 
-            {% assign guide_class = 'collapsed' %}
+        {% capture submenu %}
+        {% for chapter in guide.items %}
 
-            {% capture submenu %}
-                {% for chapter in guide.items %}
+        {% assign chapter_class = 'collapsed' %}
+        {% assign normalized_chapter_url = chapter.url | prepend: "/" %}
+        {% if normalized_path == normalized_chapter_url %}
+        {% assign guide_class = 'expanded' %}
+        {% assign chapter_class = 'expanded' %}
+        {% endif %}
 
-                    {% assign chapter_class = 'collapsed' %}
-                    {% if normalized_path == chapter.url %}
-                        {% assign guide_class = 'expanded' %}
-                        {% assign chapter_class = 'expanded' %}
-                    {% endif %}
+    <li>
+        {% if chapter.items %}
+        {% assign matching_items_count = chapter.items | where: 'url', normalized_path | size %}
+        {% if matching_items_count != 0 %}
+        {% assign chapter_class = 'expanded parent' %}
+        {% endif %}
+        <button
+                type='button'
+                class='{{chapter_class}} {% if normalized_path == normalized_chapter_url %}active{% endif %}'>
+            {{chapter.title}}<img class="state-indicator" src="{{'assets/images/left-nav-arrow.svg' | relative_url}}">
+        </button>
+        <nav class="sub_pages {{chapter_class}}">
 
-                    <li> 
-                        {% if chapter.items %}
-                            {% assign matching_items_count = chapter.items | where: 'url', normalized_path | size %}
-                            {% if matching_items_count != 0 %}
-                                {% assign chapter_class = 'expanded parent' %}
-                            {% endif %}
-                            <button
-                                type='button'
-                                class='{{chapter_class}} {% if normalized_path == chapter.url %}active{% endif %}'>{{chapter.title}}<img class="state-indicator" src="{{'assets/images/left-nav-arrow.svg' | relative_url}}"></button>
-                            <nav class="sub_pages {{chapter_class}}">
+            {% for subpage in chapter.items %}
+            {% assign normalized_subpage_url = subpage.url | prepend: "/" %}
+            {% if normalized_path == normalized_subpage_url %}
+            {% assign guide_class = 'expanded' %}
+            {% assign chapter_class = 'expanded' %}
+            {% endif %}
 
-                            {% for subpage in chapter.items %}
-                                  {% if normalized_path == subpage.url %}
-                                     {% assign guide_class = 'expanded' %}
-                                     {% assign chapter_class = 'expanded' %}
-                                  {% endif %}
+    <li><a href="{{prefix}}/{{subpage.url}}"
+           class='{% if normalized_path == normalized_subpage_url %}active{% endif %}'>{{subpage.title}}</a></li>
+    {% endfor %}
+</nav>
+{% else %}
+<a href="{{prefix}}{{chapter.url|relative_url}}"
 
-								  <li><a href="{{prefix}}/{{subpage.url}}" class='{% if normalized_path == subpage.url %}active{% endif %}'>{{subpage.title}}</a></li>
-                            {% endfor %}
-                            </nav>
-                        {% else %}
-                            <a href="{{prefix}}{{chapter.url|relative_url}}"
+   class='{% if normalized_path == normalized_chapter_url %}active{% endif %}'
+>{{chapter.title}}</a>
+{% endif %}
+</li>
+{% endfor %}
 
-                                class='{% if normalized_path == chapter.url %}active{% endif %}'
-                            >{{chapter.title}}</a>
-                        {% endif %}
-                    </li>
-                {% endfor %}
-              
-            {% endcapture %}
+{% endcapture %}
 
-			<button type='button' data-guide-url="{{guide.url}}" class='group-toggle {{guide_class}} {% if page.url contains guide.url %}parent{% endif %}'>{{guide.title}}<img class="state-indicator" src="{{'assets/images/left-nav-arrow.svg'|relative_url}}"></button>
-             <nav class='nav-group {{guide_class}}'>
-            {{ submenu }}         
-             </nav>   
-            {% else %}
+<button type='button' data-guide-url="{{guide.url}}"
+        class='group-toggle {{guide_class}} {% if page.url contains guide.url %}parent{% endif %}'>{{guide.title}}<img
+        class="state-indicator" src="{{'assets/images/left-nav-arrow.svg'|relative_url}}"></button>
+<nav class='nav-group {{guide_class}}'>
+    {{ submenu }}
+</nav>
+{% else %}
 
-            <a href="{{prefix}}{{guide.url|relative_url}}" class='{% if guide.url == normalized_path %}active{% endif %}' >{{guide.title}}</a>
-            {% endif %}
-        </li>
-    {% endfor %}
+<a href="{{prefix}}{{guide.url|relative_url}}" class='{% if guide.url == normalized_path %}active{% endif %}'>{{guide.title}}</a>
+{% endif %}
+</li>
+{% endfor %}
 </nav>
 <div class="left-nav__overlay"></div>
 {% endif %}
diff --git a/docs/_sass/docs.scss b/docs/_sass/docs.scss
index 61a5ae6..2733d28 100644
--- a/docs/_sass/docs.scss
+++ b/docs/_sass/docs.scss
@@ -7,65 +7,77 @@ section.page-docs {
     line-height: 20px;
     max-width: 1440px;
     margin: auto;
+    width: 100%;
 
     &>article {
-        box-shadow: -1px 13px 20px 0 #f0f2f4;
+        // box-shadow: -1px 13px 20px 0 #696c70;
+        border-left: 1px solid #eeeeee;
         background-color: #ffffff;
         padding: 0 50px 30px;
         grid-area: content;
         overflow: hidden;
         font-family: sans-serif;
-        font-size: 14px;
+        font-size: 16px;
         color: #545454;
-        line-height: 26px;
+        line-height: 1.6em;
 
         h1, h2, h3:not(.discrete), h4, h5, strong, th {
             font-family: 'Open Sans';
         }
 
+        li {
+            margin-bottom: 0.5em;
+
+            > p {
+                margin-top: 0;
+                margin-bottom: 0;
+            }
+        }
+
         @media (max-width: 800px) {
             padding-left: 15px;
             padding-right: 15px
         }
     }
 
-
     .edit-link {
-        position:relative; 
+        position:relative;
         top: 10px;
-        right:10px; 
-        float: right; 
+        right:10px;
+        float: right;
         padding-top: calc(var(--header-height) + var(--padding-top));
         margin-top: calc((-1 * var(--header-height)));
     }
 
     h1, h2, h3:not(.discrete), h4, h5 {
+        margin-bottom: 0;
 
         &[id] {
-            margin-top: calc((-1 * var(--header-height)));
-            padding-top: calc(var(--header-height) + var(--padding-top));
+            margin-top:  var(--margin-top);
+            margin-bottom: calc(var(--margin-top) * 0.5);
+            // padding-top: calc(var(--header-height) + var(--padding-top));
             z-index: -1;
         }
     }
 
-	.toc > ul {
-   		 margin: 0;
-	}
+    .toc > ul {
+        margin: 0;
+    }
 
 
-	.content > .pygments.highlight {
-	      margin-top: 0px;
-   	}
+    .content > .pygments.highlight {
+        margin-top: 0px;
+    }
 
-	.title {
-	  	font-style: italic;
-	 }
+    .title {
+        font-style: italic;
+    }
 
     .checkmark:before {
-       content: '\f14a'; 
-       visibility: visible;
-       font-family: FontAwesome;
-       color: #00a100;
+        content: '\f14a';
+        visibility: visible;
+        font-family: FontAwesome;
+        color: #00a100;
     }
     .checkmark {
         visibility: hidden;
@@ -76,14 +88,14 @@ section.page-docs {
         --margin-top: 1em;
     }
     h2[id] {
+        --margin-top: 1.2em;
+    }
+    .toc > h2 {
         --margin-top: 1em;
     }
-	.toc > h2 {
-	  --margin-top: 1em;
-	}
 
     h3[id] {
-        --margin-top: 1em;
+        --margin-top: 1.2em;
     }
     h4[id] {
         --margin-top: 0.5em;
@@ -103,35 +115,30 @@ section.page-docs {
             max-height: 450px;
         }
     }
-	strong {
-	  color: #757575;
-	}
+    strong {
+        color: #757575;
+    }
 
-	th.valign-top,td.valign-top { 
-		vertical-align:top;
-	}
+    th.valign-top,td.valign-top {
+        vertical-align:top;
+    }
 
     table {
         margin: 16px 0;
     }
 
     table tr td {
-      hyphens: auto;
+        hyphens: auto;
     }
 
-    table tr td code{
-      hyphens: none;
+    table thead,table tfoot {
+        background:#f7f8f7;
+        color: #757575;
     }
-
-
-	table thead,table tfoot {
-		background:#f7f8f7; 
-	  color: #757575;
-	}
-	table tr.even,table tr.alt{background:#f8f8f7}
+    table tr.even,table tr.alt{background:#f8f8f7}
     table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
-}
 
+}
 .copyright {
     margin-top: 3em;
     padding-top: 1em;
@@ -155,7 +162,7 @@ body.hide-left-nav {
 }
 .left-nav {
     max-height: calc(100vh );
-    grid-area: left-nav;    
+    grid-area: left-nav;
 }
 .right-nav {
     grid-area: right-nav;
@@ -215,3 +222,4 @@ body.hide-left-nav {
         height: 150px;
     }
 }
+s