jekyll-rtd-theme 1.1.4 → 2.0.0.pre.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +46 -29
  3. data/_includes/assets/defaults.liquid +69 -0
  4. data/_includes/assets/i18n.liquid +1 -0
  5. data/_includes/{reset → assets}/site_pages.liquid +0 -0
  6. data/_includes/assets/sw.caches.js +43 -0
  7. data/_includes/{extend → assets}/tabs.liquid +0 -0
  8. data/_includes/{reset → assets}/workdir.liquid +1 -14
  9. data/_includes/class/_breadcrumbs.liquid +33 -0
  10. data/_includes/class/_footer.liquid +41 -0
  11. data/_includes/{extend/toctree.liquid → class/_toctree.extend.liquid} +8 -17
  12. data/_includes/class/_toctree.liquid +23 -0
  13. data/_includes/class/addons-wrap.liquid +26 -0
  14. data/_includes/class/addons/analytics.liquid +11 -0
  15. data/_includes/class/addons/github.liquid +21 -0
  16. data/_includes/class/content-wrap.liquid +20 -0
  17. data/_includes/class/sidebar-wrap.liquid +18 -0
  18. data/_includes/head/links.liquid +16 -0
  19. data/_includes/head/metadata.liquid +21 -0
  20. data/_includes/head/script.extension.liquid +24 -0
  21. data/_includes/head/script.liquid +16 -0
  22. data/_includes/head/script.schema.liquid +27 -0
  23. data/_includes/head/title.liquid +1 -0
  24. data/_includes/{extend/list.liquid → list.extend.liquid} +5 -5
  25. data/_includes/list.liquid +3 -3
  26. data/_includes/shortcodes/danger.liquid +9 -0
  27. data/_includes/shortcodes/mermaid.liquid +1 -0
  28. data/_includes/shortcodes/note.liquid +9 -0
  29. data/_includes/shortcodes/tip.liquid +9 -0
  30. data/_includes/shortcodes/warning.liquid +9 -0
  31. data/_layouts/default.liquid +17 -233
  32. data/_layouts/plugins/compress.liquid +13 -10
  33. data/_layouts/plugins/extension.liquid +32 -22
  34. data/_sass/@primer/base/base.scss +90 -0
  35. data/_sass/@primer/base/index.scss +6 -0
  36. data/_sass/@primer/base/kbd.scss +21 -0
  37. data/_sass/@primer/base/normalize.scss +423 -0
  38. data/_sass/@primer/base/typography-base.scss +100 -0
  39. data/_sass/@primer/breadcrumb/breadcrumb.scss +28 -0
  40. data/_sass/@primer/breadcrumb/index.scss +3 -0
  41. data/_sass/@primer/buttons/button-group.scss +91 -0
  42. data/_sass/@primer/buttons/button.scss +296 -0
  43. data/_sass/@primer/buttons/index.scss +4 -0
  44. data/_sass/@primer/buttons/misc.scss +205 -0
  45. data/_sass/@primer/forms/form-control.scss +278 -0
  46. data/_sass/@primer/forms/form-group.scss +279 -0
  47. data/_sass/@primer/forms/form-select.scss +38 -0
  48. data/_sass/@primer/forms/form-validation.scss +369 -0
  49. data/_sass/@primer/forms/index.scss +7 -0
  50. data/_sass/@primer/forms/input-group.scss +53 -0
  51. data/_sass/@primer/forms/radio-group.scss +43 -0
  52. data/_sass/@primer/markdown/blob-csv.scss +31 -0
  53. data/_sass/@primer/markdown/code.scss +73 -0
  54. data/_sass/@primer/markdown/headings.scss +72 -0
  55. data/_sass/@primer/markdown/images.scss +131 -0
  56. data/_sass/@primer/markdown/index.scss +8 -0
  57. data/_sass/@primer/markdown/lists.scss +76 -0
  58. data/_sass/@primer/markdown/markdown-body.scss +99 -0
  59. data/_sass/@primer/markdown/tables.scss +38 -0
  60. data/_sass/@primer/support/index.scss +11 -0
  61. data/_sass/@primer/support/mixins/buttons.scss +184 -0
  62. data/_sass/@primer/support/mixins/layout.scss +55 -0
  63. data/_sass/@primer/support/mixins/misc.scss +32 -0
  64. data/_sass/@primer/support/mixins/typography.scss +88 -0
  65. data/_sass/@primer/support/variables/color-system.scss +243 -0
  66. data/_sass/@primer/support/variables/colors.scss +55 -0
  67. data/_sass/@primer/support/variables/layout.scss +149 -0
  68. data/_sass/@primer/support/variables/misc.scss +42 -0
  69. data/_sass/@primer/support/variables/typography.scss +43 -0
  70. data/_sass/@primer/utilities/animations.scss +187 -0
  71. data/_sass/@primer/utilities/borders.scss +184 -0
  72. data/_sass/@primer/utilities/box-shadow.scss +25 -0
  73. data/_sass/@primer/utilities/colors.scss +185 -0
  74. data/_sass/@primer/utilities/details.scss +34 -0
  75. data/_sass/@primer/utilities/flexbox.scss +121 -0
  76. data/_sass/@primer/utilities/index.scss +14 -0
  77. data/_sass/@primer/utilities/layout.scss +134 -0
  78. data/_sass/@primer/utilities/margin.scss +68 -0
  79. data/_sass/@primer/utilities/padding.scss +59 -0
  80. data/_sass/@primer/utilities/typography.scss +325 -0
  81. data/_sass/@primer/utilities/visibility-display.scss +82 -0
  82. data/_sass/_font-face.scss +65 -0
  83. data/_sass/_icons.scss +57 -0
  84. data/_sass/_layout.scss +75 -0
  85. data/_sass/_reset.scss +21 -0
  86. data/_sass/_root.scss +9 -0
  87. data/_sass/_variables.scss +32 -0
  88. data/_sass/class/addons-wrap.scss +39 -0
  89. data/_sass/class/admonition.scss +47 -0
  90. data/_sass/class/container.scss +11 -0
  91. data/_sass/class/content-wrap.scss +4 -0
  92. data/_sass/class/header.scss +10 -0
  93. data/_sass/class/highlight.scss +214 -0
  94. data/_sass/class/markdown-body.scss +57 -0
  95. data/_sass/class/sidebar-wrap.scss +83 -0
  96. data/_sass/class/title.scss +12 -0
  97. data/_sass/theme.scss +30 -0
  98. data/assets/404.liquid +3 -3
  99. data/assets/css/theme.min.css +1 -0
  100. data/assets/css/theme.scss +4 -0
  101. data/assets/js/mermaid.min.js +5 -5
  102. data/assets/js/theme.js +305 -1
  103. data/assets/js/theme.min.js +1 -0
  104. data/assets/pages.liquid +1 -1
  105. data/assets/robots.liquid +1 -1
  106. data/assets/search.liquid +5 -21
  107. data/assets/sitemap.liquid +2 -2
  108. data/assets/sw.caches.liquid +8 -0
  109. metadata +100 -67
  110. data/_includes/addons.liquid +0 -24
  111. data/_includes/addons/analytics.liquid +0 -8
  112. data/_includes/addons/github.liquid +0 -6
  113. data/_includes/addons/i18n.liquid +0 -13
  114. data/_includes/addons/plugins.liquid +0 -6
  115. data/_includes/album.liquid +0 -7
  116. data/_includes/assets/common.js +0 -65
  117. data/_includes/assets/custom.js +0 -0
  118. data/_includes/assets/custom.scss +0 -0
  119. data/_includes/assets/search.js +0 -76
  120. data/_includes/breadcrumbs.liquid +0 -43
  121. data/_includes/extra/footer.html +0 -0
  122. data/_includes/extra/head.html +0 -0
  123. data/_includes/footer.liquid +0 -37
  124. data/_includes/i18n/en.liquid +0 -29
  125. data/_includes/i18n/es.liquid +0 -29
  126. data/_includes/i18n/fr.liquid +0 -29
  127. data/_includes/i18n/it.liquid +0 -29
  128. data/_includes/i18n/ja.liquid +0 -29
  129. data/_includes/i18n/ko.liquid +0 -29
  130. data/_includes/i18n/ru.liquid +0 -29
  131. data/_includes/i18n/sv.liquid +0 -29
  132. data/_includes/i18n/zh-cn.liquid +0 -29
  133. data/_includes/reset/defaults.liquid +0 -86
  134. data/_includes/reset/i18n.liquid +0 -31
  135. data/_includes/reset/languages.liquid +0 -110
  136. data/_includes/toctree.liquid +0 -22
  137. data/_sass/_album.scss +0 -19
  138. data/_sass/_embed.scss +0 -23
  139. data/_sass/fluid.scss +0 -7
  140. data/_sass/jekyll-rtd-theme.scss +0 -128
  141. data/assets/css/rougify/base16.css +0 -1
  142. data/assets/css/rougify/base16.dark.css +0 -1
  143. data/assets/css/rougify/base16.light.css +0 -1
  144. data/assets/css/rougify/base16.monokai.css +0 -1
  145. data/assets/css/rougify/base16.monokai.dark.css +0 -1
  146. data/assets/css/rougify/base16.monokai.light.css +0 -1
  147. data/assets/css/rougify/base16.solarized.css +0 -1
  148. data/assets/css/rougify/base16.solarized.dark.css +0 -1
  149. data/assets/css/rougify/base16.solarized.light.css +0 -1
  150. data/assets/css/rougify/bw.css +0 -1
  151. data/assets/css/rougify/colorful.css +0 -1
  152. data/assets/css/rougify/github.css +0 -1
  153. data/assets/css/rougify/gruvbox.css +0 -1
  154. data/assets/css/rougify/gruvbox.dark.css +0 -1
  155. data/assets/css/rougify/gruvbox.light.css +0 -1
  156. data/assets/css/rougify/igorpro.css +0 -1
  157. data/assets/css/rougify/magritte.css +0 -1
  158. data/assets/css/rougify/molokai.css +0 -1
  159. data/assets/css/rougify/monokai.css +0 -1
  160. data/assets/css/rougify/monokai.sublime.css +0 -1
  161. data/assets/css/rougify/pastie.css +0 -1
  162. data/assets/css/rougify/thankful_eyes.css +0 -1
  163. data/assets/css/rougify/tulip.css +0 -1
  164. data/assets/css/theme.css +0 -4
  165. data/assets/js/anchor.min.js +0 -9
  166. data/assets/js/html5shiv.min.js +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23a52d768800e6af7ea1d5c4c35a91cee56046bade55174bcc0eb4d31e9ed676
4
- data.tar.gz: 3d005a4cb29f27c512492cccfcdc9da428303af00df3f2ba5a7f3bc3a22e5c07
3
+ metadata.gz: 9d5f271a444c19902ca9cef4a2a5861863fa6afa932326101d2a4d1a3db4b8d3
4
+ data.tar.gz: 78baf17dd546c3717a466a51862545ed22f980c935bf5b40243027f7ce98b184
5
5
  SHA512:
6
- metadata.gz: 022acda52128c5ced54cb84635fd067ff26ed77c99a8bc4e50762ba40d3769104d739e82ad08f56958b802f8eed716407c7d1e094cdcec75c7e3c264791cf0a8
7
- data.tar.gz: 68f91d2be6fb03d1c00b2d29c84acd297c4539478a6b1622fbf69dee85a71b91d8ea1326d98e1687b6676621bba2027e2e858602bb24f8333eaaa0a6bc7815c5
6
+ metadata.gz: aebf7861d009713ce800cb0fdef796ec33b53c743bcfbfd139a0589f3c7c46dfc15229bbd626946057a448a3bd4a1791c4f39278e7baf3749ac6d99c159281ff
7
+ data.tar.gz: '09f541286274d91918604f15439f9d4faeff580cf5a798322d2be370e6f5d85e73758c936fe5c104f35cc386d60b3e71ede3f7cdc81df9f84503d1f69b88ab26'
data/README.md CHANGED
@@ -1,39 +1,56 @@
1
1
  # jekyll-rtd-theme
2
- [![](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)][repository]
3
- [![](https://img.shields.io/gem/v/jekyll-rtd-theme)][rubygem]
4
- [![](https://img.shields.io/gem/dt/jekyll-rtd-theme)][rubygem]
5
- [![](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)][cdn]
6
- [![](https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme/badge)][codefactor]
7
- [![](https://img.shields.io/badge/featured%20on-JekyllThemes-red.svg)](https://jekyll-themes.com)
8
- [![](https://badges.gitter.im/rundocs/jekyll-rtd-theme.svg)][gitter]
9
2
 
10
- GitHub-flavored docs theme for Jekyll, based on sphinx_rtd_theme
3
+ ![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)
4
+ ![jsDelivr](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)
11
5
 
12
- <img class="shadow-box" width="50%" alt="jekyll-rtd-theme" src="https://user-images.githubusercontent.com/68011645/89026666-ad3a8680-d35b-11ea-9f4b-d3fe26ae12ed.png">
6
+ Opinionated github flavored documentation theme for open source projects, with few options, just use it!
7
+
8
+ # Waiting for your contribution 2.0
13
9
 
14
10
  ## Quick start
11
+
15
12
  ```yml
16
13
  remote_theme: rundocs/jekyll-rtd-theme
17
14
  ```
15
+
18
16
  You can [generate](https://github.com/rundocs/starter-slim/generate) with the same files and folders from [rundocs/starter-slim](https://github.com/rundocs/starter-slim/)
19
17
 
20
- ## Features
21
- - Automatically generate nested sidebar based on directory
22
- - Multi-language supported
23
- - Search engine optimized
24
- - Document search (RegExp supported)
25
- - Support third-party comments
26
- - Google, Baidu, CNZZ Analytics supported
27
- - Just need one file `_config.yml` to configure site
28
-
29
- ## Documents
30
- For full documentation, please refer to [rundocs.io](https://rundocs.io/), You can also view [the theme related tests documentation](https://rundocs.github.io/jekyll-rtd-theme)
31
-
32
- ## License
33
- The theme is available as open source under the terms of the [MIT License](https://github.com/rundocs/jekyll-rtd-theme/blob/master/LICENSE).
34
-
35
- [repository]: https://github.com/rundocs/jekyll-rtd-theme
36
- [rubygem]: https://rubygems.org/gems/jekyll-rtd-theme
37
- [cdn]: https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme/
38
- [codefactor]: https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme
39
- [gitter]: https://gitter.im/rundocs/jekyll-rtd-theme?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
18
+ ## Options
19
+
20
+ ```yml
21
+ title: Your awesome title
22
+ lang: en
23
+ description: Write an awesome description for your new site here
24
+
25
+ # plugin options
26
+ readme_index:
27
+ with_frontmatter: true
28
+
29
+
30
+ # optional settings
31
+ meta:
32
+ key1: value1
33
+ key2: value2
34
+ .
35
+ .
36
+ .
37
+
38
+ google:
39
+ gtag:
40
+ adsense:
41
+
42
+ mermaid:
43
+ custom: # mermaid link
44
+ initialize: # mermaid options
45
+
46
+
47
+ # optional plugins
48
+ plugins:
49
+ - jemoji
50
+ - jekyll-avatar
51
+ - jekyll-mentions
52
+ ```
53
+
54
+ ## The license
55
+
56
+ The theme is available as open source under the terms of the MIT License
@@ -0,0 +1,69 @@
1
+ {%- include assets/site_pages.liquid -%}
2
+ {%- include assets/i18n.liquid -%}
3
+
4
+ {%- comment %} variables {% endcomment -%}
5
+ {%- assign version = "2.0.0-beta1" -%}
6
+ {%- assign docs = site.github -%}
7
+ {%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%}
8
+
9
+ {%- assign rest_created_at = rest.created_at | default: site.time -%}
10
+ {%- assign rest_updated_at = rest.updated_at | default: site.time -%}
11
+
12
+ {%- assign lang = site.lang | default: "en" -%}
13
+ {%- assign author = docs.owner.name | default: docs.owner_name -%}
14
+
15
+ {%- comment %} schema {% endcomment -%}
16
+ {%- assign schema_date = page.date | default: rest_created_at | date_to_xmlschema -%}
17
+ {%- assign schema_modi = site.time | date_to_xmlschema -%}
18
+ {%- assign schema_surl = page.url | absolute_url | xml_escape -%}
19
+
20
+ {%- comment %} title {% endcomment -%}
21
+ {%- case page.url -%}
22
+ {%- when "/" -%}
23
+ {%- assign title = site.title | append: " · " | append: site.description | truncate: 110 -%}
24
+ {%- when "/search.html" -%}
25
+ {%- assign title = __.search | default: "Search" | append: " · " | append: site.title | truncate: 110 -%}
26
+ {%- when "/404.html" -%}
27
+ {%- assign title = "404" | append: " · " | append: site.title | truncate: 110 -%}
28
+ {%- else -%}
29
+ {%- assign title = page.title | default: page.url | append: " · " | append: site.title | truncate: 110 -%}
30
+ {%- endcase -%}
31
+
32
+ {%- comment %} description {% endcomment -%}
33
+ {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
34
+
35
+ {% comment %} debug {% endcomment %}
36
+ {%- if site.debug -%}
37
+ {%- assign cdn = site.baseurl -%}
38
+ {%- else -%}
39
+ {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
40
+ {%- endif -%}
41
+
42
+ {% comment %} content {% endcomment %}
43
+ {%- assign content = content
44
+ | replace: '’', "'"
45
+ | replace: "“", '"'
46
+ | replace: '”', '"'
47
+ | replace: "highlighter-rouge", "highlighter-rouge notranslate" -%}
48
+
49
+
50
+ {% comment %} prev and next {% endcomment %}
51
+ {%- assign workdir_files = site_files | where_exp: "item", "item.dir == page.dir" -%}
52
+
53
+ {%- assign index = 0 -%}
54
+ {%- for item in workdir_files %}
55
+ {%- if item.url == page.url %}
56
+ {%- assign index = forloop.index -%}
57
+ {%- endif %}
58
+ {%- endfor -%}
59
+
60
+ {%- for item in workdir_files -%}
61
+ {%- assign index_prev = index | minus: 1 -%}
62
+ {%- assign index_next = index | plus: 1 -%}
63
+ {%- if forloop.index == index_prev -%}
64
+ {%- assign prev = item -%}
65
+ {%- endif %}
66
+ {%- if forloop.index == index_next and page.url != page.dir -%}
67
+ {%- assign next = item -%}
68
+ {%- endif %}
69
+ {%- endfor -%}
@@ -0,0 +1 @@
1
+ {%- assign __ = site.translate | default: site.data.translate -%}
@@ -0,0 +1,43 @@
1
+ self.addEventListener("activate", function (event) {
2
+ let cacheWhitelist = ["rundocs-{{ version }}"];
3
+
4
+ event.waitUntil(
5
+ caches.keys().then(function (keyList) {
6
+ return Promise.all(
7
+ keyList.map(function (key) {
8
+ if (cacheWhitelist.indexOf(key) === -1) {
9
+ return caches.delete(key);
10
+ }
11
+ })
12
+ );
13
+ })
14
+ );
15
+ });
16
+
17
+ self.addEventListener("fetch", function (e) {
18
+ if (
19
+ /^https:\/\/cdn\.jsdelivr\.net\/gh\/rundocs\/jekyll-rtd-theme@.+/.exec(
20
+ e.request.url
21
+ )
22
+ ) {
23
+ e.respondWith(
24
+ caches.match(e.request).then(function (resp) {
25
+ if (resp !== undefined) {
26
+ return resp;
27
+ } else {
28
+ return fetch(e.request, {
29
+ cache: "no-store",
30
+ })
31
+ .then(function (resp) {
32
+ let clone = resp.clone();
33
+ caches.open("rundocs-{{ version }}").then(function (cache) {
34
+ cache.put(e.request, clone);
35
+ });
36
+ return resp;
37
+ })
38
+ .catch(console.log);
39
+ }
40
+ })
41
+ );
42
+ }
43
+ });
File without changes
@@ -1,13 +1,6 @@
1
1
  {% comment %} Start from the language chapter(eg: en-us) or root(/) {% endcomment %}
2
2
  {%- assign workdir = include.workdir | default: "/" -%}
3
3
 
4
- {%- if page.dir != "/" -%}
5
- {%- assign chapter = page.dir | remove_first: "/" | split: "/" | first -%}
6
- {%- if languages contains chapter -%}
7
- {%- capture workdir %}/{{ chapter }}/{% endcapture -%}
8
- {%- endif -%}
9
- {%- endif -%}
10
-
11
4
  {%- assign workdir_level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
12
5
  {%- assign workdir_files = site_files | where_exp: "item", "item.dir == workdir" -%}
13
6
 
@@ -19,13 +12,7 @@
19
12
  {%- assign dir = item.dir | replace: workdir, temp | split: "@@" | first -%}
20
13
  {% comment %} In the current subdirectory {% endcomment %}
21
14
  {%- if workdir == dir -%}
22
- {% comment %} Root directory does not display other languages {% endcomment %}
23
- {%- if workdir == "/" -%}
24
- {%- assign language = item.dir | replace: "/", "" -%}
25
- {%- unless languages contains language %}{{ item.dir }}|{% endunless -%}
26
- {%- else -%}
27
- {{ item.dir }}|
28
- {%- endif -%}
15
+ {{ item.dir }}|
29
16
  {%- endif -%}
30
17
  {%- endif -%}
31
18
  {%- endfor -%}
@@ -0,0 +1,33 @@
1
+ <div class="navigation-top d-flex flex-justify-between">
2
+ <ul class="breadcrumb" role="navigation" aria-label="breadcrumbs navigation">
3
+ <li class="breadcrumb-item">
4
+ <a href="{{ site.baseurl }}/">
5
+ <i class="fa fa-home"></i>
6
+ </a>
7
+ </li>
8
+ {%- case page.url -%}
9
+ {%- when "/search.html" -%}
10
+ <li class="breadcrumb-item" aria-current="page">
11
+ {{ __.search | default: "Search" }}
12
+ </li>
13
+ {%- when "/404.html" -%}
14
+ <li class="breadcrumb-item" aria-current="page">
15
+ 404
16
+ </li>
17
+ {%- else -%}
18
+ {%- assign blocks = page.path | split: "/" -%}
19
+ {%- for block in blocks -%}
20
+ <li class="breadcrumb-item" {% if forloop.last %}aria-current{% endif %}>
21
+ {%- if forloop.last -%}
22
+ {{ page.name }}
23
+ {%- else -%}
24
+ <a href="{{ site.baseurl }}/{% for block in blocks limit: forloop.index %}{{ block }}/{% endfor %}">{{ block }}</a>
25
+ {%- endif -%}
26
+ </li>
27
+ {%- endfor -%}
28
+ {%- endcase -%}
29
+ </ul>
30
+ <a class="edit" href="{% github_edit_link %}" title="{{ __.edit | default: 'Edit on GitHub'}}" target="_blank">
31
+ <i class="fa fa-edit"></i>
32
+ </a>
33
+ </div>
@@ -0,0 +1,41 @@
1
+ {% comment %} prev and next {% endcomment %}
2
+ {%- if page.url != "/search.html" and page.url != "/404.html" -%}
3
+ {%- if next or prev -%}
4
+ <div class="navigation-bottom d-flex flex-justify-between py-3" role="navigation" aria-label="footer navigation">
5
+ <div class="prev">
6
+ {%- if prev -%}
7
+ <a href="{{ prev.url | relative_url }}" class="btn" title="{{ prev.title }}" accesskey="p" rel="prev">
8
+ <i class="fa fa-arrow-circle-left"></i> {{ __.previous | default: "Previous" }}
9
+ </a>
10
+ {%- endif -%}
11
+ </div>
12
+ <div class="next">
13
+ {%- if next -%}
14
+ <a href="{{ next.url | relative_url }}" class="btn" title="{{ next.title }}" accesskey="n" rel="next">
15
+ {{ __.next | default: "Next" }} <i class="fa fa-arrow-circle-right"></i>
16
+ </a>
17
+ {%- endif -%}
18
+ </div>
19
+ </div>
20
+ {%- endif -%}
21
+ {%- endif -%}
22
+
23
+ <hr>
24
+
25
+ <div class="copyright text-center text-gray" role="contentinfo">
26
+ <i class="fa fa-copyright"></i>
27
+ {%- assign created_time = rest_created_at | date: "%Y" -%}
28
+ {%- assign updated_time = rest_updated_at | date: "%Y" -%}
29
+ {%- if created_time == updated_time -%}
30
+ {{ created_time }},
31
+ {%- else -%}
32
+ {{ created_time }}-{{ updated_time }},
33
+ {%- endif %}
34
+ <a class="text-gray" href="{{ docs.owner_url }}" target="_blank">
35
+ {{ author }}
36
+ </a>
37
+ {{ __.revision | default: "Revision" }}
38
+ <a class="text-gray" href="{{ docs.repository_url }}/commit/{{ docs.build_revision }}" title="{{ docs.build_revision }}" target="_blank">
39
+ {{ docs.build_revision | slice: 0, 7 }}
40
+ </a>
41
+ </div>
@@ -1,16 +1,13 @@
1
- {%- include reset/workdir.liquid %}
1
+ {%- include assets/workdir.liquid %}
2
2
 
3
3
  {% comment %} display the directory name {% endcomment %}
4
4
  {%- assign dir = site_pages | where: "url", workdir | first -%}
5
- {%- if site_lang != lang -%}
6
- {% comment %} current in language directory (level-1) {% endcomment %}
7
- {%- assign workdir_level = workdir_level | minus: 1 -%}
8
- {%- endif -%}
5
+
9
6
  {%- if workdir_level == 2 %}
10
7
  {% comment %} display the root sub-directory as "p.caption" {% endcomment %}
11
- <p class="caption"><span class="caption-text">{{ dir.title | default: dir.url }}</span></p>
8
+ <p class="caption text-uppercase no-wrap px-2 mb-0">{{ dir.title | default: dir.url }}</p>
12
9
  {%- else %}
13
- <a class="reference internal" href="{{ dir.url | relative_url }}">{{ dir.title | default: dir.url }}</a>
10
+ <a class="d-flex flex-items-baseline" href="{{ dir.url | relative_url }}">{{ dir.title | default: dir.url }}</a>
14
11
  {%- endif -%}
15
12
 
16
13
  <ul>
@@ -20,13 +17,10 @@
20
17
  {%- capture current -%}
21
18
  {%- if page.url == item.url %}current{% endif -%}
22
19
  {%- endcapture %}
23
- {%- if site_lang != lang -%}
24
- {%- assign level = level | minus: 1 -%}
25
- {%- endif -%}
26
20
 
27
- <li class="toctree-l{{ level }} {{ current }}" data-sort="{{ item.sort }}">
28
- <a class="reference internal {{ current }}" href="{{ item.url | relative_url }}">
29
- {%- if item.sort and site.show_sorted != false -%}
21
+ <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
22
+ <a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
23
+ {%- if item.sort -%}
30
24
  {{ item.sort }}. {{ item.title | default: item.url }}
31
25
  {%- else -%}
32
26
  {{ item.title | default: item.url }}
@@ -38,9 +32,6 @@
38
32
  {% comment %} list dirs {% endcomment %}
39
33
  {%- for workdir in workdir_dirs -%}
40
34
  {%- assign level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 2 %}
41
- {%- if site_lang != lang -%}
42
- {%- assign level = level | minus: 1 -%}
43
- {%- endif -%}
44
- <li class="toctree-l{{ level }}">{% include extend/toctree.liquid %}</li>
35
+ <li class="toc level-{{ level }}">{% include class/_toctree.extend.liquid %}</li>
45
36
  {%- endfor -%}
46
37
  </ul>
@@ -0,0 +1,23 @@
1
+ {%- include assets/workdir.liquid %}
2
+
3
+ {% comment %} list the root files {% endcomment %}
4
+ <ul>
5
+ {%- for item in workdir_files -%}
6
+ {%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
7
+ {%- capture current -%}
8
+ {%- if page.url == item.url %}current{% endif -%}
9
+ {%- endcapture %}
10
+ <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
11
+ <a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
12
+ {%- if item.sort -%}
13
+ {{ item.sort }}. {{ item.title | default: item.url }}
14
+ {%- else -%}
15
+ {{ item.title | default: item.url }}
16
+ {%- endif -%}
17
+ </a>
18
+ </li>
19
+ {%- endfor %}
20
+ </ul>
21
+
22
+ {% comment %} list the root dirs {% endcomment %}
23
+ {%- for workdir in workdir_dirs %}{% include class/_toctree.extend.liquid %}{% endfor -%}
@@ -0,0 +1,26 @@
1
+ <div class="addons-wrap d-flex flex-column overflow-y-auto">
2
+ <div class="status d-flex flex-justify-between p-2">
3
+ <div class="title p-1">
4
+ <i class="fa fa-book"></i> {{ site.title }}
5
+ </div>
6
+ <div class="branch p-1">
7
+ <span class="name">
8
+ {{ docs.source.branch }}
9
+ </span>
10
+ <i class="fa fa-caret-down"></i>
11
+ </div>
12
+ </div>
13
+ <div class="addons d-flex flex-column height-full p-2 d-none">
14
+ {%- assign items = "github, analytics" | split: ", " -%}
15
+ {% for item in items -%}
16
+ {% include class/addons/{{ item }}.liquid %}
17
+ {% endfor -%}
18
+ <hr>
19
+ <div class="generator f6 pb-2">
20
+ Built with
21
+ <a href="https://github.com/rundocs/jekyll-rtd-theme" target="_blank" title="{% if site.remote_theme %}remote{% endif %} theme v{{ version }}">jekyll-rtd-theme</a>
22
+ provided by
23
+ <a href="https://rundocs.io" target="_blank">RunDocs</a>
24
+ </div>
25
+ </div>
26
+ </div>
@@ -0,0 +1,11 @@
1
+ <dl>
2
+ <dt>{{ __.statistics | default: "Statistics" }}</dt>
3
+ <dd>
4
+ <a href="https://github.com/rundocs/analytics" target="_blank">
5
+ {{ __.total_visits | default: "Total visits" }}:
6
+ <span id="counter">
7
+ <span class="progress"></span>
8
+ </span>
9
+ </a>
10
+ </dd>
11
+ </dl>
@@ -0,0 +1,21 @@
1
+ <dl>
2
+ <dt>{{ __.github | default: "GitHub" }}</dt>
3
+ <dd>
4
+ <a href="{{ docs.repository_url }}" title="{{ __.stars | default: 'Stars' }}: {{ rest.stargazers_count }}">
5
+ <i class="fa fa-github"></i>
6
+ {{ __.homepage | default: "Homepage" }}
7
+ </a>
8
+ </dd>
9
+ <dd>
10
+ <a href="{{ docs.issues_url }}" title="{{ __.open_issues | default: 'Open issues' }}: {{ rest.open_issues }}">
11
+ <i class="fa fa-question-circle-o"></i>
12
+ {{ __.issues | default: "Issues" }}
13
+ </a>
14
+ </dd>
15
+ <dd>
16
+ <a href="{{ docs.zip_url }}" title="{{ __.size | default: 'Size' }}: {{ rest.size }} Kb">
17
+ <i class="fa fa-download"></i>
18
+ {{ __.download | default: "Download" }}
19
+ </a>
20
+ </dd>
21
+ </dl>