Browse Source

Add H3 menu entries for leftnav:

 - Add H3 formatting and entries to leftnav, to docs css.

Docker-DCO-1.1-Signed-off-by: Jason Giedymin <jasong@apache.org> (github: JasonGiedymin)
Jason Giedymin 11 năm trước cách đây
mục cha
commit
e4742dbb94

+ 12 - 0
docs/theme/mkdocs/css/docs.css

@@ -24,6 +24,18 @@
   height: 100%;
   height: 100%;
 }
 }
 
 
+#leftnav h3 {
+  font-size: 10px;
+  font-weight: 700;
+  color: #394d54;
+  line-height: 1;
+  margin: 0px 0 10px 0;
+  padding-left: 20px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
 .content-body {
 .content-body {
   padding: 0px 0px 0px 20px;
   padding: 0px 0px 0px 20px;
 }
 }

+ 1 - 1
docs/theme/mkdocs/css/main.css

@@ -902,7 +902,7 @@ div + .form-inline {
   margin-bottom: 22px;
   margin-bottom: 22px;
 }
 }
 #leftnav .nav {
 #leftnav .nav {
-  margin: 0;
+  margin: 0, 0, 20px, 0;
 }
 }
 #leftnav .nav > li > a {
 #leftnav .nav > li > a {
   line-height: 22px;
   line-height: 22px;

+ 6 - 3
docs/theme/mkdocs/toc.html

@@ -1,5 +1,8 @@
-  {% for toc_item in toc %}
-    {% for toc_item in toc_item.children %}
-      <li class=""><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
+{% for toc_item in toc %}
+  {% for toc_h2_item in toc_item.children %}
+    <li class=""><a href="{{ toc_h2_item.url }}">{{ toc_h2_item.title }}</a></li>
+    {% for toc_h3_item in toc_h2_item.children %}
+      <h3><a href="{{ toc_h3_item.url }}">{{ toc_h3_item.title }}</a></h3>
+    {% endfor %}
   {% endfor %}
   {% endfor %}
 {% endfor %}
 {% endfor %}