瀏覽代碼

Merge pull request #6567 from JasonGiedymin/add-h3

Add H3 menu entries for leftnav
Fred Lifton 11 年之前
父節點
當前提交
4898267988
共有 3 個文件被更改,包括 19 次插入4 次删除
  1. 12 0
      docs/theme/mkdocs/css/docs.css
  2. 1 1
      docs/theme/mkdocs/css/main.css
  3. 6 3
      docs/theme/mkdocs/toc.html

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

@@ -24,6 +24,18 @@
   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 {
   padding: 0px 0px 0px 20px;
 }

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

@@ -902,7 +902,7 @@ div + .form-inline {
   margin-bottom: 22px;
 }
 #leftnav .nav {
-  margin: 0;
+  margin: 0, 0, 20px, 0;
 }
 #leftnav .nav > li > a {
   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 %}