just-the-docs 0.2.8 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -1
  3. data/_includes/css/custom.scss.liquid +1 -0
  4. data/_includes/css/just-the-docs.scss.liquid +7 -0
  5. data/_includes/fix_linenos.html +65 -0
  6. data/_includes/footer_custom.html +3 -0
  7. data/_includes/head.html +7 -7
  8. data/_includes/header_custom.html +0 -0
  9. data/_includes/nav.html +94 -35
  10. data/_includes/vendor/anchor_headings.html +53 -9
  11. data/_layouts/default.html +176 -76
  12. data/_layouts/table_wrappers.html +1 -1
  13. data/_sass/base.scss +14 -17
  14. data/_sass/code.scss +291 -74
  15. data/_sass/color_schemes/dark.scss +1 -1
  16. data/_sass/color_schemes/light.scss +0 -0
  17. data/_sass/content.scss +76 -5
  18. data/_sass/custom/custom.scss +0 -129
  19. data/_sass/labels.scss +5 -4
  20. data/_sass/layout.scss +48 -52
  21. data/_sass/modules.scss +20 -0
  22. data/_sass/navigation.scss +149 -50
  23. data/_sass/print.scss +40 -0
  24. data/_sass/search.scss +204 -48
  25. data/_sass/support/_functions.scss +2 -3
  26. data/_sass/support/_variables.scss +33 -9
  27. data/_sass/support/mixins/_layout.scss +1 -3
  28. data/_sass/support/mixins/_typography.scss +25 -22
  29. data/_sass/typography.scss +13 -7
  30. data/_sass/utilities/_layout.scss +74 -17
  31. data/_sass/utilities/_spacing.scss +69 -25
  32. data/_sass/vendor/normalize.scss/README.md +4 -75
  33. data/_sass/vendor/normalize.scss/normalize.scss +157 -235
  34. data/assets/css/just-the-docs-dark.scss +3 -0
  35. data/assets/css/just-the-docs-default.scss +8 -0
  36. data/assets/css/just-the-docs-light.scss +3 -0
  37. data/assets/js/just-the-docs.js +374 -202
  38. data/assets/js/zzzz-search-data.json +72 -0
  39. data/lib/tasks/search.rake +69 -10
  40. metadata +15 -15
  41. data/_sass/overrides.scss +0 -3
  42. data/_sass/vendor/normalize.scss/package.json +0 -70
  43. data/assets/css/dark-mode-preview.scss +0 -45
  44. data/assets/css/just-the-docs.scss +0 -49
  45. data/assets/js/dark-mode-preview.js +0 -23
  46. data/assets/js/search-data.json +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b82d0ff2dd0d215564fff51424001508816070eb2149176eb0755996d85c4185
4
- data.tar.gz: d6abbeaff372e4186304200fe186524bb62ec65ff001604d0f00d950bec2696a
3
+ metadata.gz: b0e639b03de7ff73dc4226935d3fc021ead88b3edc55c6efc68824c06fd8847c
4
+ data.tar.gz: 3e47409e50632b2cf5af0b8234a54fdb81998113771ef8bfcc6efb6ebc5d1469
5
5
  SHA512:
6
- metadata.gz: e6cc234af356d69049906530e45afc1e7cd25a7a526029e2d6e2c86f1e4fd252d0940bf6cf9142b84730c5f25046080874589c2060827d85ca16e9e5bcc40ac9
7
- data.tar.gz: ffb9ffedce9d009046d434a19ed1898b692c8cb41791dc9fbdd4b4a4e747d1afb6a295d794aa8473513231c45860e28c5e1ed528643269803e97971fb7168e7e
6
+ metadata.gz: d0c799638046d8577432f98dfc2feb459f58ff2d4eee328c7a68aaa898376f9dfffc2dfe940d00303b2019215ceb528e98b4fa7043908ef62f25fdb001c9658d
7
+ data.tar.gz: 185ac87f4811ab3b36320dda173e57d2105447955795b8272bb9c3f9adf93502b48c9592355c547412047610ec24dbc448b702ae54ca8be588a49403c8c5f879
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="right">
2
- <a href="https://badge.fury.io/rb/just-the-docs"><img src="https://badge.fury.io/rb/just-the-docs.svg" alt="Gem version"></a> <a href="https://github.com/pmarsceill/just-the-docs/actions"><img src="https://github.com/pmarsceill/just-the-docs/workflows/CI/badge.svg" alt="Build status"></a>
2
+ <a href="https://badge.fury.io/rb/just-the-docs"><img src="https://badge.fury.io/rb/just-the-docs.svg" alt="Gem version"></a> <a href="https://github.com/pmarsceill/just-the-docs/actions?query=workflow%3A%22Master+branch+CI%22"><img src="https://github.com/pmarsceill/just-the-docs/workflows/Master%20branch%20CI/badge.svg" alt="Build status"></a>
3
3
  </p>
4
4
  <br><br>
5
5
  <p align="center">
@@ -33,6 +33,10 @@ Or install it yourself as:
33
33
 
34
34
  $ gem install just-the-docs
35
35
 
36
+ Alternatively, you can run it inside Docker while developing your site
37
+
38
+ $ docker-compose up
39
+
36
40
  ## Usage
37
41
 
38
42
  [View the documentation](https://pmarsceill.github.io/just-the-docs/) for usage information.
@@ -0,0 +1 @@
1
+ @import "./custom/custom";
@@ -0,0 +1,7 @@
1
+ {% if site.logo %}
2
+ $logo: "{{ site.logo | absolute_url }}";
3
+ {% endif %}
4
+ @import "./support/support";
5
+ @import "./color_schemes/{{ include.color_scheme }}";
6
+ @import "./modules";
7
+ {% include css/custom.scss.liquid %}
@@ -0,0 +1,65 @@
1
+ {%- comment -%}
2
+ This file can be used to fix the HTML produced by Jekyll for highlighted
3
+ code with line numbers.
4
+
5
+ It works with `{% highlight some_language linenos %}...{% endhighlight %}`
6
+ and with the Kramdown option to add line numbers to fenced code.
7
+
8
+ The implementation was derived from the workaround provided by
9
+ Dmitry Hrabrov (DeXP) at
10
+ https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
11
+
12
+ EXPLANATION
13
+
14
+ The HTML produced by Rouge highlighting with lie numbers is of the form
15
+ `code table`. Jekyll (<= 4.1.1) always wraps the highlighted HTML
16
+ with `pre`. This wrapping is not only unnecessary, but also transforms
17
+ the conforming HTML produced by Rouge to non-conforming HTML, which
18
+ results in HTML validation error reports.
19
+
20
+ The fix removes the outer `pre` tags whenever they contain the pattern
21
+ `<table class="rouge-table">`.
22
+
23
+ Apart from avoiding HTML validation errors, the fix allows the use of
24
+ the [Jekyll layout for compressing HTML](http://jch.penibelst.de),
25
+ which relies on `pre` tags not being nested, according to
26
+ https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-172069842
27
+
28
+ USAGE
29
+
30
+ (Any names can be used for `some_var` and `some_language`.)
31
+
32
+ {% capture some_var %}
33
+ {% highlight some_language linenos %}
34
+ Some code
35
+ {% endhighlight %}
36
+ {% endcapture %}
37
+ {% include fix_linenos.html code=some_var %}
38
+
39
+ For code fences:
40
+
41
+ {% capture some_var %}
42
+ ```some_language
43
+ Some code
44
+ ```
45
+ {% endcapture %}
46
+ {% assign some_var = some_var | markdownify %}
47
+ {% include fix_linenos.html code=some_var %}
48
+
49
+ CAVEATS
50
+
51
+ The above does not work when `Some code` happens to contain the matched string
52
+ `<table class="rouge-table">`.
53
+
54
+ The use of this file overwrites the variable `fix_linenos_code` with `nil`.
55
+
56
+ {%- endcomment -%}
57
+
58
+ {% assign fix_linenos_code = include.code %}
59
+ {% if fix_linenos_code contains '<table class="rouge-table">' %}
60
+ {% assign fix_linenos_code = fix_linenos_code | replace: '<pre class="highlight">', '<pre>' %}
61
+ {% assign fix_linenos_code = fix_linenos_code | replace: "<pre><code", "<code" %}
62
+ {% assign fix_linenos_code = fix_linenos_code | replace: "</code></pre>", "</code>" %}
63
+ {% endif %}
64
+ {{ fix_linenos_code }}
65
+ {% assign fix_linenos_code = nil %}
@@ -0,0 +1,3 @@
1
+ {%- if site.footer_content -%}
2
+ <p class="text-small text-grey-dk-100 mb-0">{{ site.footer_content }}</p>
3
+ {%- endif -%}
@@ -2,17 +2,17 @@
2
2
  <meta charset="UTF-8">
3
3
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
4
4
 
5
- {% if site.plugins.jekyll-seo == nil %}
5
+ {% unless site.plugins contains "jekyll-seo-tag" %}
6
6
  <title>{{ page.title }} - {{ site.title }}</title>
7
7
 
8
8
  {% if page.description %}
9
9
  <meta name="Description" content="{{ page.description }}">
10
10
  {% endif %}
11
- {% endif %}
11
+ {% endunless %}
12
12
 
13
- <link rel="shortcut icon" href="{{ 'favicon.ico' | absolute_url }}" type="image/x-icon">
13
+ <link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}" type="image/x-icon">
14
14
 
15
- <link rel="stylesheet" href="{{ '/assets/css/just-the-docs.css' | absolute_url }}">
15
+ <link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
16
16
 
17
17
  {% if site.ga_tracking != nil %}
18
18
  <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
@@ -21,15 +21,15 @@
21
21
  function gtag(){dataLayer.push(arguments);}
22
22
  gtag('js', new Date());
23
23
 
24
- gtag('config', "{{ site.ga_tracking }}");
24
+ gtag('config', '{{ site.ga_tracking }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
25
25
  </script>
26
26
 
27
27
  {% endif %}
28
28
 
29
29
  {% if site.search_enabled != false %}
30
- <script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | absolute_url }}"></script>
30
+ <script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
31
31
  {% endif %}
32
- <script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | absolute_url }}"></script>
32
+ <script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
33
33
 
34
34
  <meta name="viewport" content="width=device-width, initial-scale=1">
35
35
 
File without changes
@@ -1,40 +1,99 @@
1
- <nav role="navigation" aria-label="Main navigation">
2
- <ul class="navigation-list">
3
- {%- assign pages_list = site.html_pages | sort:"nav_order" -%}
4
- {%- for node in pages_list -%}
1
+ <ul class="nav-list">
2
+ {%- assign titled_pages = include.pages
3
+ | where_exp:"item", "item.title != nil" -%}
4
+
5
+ {%- comment -%}
6
+ The values of `title` and `nav_order` can be numbers or strings.
7
+ Jekyll gives build failures when sorting on mixtures of different types,
8
+ so numbers and strings need to be sorted separately.
9
+
10
+ Here, numbers are sorted by their values, and come before all strings.
11
+ An omitted `nav_order` value is equivalent to the page's `title` value
12
+ (except that a numerical `title` value is treated as a string).
13
+
14
+ The case-sensitivity of string sorting is determined by `site.nav_sort`.
15
+ {%- endcomment -%}
16
+
17
+ {%- assign string_ordered_pages = titled_pages
18
+ | where_exp:"item", "item.nav_order == nil" -%}
19
+ {%- assign nav_ordered_pages = titled_pages
20
+ | where_exp:"item", "item.nav_order != nil" -%}
21
+
22
+ {%- comment -%}
23
+ The nav_ordered_pages have to be added to number_ordered_pages and
24
+ string_ordered_pages, depending on the nav_order value.
25
+ The first character of the jsonify result is `"` only for strings.
26
+ {%- endcomment -%}
27
+ {%- assign nav_ordered_groups = nav_ordered_pages
28
+ | group_by_exp:"item", "item.nav_order | jsonify | slice: 0" -%}
29
+ {%- assign number_ordered_pages = "" | split:"X" -%}
30
+ {%- for group in nav_ordered_groups -%}
31
+ {%- if group.name == '"' -%}
32
+ {%- assign string_ordered_pages = string_ordered_pages | concat: group.items -%}
33
+ {%- else -%}
34
+ {%- assign number_ordered_pages = number_ordered_pages | concat: group.items -%}
35
+ {%- endif -%}
36
+ {%- endfor -%}
37
+
38
+ {%- assign sorted_number_ordered_pages = number_ordered_pages | sort:"nav_order" -%}
39
+
40
+ {%- comment -%}
41
+ The string_ordered_pages have to be sorted by nav_order, and otherwise title
42
+ (where appending the empty string to a numeric title converts it to a string).
43
+ After grouping them by those values, the groups are sorted, then the items
44
+ of each group are concatenated.
45
+ {%- endcomment -%}
46
+ {%- assign string_ordered_groups = string_ordered_pages
47
+ | group_by_exp:"item", "item.nav_order | default: item.title | append:''" -%}
48
+ {%- if site.nav_sort == 'case_insensitive' -%}
49
+ {%- assign sorted_string_ordered_groups = string_ordered_groups | sort_natural:"name" -%}
50
+ {%- else -%}
51
+ {%- assign sorted_string_ordered_groups = string_ordered_groups | sort:"name" -%}
52
+ {%- endif -%}
53
+ {%- assign sorted_string_ordered_pages = "" | split:"X" -%}
54
+ {%- for group in sorted_string_ordered_groups -%}
55
+ {%- assign sorted_string_ordered_pages = sorted_string_ordered_pages | concat: group.items -%}
56
+ {%- endfor -%}
57
+
58
+ {%- assign pages_list = sorted_number_ordered_pages | concat: sorted_string_ordered_pages -%}
59
+
60
+ {%- for node in pages_list -%}
61
+ {%- if node.parent == nil -%}
5
62
  {%- unless node.nav_exclude -%}
6
- {%- if node.parent == nil -%}
7
- <li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
8
- {%- if page.parent == node.title or page.grand_parent == node.title -%}
9
- {%- assign first_level_url = node.url | absolute_url -%}
10
- {%- endif -%}
11
- <a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
12
- {%- if node.has_children -%}
13
- {%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
14
- <ul class="navigation-list-child-list ">
15
- {%- for child in children_list -%}
16
- <li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
17
- {%- if page.url == child.url or page.parent == child.title -%}
18
- {%- assign second_level_url = child.url | absolute_url -%}
19
- {%- endif -%}
20
- <a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
21
- {%- if child.has_children -%}
22
- {%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
23
- <ul class="navigation-list-child-list">
24
- {%- for grand_child in grand_children_list -%}
25
- <li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
26
- <a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
27
- </li>
28
- {%- endfor -%}
29
- </ul>
30
- {%- endif -%}
63
+ <li class="nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
64
+ {%- if node.has_children -%}
65
+ <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
66
+ {%- endif -%}
67
+ <a href="{{ node.url | absolute_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
68
+ {%- if node.has_children -%}
69
+ {%- assign children_list = pages_list | where: "parent", node.title -%}
70
+ <ul class="nav-list ">
71
+ {%- for child in children_list -%}
72
+ {%- unless child.nav_exclude -%}
73
+ <li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
74
+ {%- if child.has_children -%}
75
+ <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
76
+ {%- endif -%}
77
+ <a href="{{ child.url | absolute_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
78
+ {%- if child.has_children -%}
79
+ {%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
80
+ <ul class="nav-list">
81
+ {%- for grand_child in grand_children_list -%}
82
+ {%- unless grand_child.nav_exclude -%}
83
+ <li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}">
84
+ <a href="{{ grand_child.url | absolute_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
31
85
  </li>
86
+ {%- endunless -%}
32
87
  {%- endfor -%}
33
- </ul>
34
- {%- endif -%}
35
- </li>
88
+ </ul>
89
+ {%- endif -%}
90
+ </li>
91
+ {%- endunless -%}
92
+ {%- endfor -%}
93
+ </ul>
36
94
  {%- endif -%}
95
+ </li>
37
96
  {%- endunless -%}
38
- {%- endfor -%}
39
- </ul>
40
- </nav>
97
+ {%- endif -%}
98
+ {%- endfor -%}
99
+ </ul>
@@ -1,18 +1,44 @@
1
1
  {% capture headingsWorkspace %}
2
2
  {% comment %}
3
- Version 1.0.3
3
+ Copyright (c) 2018 Vladimir "allejo" Jimenez
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated documentation
7
+ files (the "Software"), to deal in the Software without
8
+ restriction, including without limitation the rights to use,
9
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the
11
+ Software is furnished to do so, subject to the following
12
+ conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+ OTHER DEALINGS IN THE SOFTWARE.
25
+ {% endcomment %}
26
+ {% comment %}
27
+ Version 1.0.7
4
28
  https://github.com/allejo/jekyll-anchor-headings
5
29
 
6
30
  "Be the pull request you wish to see in the world." ~Ben Balter
7
31
 
8
32
  Usage:
9
- {% include anchor_headings.html html=content %}
33
+ {% include anchor_headings.html html=content anchorBody="#" %}
10
34
 
11
35
  Parameters:
12
36
  * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
13
37
 
14
38
  Optional Parameters:
15
39
  * beforeHeading (bool) : false - Set to true if the anchor should be placed _before_ the heading's content
40
+ * anchorAttrs (string) : '' - Any custom HTML attributes that will be added to the `<a>` tag; you may NOT use `href`, `class` or `title`;
41
+ the `%heading%` and `%html_id%` placeholders are available
16
42
  * anchorBody (string) : '' - The content that will be placed inside the anchor; the `%heading%` placeholder is available
17
43
  * anchorClass (string) : '' - The class(es) that will be used for each anchor. Separate multiple classes with a space
18
44
  * anchorTitle (string) : '' - The `title` attribute that will be used for anchors
@@ -42,17 +68,22 @@
42
68
  {% assign nextChar = node | replace: '"', '' | strip | slice: 0, 1 %}
43
69
  {% assign headerLevel = nextChar | times: 1 %}
44
70
 
45
- <!-- If the level is cast to 0, it means it's not a h1-h6 tag, so let's try to fix it -->
71
+ <!-- If the level is cast to 0, it means it's not a h1-h6 tag, so let's see if we need to fix it -->
46
72
  {% if headerLevel == 0 %}
47
- {% if nextChar != '<' and nextChar != '' %}
73
+ <!-- Split up the node based on closing angle brackets and get the first one. -->
74
+ {% assign firstChunk = node | split: '>' | first %}
75
+
76
+ <!-- If the first chunk does NOT contain a '<', that means we've broken another HTML tag that starts with 'h' -->
77
+ {% unless firstChunk contains '<' %}
48
78
  {% capture node %}<h{{ node }}{% endcapture %}
49
- {% endif %}
79
+ {% endunless %}
50
80
 
51
81
  {% capture edited_headings %}{{ edited_headings }}{{ node }}{% endcapture %}
52
82
  {% continue %}
53
83
  {% endif %}
54
84
 
55
- {% assign _workspace = node | split: '</h' %}
85
+ {% capture _closingTag %}</h{{ headerLevel }}>{% endcapture %}
86
+ {% assign _workspace = node | split: _closingTag %}
56
87
  {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
57
88
  {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
58
89
  {% assign html_id = _idWorkspace[0] %}
@@ -64,7 +95,7 @@
64
95
  {% capture anchor %}{% endcapture %}
65
96
 
66
97
  {% if html_id and headerLevel >= minHeader and headerLevel <= maxHeader %}
67
- {% capture anchor %}href="#{{ html_id}}"{% endcapture %}
98
+ {% capture anchor %}href="#{{ html_id }}"{% endcapture %}
68
99
 
69
100
  {% if include.anchorClass %}
70
101
  {% capture anchor %}{{ anchor }} class="{{ include.anchorClass }}"{% endcapture %}
@@ -74,6 +105,10 @@
74
105
  {% capture anchor %}{{ anchor }} title="{{ include.anchorTitle | replace: '%heading%', header }}"{% endcapture %}
75
106
  {% endif %}
76
107
 
108
+ {% if include.anchorAttrs %}
109
+ {% capture anchor %}{{ anchor }} {{ include.anchorAttrs | replace: '%heading%', header | replace: '%html_id%', html_id }}{% endcapture %}
110
+ {% endif %}
111
+
77
112
  {% capture anchor %}<a {{ anchor }}>{{ include.anchorBody | replace: '%heading%', header | default: '' }}</a>{% endcapture %}
78
113
 
79
114
  <!-- In order to prevent adding extra space after a heading, we'll let the 'anchor' value contain it -->
@@ -93,8 +128,17 @@
93
128
  {{ header }}{{ anchor }}
94
129
  {% endif %}
95
130
  {{ include.bodySuffix }}
96
- </h{{ _workspace | last }}
131
+ </h{{ headerLevel }}>
97
132
  {% endcapture %}
133
+
134
+ <!--
135
+ If we have content after the `</hX>` tag, then we'll want to append that here so we don't lost any content.
136
+ -->
137
+ {% assign chunkCount = _workspace | size %}
138
+ {% if chunkCount > 1 %}
139
+ {% capture new_heading %}{{ new_heading }}{{ _workspace | last }}{% endcapture %}
140
+ {% endif %}
141
+
98
142
  {% capture edited_headings %}{{ edited_headings }}{{ new_heading }}{% endcapture %}
99
143
  {% endfor %}
100
- {% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }}
144
+ {% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }}
@@ -4,99 +4,199 @@ layout: table_wrappers
4
4
 
5
5
  <!DOCTYPE html>
6
6
 
7
- <html lang="{{ site.lang | default: "en-US" }}">
7
+ <html lang="{{ site.lang | default: 'en-US' }}">
8
8
  {% include head.html %}
9
9
  <body>
10
10
  <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
11
- <symbol id="link" viewBox="0 0 16 16">
11
+ <symbol id="svg-link" viewBox="0 0 24 24">
12
12
  <title>Link</title>
13
- <path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
13
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
14
+ <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
15
+ </svg>
16
+ </symbol>
17
+ <symbol id="svg-search" viewBox="0 0 24 24">
18
+ <title>Search</title>
19
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
20
+ <circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
21
+ </svg>
22
+ </symbol>
23
+ <symbol id="svg-menu" viewBox="0 0 24 24">
24
+ <title>Menu</title>
25
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
26
+ <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
27
+ </svg>
28
+ </symbol>
29
+ <symbol id="svg-arrow-right" viewBox="0 0 24 24">
30
+ <title>Expand</title>
31
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
32
+ <polyline points="9 18 15 12 9 6"></polyline>
33
+ </svg>
34
+ </symbol>
35
+ <symbol id="svg-doc" viewBox="0 0 24 24">
36
+ <title>Document</title>
37
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
38
+ <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
39
+ </svg>
14
40
  </symbol>
15
41
  </svg>
16
42
 
17
- <div class="page-wrap">
18
- <div class="side-bar">
19
- <div class="site-header">
20
- <a href="{{ site.url }}{{ site.baseurl }}" class="site-title lh-tight">{% include title.html %}</a>
21
- <button class="menu-button fs-3 js-main-nav-trigger" data-text-toggle="Hide" type="button">Menu</button>
22
- </div>
23
-
24
- <div class="navigation main-nav js-main-nav">
25
- {% include nav.html %}
26
- </div>
27
- <footer class="site-footer">
28
- <p class="text-small text-grey-dk-000 mb-4">This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.</p>
29
- </footer>
43
+ <div class="side-bar">
44
+ <div class="site-header">
45
+ <a href="{{ '/' | absolute_url }}" class="site-title lh-tight">{% include title.html %}</a>
46
+ <a href="#" id="menu-button" class="site-button">
47
+ <svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
48
+ </a>
30
49
  </div>
31
- <div class="main-content-wrap js-main-content" tabindex="0">
32
- <div class="main-content">
33
- <div class="page-header js-page-header">
34
- {% if site.search_enabled != false %}
35
- <div class="search">
36
- <div class="search-input-wrap">
37
- <input type="text" class="js-search-input search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
38
- <svg width="14" height="14" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="search-icon"><title>Search</title><g fill-rule="nonzero"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>
39
- </div>
40
- <div class="js-search-results search-results-wrap"></div>
41
- </div>
42
- {% endif %}
43
- {% if site.aux_links != nil %}
44
- <ul class="list-style-none text-small aux-nav">
45
- {% for link in site.aux_links %}
46
- <li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}"><a href="{{ link.last }}">{{ link.first }}</a></li>
47
- {% endfor %}
48
- </ul>
50
+ <nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
51
+ {% if site.just_the_docs.collections %}
52
+ {% assign collections_size = site.just_the_docs.collections | size %}
53
+ {% for collection_entry in site.just_the_docs.collections %}
54
+ {% assign collection_key = collection_entry[0] %}
55
+ {% assign collection_value = collection_entry[1] %}
56
+ {% assign collection = site[collection_key] %}
57
+ {% if collection_value.nav_exclude != true %}
58
+ {% if collections_size > 1 %}
59
+ <div class="nav-category">{{ collection_value.name }}</div>
60
+ {% endif %}
61
+ {% include nav.html pages=collection %}
49
62
  {% endif %}
63
+ {% endfor %}
64
+ {% else %}
65
+ {% include nav.html pages=site.html_pages %}
66
+ {% endif %}
67
+ </nav>
68
+ <footer class="site-footer">
69
+ This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
70
+ </footer>
71
+ </div>
72
+ <div class="main" id="top">
73
+ <div id="main-header" class="main-header">
74
+ {% if site.search_enabled != false %}
75
+ <div class="search">
76
+ <div class="search-input-wrap">
77
+ <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
78
+ <label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
79
+ </div>
80
+ <div id="search-results" class="search-results"></div>
50
81
  </div>
51
- <div class="page">
52
- {% unless page.url == "/" %}
53
- {% if page.parent %}
54
- <nav class="breadcrumb-nav">
55
- <ol class="breadcrumb-nav-list">
56
- {% if page.grand_parent %}
57
- <li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
58
- <li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
59
- {% else %}
60
- <li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
82
+ {% endif %}
83
+ {% include header_custom.html %}
84
+ {% if site.aux_links %}
85
+ <nav aria-label="Auxiliary" class="aux-nav">
86
+ <ul class="aux-nav-list">
87
+ {% for link in site.aux_links %}
88
+ <li class="aux-nav-list-item">
89
+ <a href="{{ link.last }}" class="site-button"
90
+ {% if site.aux_links_new_tab %}
91
+ target="_blank" rel="noopener noreferrer"
61
92
  {% endif %}
62
- <li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
63
- </ol>
64
- </nav>
65
- {% endif %}
66
- {% endunless %}
67
- <div id="main-content" class="page-content" role="main">
68
- {% if site.heading_anchors != false %}
69
- {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#link\"></use></svg>" anchorClass="anchor-heading" %}
70
- {% else %}
71
- {{ content }}
93
+ >
94
+ {{ link.first }}
95
+ </a>
96
+ </li>
97
+ {% endfor %}
98
+ </ul>
99
+ </nav>
100
+ {% endif %}
101
+ </div>
102
+ <div id="main-content-wrap" class="main-content-wrap">
103
+ {% unless page.url == "/" %}
104
+ {% if page.parent %}
105
+ {%- for node in pages_list -%}
106
+ {%- if node.parent == nil -%}
107
+ {%- if page.parent == node.title or page.grand_parent == node.title -%}
108
+ {%- assign first_level_url = node.url | absolute_url -%}
109
+ {%- endif -%}
110
+ {%- if node.has_children -%}
111
+ {%- assign children_list = pages_list | where: "parent", node.title -%}
112
+ {%- for child in children_list -%}
113
+ {%- if page.url == child.url or page.parent == child.title -%}
114
+ {%- assign second_level_url = child.url | absolute_url -%}
115
+ {%- endif -%}
116
+ {%- endfor -%}
117
+ {%- endif -%}
118
+ {%- endif -%}
119
+ {%- endfor -%}
120
+ <nav aria-label="Breadcrumb" class="breadcrumb-nav">
121
+ <ol class="breadcrumb-nav-list">
122
+ {% if page.grand_parent %}
123
+ <li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
124
+ <li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
125
+ {% else %}
126
+ <li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
127
+ {% endif %}
128
+ <li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
129
+ </ol>
130
+ </nav>
131
+ {% endif %}
132
+ {% endunless %}
133
+ <div id="main-content" class="main-content" role="main">
134
+ {% if site.heading_anchors != false %}
135
+ {% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
136
+ {% else %}
137
+ {{ content }}
138
+ {% endif %}
139
+
140
+ {% if page.has_children == true and page.has_toc != false %}
141
+ <hr>
142
+ <h2 class="text-delta">Table of contents</h2>
143
+ <ul>
144
+ {%- assign children_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%}
145
+ {% for child in children_list %}
146
+ <li>
147
+ <a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
148
+ </li>
149
+ {% endfor %}
150
+ </ul>
151
+ {% endif %}
152
+
153
+ {% capture footer_custom %}
154
+ {%- include footer_custom.html -%}
155
+ {% endcapture %}
156
+ {% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link %}
157
+ <hr>
158
+ <footer>
159
+ {% if site.back_to_top %}
160
+ <p><a href="#top" id="back-to-top">{{ site.back_to_top_text }}</a></p>
72
161
  {% endif %}
73
162
 
74
- {% if page.has_children == true and page.has_toc != false %}
75
- <hr>
76
- <h2 class="text-delta">Table of contents</h2>
77
- {% assign children_list = site.pages | sort:"nav_order" %}
78
- <ul>
79
- {% for child in children_list %}
80
- {% if child.parent == page.title and child.title != page.title %}
81
- <li>
82
- <a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
83
- </li>
84
- {% endif %}
85
- {% endfor %}
86
- </ul>
87
- {% endif %}
163
+ {{ footer_custom }}
88
164
 
89
- {% if site.footer_content != nil %}
90
- <hr>
91
- <footer role="contentinfo">
92
- <p class="text-small text-grey-dk-000 mb-0">{{ site.footer_content }}</p>
93
- </footer>
94
- {% endif %}
165
+ {% if site.last_edit_timestamp or site.gh_edit_link %}
166
+ <div class="d-flex mt-2">
167
+ {% if site.last_edit_timestamp and site.last_edit_time_format and page.last_modified_date %}
168
+ <p class="text-small text-grey-dk-000 mb-0 mr-2">
169
+ Page last modified: <span class="d-inline-block">{{ page.last_modified_date | date: site.last_edit_time_format }}</span>.
170
+ </p>
171
+ {% endif %}
172
+ {% if
173
+ site.gh_edit_link and
174
+ site.gh_edit_link_text and
175
+ site.gh_edit_repository and
176
+ site.gh_edit_branch and
177
+ site.gh_edit_view_mode
178
+ %}
179
+ <p class="text-small text-grey-dk-000 mb-0">
180
+ <a href="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}{% if site.gh_edit_source %}/{{ site.gh_edit_source }}{% endif %}/{{ page.path }}" id="edit-this-page">{{ site.gh_edit_link_text }}</a>
181
+ </p>
182
+ {% endif %}
183
+ </div>
184
+ {% endif %}
185
+ </footer>
186
+ {% endif %}
95
187
 
96
- </div>
97
188
  </div>
98
189
  </div>
99
- </div>
100
190
 
191
+ {% if site.search_enabled != false %}
192
+ {% if site.search.button %}
193
+ <a href="#" id="search-button" class="search-button">
194
+ <svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-search"></use></svg>
195
+ </a>
196
+ {% endif %}
197
+
198
+ <div class="search-overlay"></div>
199
+ {% endif %}
200
+ </div>
101
201
  </body>
102
202
  </html>