jekyll-docs-theme 0.1.2 → 1.0.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +20 -16
  3. data/README.md +8 -35
  4. data/_includes/anchor_headings.html +109 -0
  5. data/_includes/fa-icon.html +13 -0
  6. data/_includes/footer/content-post.html +4 -0
  7. data/_includes/footer/content-pre.html +4 -0
  8. data/_includes/footer/content.html +137 -0
  9. data/_includes/footer/full.html +13 -0
  10. data/_includes/footer/scripts-post.html +4 -0
  11. data/_includes/footer/scripts-pre.html +4 -0
  12. data/_includes/footer/scripts.html +48 -0
  13. data/_includes/head/base.html +3 -0
  14. data/_includes/head/content-post.html +0 -0
  15. data/_includes/head/content-pre.html +0 -0
  16. data/_includes/head/content.html +8 -0
  17. data/_includes/head/full.html +9 -0
  18. data/_includes/head/stylesheets-post.html +0 -0
  19. data/_includes/head/stylesheets-pre.html +0 -0
  20. data/_includes/head/stylesheets.html +16 -0
  21. data/_includes/internal/variables.html +21 -0
  22. data/_includes/masthead.html +13 -0
  23. data/_includes/masthead/button.html +11 -0
  24. data/_includes/masthead/buttons.html +30 -0
  25. data/_includes/masthead/title.html +7 -0
  26. data/_includes/navigation.html +37 -19
  27. data/_includes/toc.html +87 -0
  28. data/_layouts/default.html +4 -4
  29. data/_layouts/full.html +5 -3
  30. data/_layouts/page.html +46 -11
  31. data/_sass/abstracts/_highlight-dark.scss +136 -0
  32. data/_sass/abstracts/_highlight-light.scss +251 -0
  33. data/_sass/abstracts/_themer.scss +18 -0
  34. data/_sass/abstracts/_variables.scss +6 -0
  35. data/_sass/base/_anchor.scss +20 -0
  36. data/_sass/base/_body.scss +12 -0
  37. data/_sass/base/_scope-markdown.scss +94 -0
  38. data/_sass/components/_alert.scss +5 -0
  39. data/_sass/components/_footer.scss +39 -0
  40. data/_sass/components/_header.scss +22 -0
  41. data/_sass/components/_highlight.scss +59 -0
  42. data/_sass/components/_masthead.scss +62 -0
  43. data/_sass/components/_mobile-toc.scss +30 -0
  44. data/_sass/components/_sidebar.scss +84 -0
  45. data/_sass/utilities/_colors.scss +301 -0
  46. data/_sass/utilities/_js.scss +3 -0
  47. data/assets/css/styles.scss +38 -50
  48. data/assets/js/docs.js +49 -0
  49. metadata +48 -27
  50. data/_includes/footer.html +0 -91
  51. data/_includes/head.html +0 -26
  52. data/_includes/jumbotron.html +0 -21
  53. data/assets/css/docs.css +0 -1527
  54. data/assets/js/docs.min.js +0 -49
@@ -0,0 +1,3 @@
1
+ <meta charset="utf-8">
2
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1">
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ {% assign pageTitle = page.title | default: site.name ~ ' ' ~ site.project.version | escape %}
2
+ {% assign pageDescription = page.description | page.excerpt | default: site.description %}
3
+
4
+ <title>{{ pageTitle | strip_html | escape }}</title>
5
+ <meta name="description" content="{{ pageDescription | strip_html | normalize_whitespace | truncate: 160 | escape }}">
6
+
7
+ <link rel="canonical" href="{{ page.url | replace: 'index.html', '' | absolute_url }}">
8
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ '/feed.xml' | relative_url }}">
@@ -0,0 +1,9 @@
1
+ {% include head/base.html %}
2
+
3
+ {% include head/content-pre.html %}
4
+ {% include head/content.html %}
5
+ {% include head/content-post.html %}
6
+
7
+ {% include head/stylesheets-pre.html %}
8
+ {% include head/stylesheets.html %}
9
+ {% include head/stylesheets-post.html %}
File without changes
File without changes
@@ -0,0 +1,16 @@
1
+ <link
2
+ rel="stylesheet"
3
+ href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css"
4
+ integrity="sha256-L/W5Wfqfa0sdBNIKN9cG6QA5F2qx4qICmU2VgLruv9Y="
5
+ crossorigin="anonymous"
6
+ />
7
+ <link
8
+ rel="stylesheet"
9
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"
10
+ integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk="
11
+ crossorigin="anonymous"
12
+ />
13
+ <link
14
+ rel="stylesheet"
15
+ href="{{ '/assets/css/styles.css' | relative_url }}"
16
+ />
@@ -0,0 +1,21 @@
1
+ {%- assign site_ui_mode = site.ui.mode | default: 'auto' -%}
2
+
3
+ {%- assign site_ui_brand_dark = site.ui.brand.dark | default: '#00ceff' -%}
4
+ {%- assign site_ui_brand_light = site.ui.brand.light | default: '#a20000' -%}
5
+
6
+ {%- assign site_ui_border_color_dark = site.ui.border_color.dark | default: '#5f5f5f' -%}
7
+ {%- assign site_ui_border_color_light = site.ui.border_color.light | default: '#dee2e6' -%}
8
+
9
+ {%- if site.ui.header.trianglify == true or site.ui.header.trianglify == false -%}
10
+ {%- assign site_ui_header_trianglify = site.ui.header.trianglify -%}
11
+ {%- else -%}
12
+ {%- assign site_ui_header_trianglify = true -%}
13
+ {%- endif -%}
14
+
15
+ {%- assign site_ui_header_dark_color1 = site.ui.header.dark.color1 | default: '#062a48' -%}
16
+ {%- assign site_ui_header_dark_color2 = site.ui.header.dark.color2 | default: '#304e67' -%}
17
+ {%- assign site_ui_header_light_color1 = site.ui.header.light.color1 | default: '#080331' -%}
18
+ {%- assign site_ui_header_light_color2 = site.ui.header.light.color2 | default: '#673051' -%}
19
+
20
+ {%- assign site_ui_masthead_color_dark = site.ui.masthead.color.dark | default: '#fff' -%}
21
+ {%- assign site_ui_masthead_color_light = site.ui.masthead.color.light | default: '#fff' -%}
@@ -0,0 +1,13 @@
1
+ {% capture alignment_class -%}
2
+ {%- if page.homepage -%}
3
+ text-{{ site.ui.masthead.align.homepage | default: 'center' }}
4
+ {%- else -%}
5
+ text-{{ site.ui.masthead.align.page | default: 'left' }}
6
+ {%- endif -%}
7
+ {%- endcapture %}
8
+ <div class="site-masthead mb-5 py-5 {{ alignment_class }}">
9
+ <div class="container">
10
+ {% include masthead/title.html %}
11
+ {% include masthead/buttons.html %}
12
+ </div>
13
+ </div>
@@ -0,0 +1,11 @@
1
+ <a
2
+ href="{{ include.url }}"
3
+ class="site-masthead__button mx-2 mb-2"
4
+ >
5
+ {% include fa-icon.html
6
+ icon=include.icon
7
+ brand=include.brand
8
+ class="mr-1"
9
+ %}
10
+ {{ include.title }}
11
+ </a>
@@ -0,0 +1,30 @@
1
+ {% if page.homepage %}
2
+ <div class="mt-4 mb-0">
3
+ {% if site.project.download_url %}
4
+ {% capture button_text -%}
5
+ {{ site.project.download_text | default: 'Download' }}
6
+ {%- endcapture %}
7
+
8
+ {% include masthead/button.html
9
+ url=site.project.download_url
10
+ icon="download"
11
+ title=button_text
12
+ %}
13
+ {% endif %}
14
+
15
+ {% for link in site.links.homepage %}
16
+ {% include masthead/button.html
17
+ url=link.url
18
+ icon=link.icon
19
+ title=link.title
20
+ brand=link.brand
21
+ %}
22
+ {% endfor %}
23
+ </div>
24
+
25
+ {% if site.project.version %}
26
+ <p class="site-masthead__version my-0">
27
+ Latest release v{{ site.project.version }}
28
+ </p>
29
+ {% endif %}
30
+ {% endif %}
@@ -0,0 +1,7 @@
1
+ <h1 class="site-masthead__title mb-1">{{ page.title | default: site.name }}</h1>
2
+
3
+ {% if page.description %}
4
+ <p class="site-masthead__description mb-0">
5
+ {{ page.description }}
6
+ </p>
7
+ {% endif %}
@@ -1,32 +1,50 @@
1
- <header class="navbar navbar-static-top bs-docs-nav" id="top">
1
+ <header class="navbar navbar-expand-md navbar-custom" id="top">
2
2
  <div class="container">
3
- <div class="navbar-header" role="banner">
4
- <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
5
- <span class="sr-only">Toggle navigation</span>
6
- <span class="icon-bar"></span>
7
- <span class="icon-bar"></span>
8
- <span class="icon-bar"></span>
9
- </button>
10
- <a class="navbar-brand" href="{{ 'index.html' | relative_url }}">{{ site.name }}</a>
11
- </div>
12
- <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
13
- <ul class="nav navbar-nav">
3
+ <a class="navbar-brand" href="{{ '/' | relative_url }}">{{ site.name }}</a>
4
+
5
+ <button
6
+ class="navbar-toggler"
7
+ type="button"
8
+ data-toggle="collapse"
9
+ data-target="#navbarSupportedContent"
10
+ aria-controls="navbarSupportedContent"
11
+ aria-expanded="false"
12
+ aria-label="Toggle navigation"
13
+ >
14
+ <span class="icon-bar"></span>
15
+ <span class="icon-bar"></span>
16
+ <span class="icon-bar"></span>
17
+ </button>
18
+
19
+ <nav class="navbar-collapse collapse" role="navigation" id="navbarSupportedContent">
20
+ <ul class="navbar-nav">
14
21
  {% assign sorted_pages = site.pages | sort: "name" %}
15
22
  {% for p in sorted_pages %}
16
- {% if p.isHome != true and p.hide != true and p.title != %}
17
- <li {% if page.title == p.title %}class="active"{% endif %}>
18
- <a href="{{ p.url | relative_url }}">{{ p.title }}</a>
23
+ {% if p.isHome != true and p.hide != true and p.title %}
24
+ <li class="nav-item {% if page.title == p.title %}active{% endif %}">
25
+ <a
26
+ class="nav-link"
27
+ href="{{ p.url | relative_url }}"
28
+ >
29
+ {{ p.title }}
30
+ </a>
19
31
  </li>
20
32
  {% endif %}
21
33
  {% endfor %}
22
34
  </ul>
23
- <ul class="nav navbar-nav navbar-right">
35
+ <ul class="navbar-nav ml-auto">
24
36
  {% for p in site.links.header %}
25
- <li>
26
- <a href="{{ p.url }}">{{ p.title }}</a>
37
+ <li class="nav-item {% if page.title == p.title %}active{% endif %}">
38
+ <a
39
+ class="nav-link"
40
+ href="{{ p.url }}"
41
+ >
42
+ {% include fa-icon.html icon=p.icon brand=p.brand %}
43
+ {{ p.title }}
44
+ </a>
27
45
  </li>
28
46
  {% endfor %}
29
47
  </ul>
30
48
  </nav>
31
49
  </div>
32
- </header>
50
+ </header>
@@ -0,0 +1,87 @@
1
+ {% capture tocWorkspace %}
2
+ {% comment %}
3
+ Version 1.0.6
4
+ https://github.com/allejo/jekyll-toc
5
+
6
+ "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
7
+
8
+ Usage:
9
+ {% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
10
+
11
+ Parameters:
12
+ * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
13
+
14
+ Optional Parameters:
15
+ * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
16
+ * class (string) : '' - a CSS class assigned to the TOC
17
+ * id (string) : '' - an ID to assigned to the TOC
18
+ * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
19
+ * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
20
+ * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
21
+ * item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
22
+ * baseurl (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
23
+ * anchor_class (string) : '' - add custom class(es) for each anchor element
24
+
25
+ Output:
26
+ An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
27
+ generate the table of contents and will NOT output the markdown given to it
28
+ {% endcomment %}
29
+
30
+ {% capture my_toc %}{% endcapture %}
31
+ {% assign orderedList = include.ordered | default: false %}
32
+ {% assign minHeader = include.h_min | default: 1 %}
33
+ {% assign maxHeader = include.h_max | default: 6 %}
34
+ {% assign nodes = include.html | split: '<h' %}
35
+ {% assign firstHeader = true %}
36
+
37
+ {% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
38
+
39
+ {% for node in nodes %}
40
+ {% if node == "" %}
41
+ {% continue %}
42
+ {% endif %}
43
+
44
+ {% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
45
+
46
+ {% if headerLevel < minHeader or headerLevel > maxHeader %}
47
+ {% continue %}
48
+ {% endif %}
49
+
50
+ {% if firstHeader %}
51
+ {% assign firstHeader = false %}
52
+ {% assign minHeader = headerLevel %}
53
+ {% endif %}
54
+
55
+ {% assign indentAmount = headerLevel | minus: minHeader | add: 1 %}
56
+ {% assign _workspace = node | split: '</h' %}
57
+
58
+ {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
59
+ {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
60
+ {% assign html_id = _idWorkspace[0] %}
61
+
62
+ {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
63
+ {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
64
+
65
+ {% assign space = '' %}
66
+ {% for i in (1..indentAmount) %}
67
+ {% assign space = space | prepend: ' ' %}
68
+ {% endfor %}
69
+
70
+ {% unless include.item_class == blank %}
71
+ {% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
72
+ {% endunless %}
73
+
74
+ {% capture my_toc %}{{ my_toc }}
75
+ {{ space }}{{ listModifier }} {{ listItemClass }} [{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
76
+ {% endfor %}
77
+
78
+ {% if include.class %}
79
+ {% capture my_toc %}{:.{{ include.class }}}
80
+ {{ my_toc | lstrip }}{% endcapture %}
81
+ {% endif %}
82
+
83
+ {% if include.id %}
84
+ {% capture my_toc %}{: #{{ include.id }}}
85
+ {{ my_toc | lstrip }}{% endcapture %}
86
+ {% endif %}
87
+ {% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
@@ -1,15 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en" class="no-js">
3
3
  <head>
4
- {% include head.html %}
4
+ {% include head/full.html %}
5
5
  </head>
6
6
 
7
- <body>
7
+ <body data-spy="scroll" data-target="#page-toc" data-offset="0">
8
8
  {% include navigation.html %}
9
- {% include jumbotron.html %}
9
+ {% include masthead.html %}
10
10
 
11
11
  {{ content }}
12
12
 
13
- {% include footer.html %}
13
+ {% include footer/full.html %}
14
14
  </body>
15
15
  </html>
@@ -2,8 +2,10 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
- <div class="container bs-docs-container">
6
- <div class="bs-docs-section" role="main">{{ content }}</div>
5
+ <div class="container">
6
+ <div class="scope-markdown" role="main">
7
+ {% include anchor_headings.html html=content anchorBody="#" anchorClass="heading-anchor" %}
8
+ </div>
7
9
 
8
10
  {% include disqus.html %}
9
- </div>
11
+ </div>
@@ -3,19 +3,54 @@ layout: default
3
3
  ---
4
4
 
5
5
  <div class="container">
6
- <div class="bs-docs-container row">
7
- <div class="col-md-12" role="main">
8
- <div class="bs-docs-section">{{ content }}</div>
9
- </div>
6
+ <div class="row">
7
+ <main class="col-md-9">
8
+ <section class="mobile-toc border mb-3 p-3 d-md-none">
9
+ <div class="d-flex align-items-center">
10
+ <h2 class="mb-0">Table of Contents</h2>
10
11
 
11
- <div class="col-md-3 bs-docs-sidebar hidden-print" role="complementary">
12
- <ul class="nav bs-docs-sidenav"></ul>
12
+ <button
13
+ class="js-only ml-2 toggle-toc"
14
+ aria-controls="mobileTOC"
15
+ aria-label="Toggle table of contents"
16
+ aria-expanded="true"
17
+ >
18
+ <span aria-hidden="true" data-role="toggle">Hide</span>
19
+ </button>
20
+ </div>
13
21
 
14
- <a class="back-to-top" href="#top"> <i class="glyphicon glyphicon-chevron-up"></i>
15
- Back to top
16
- </a>
17
- </div>
22
+ {% include toc.html
23
+ html=content
24
+ class="js-toc.mb-0.mt-2"
25
+ id="mobileTOC"
26
+ h_max=3
27
+ %}
28
+ </section>
29
+
30
+ <section class="scope-markdown">
31
+ {% include anchor_headings.html
32
+ html=content
33
+ anchorBody="#"
34
+ anchorClass="heading-anchor"
35
+ %}
36
+ </section>
37
+ </main>
38
+
39
+ <aside class="col-md-3 d-none d-md-block hidden-print">
40
+ <nav id="page-toc" class="page-sidebar">
41
+ {% include toc.html
42
+ html=content
43
+ class="list-unstyled.pl-0"
44
+ anchor_class="nav-link.px-3.py-1"
45
+ h_max=3
46
+ %}
47
+
48
+ <a class="px-3 text-muted" href="#top">
49
+ <small>Back to top</small>
50
+ </a>
51
+ </nav>
52
+ </aside>
18
53
  </div>
19
54
 
20
55
  {% include disqus.html %}
21
- </div>
56
+ </div>
@@ -0,0 +1,136 @@
1
+ @mixin highlight-dark-theme() {
2
+ // "Zenburn" Theme
3
+ // https://github.com/jwarby/jekyll-pygments-themes
4
+
5
+ .highlight .hll {
6
+ background-color:#222;
7
+ }
8
+
9
+ .highlight .err {
10
+ color:#e37170;
11
+ background-color:#3d3535;
12
+ }
13
+
14
+ .highlight .k {
15
+ color:#f0dfaf;
16
+ }
17
+
18
+ .highlight .p {
19
+ color:#41706f;
20
+ }
21
+
22
+ .highlight .cs {
23
+ color:#cd0000;
24
+ font-weight:700;
25
+ }
26
+
27
+ .highlight .gd {
28
+ color:#cd0000;
29
+ }
30
+
31
+ .highlight .ge {
32
+ color:#ccc;
33
+ font-style:italic;
34
+ }
35
+
36
+ .highlight .gr {
37
+ color:red;
38
+ }
39
+
40
+ .highlight .go {
41
+ color:gray;
42
+ }
43
+
44
+ .highlight .gs {
45
+ color:#ccc;
46
+ font-weight:700;
47
+ }
48
+
49
+ .highlight .gu {
50
+ color:purple;
51
+ font-weight:700;
52
+ }
53
+
54
+ .highlight .gt {
55
+ color:#0040D0;
56
+ }
57
+
58
+ .highlight .kc {
59
+ color:#dca3a3;
60
+ }
61
+
62
+ .highlight .kd {
63
+ color:#ffff86;
64
+ }
65
+
66
+ .highlight .kn {
67
+ color:#dfaf8f;
68
+ font-weight:700;
69
+ }
70
+
71
+ .highlight .kp {
72
+ color:#cdcf99;
73
+ }
74
+
75
+ .highlight .kr {
76
+ color:#cdcd00;
77
+ }
78
+
79
+ .highlight .ni {
80
+ color:#c28182;
81
+ }
82
+
83
+ .highlight .ne {
84
+ color:#c3bf9f;
85
+ font-weight:700;
86
+ }
87
+
88
+ .highlight .nn {
89
+ color:#8fbede;
90
+ }
91
+
92
+ .highlight .vi {
93
+ color:#ffffc7;
94
+ }
95
+
96
+ .highlight .c,.preview-zenburn .highlight .g,.preview-zenburn .highlight .cm,.preview-zenburn .highlight .cp,.preview-zenburn .highlight .c1 {
97
+ color:#7f9f7f;
98
+ }
99
+
100
+ .highlight .l,.preview-zenburn .highlight .x,.preview-zenburn .highlight .no,.preview-zenburn .highlight .nd,.preview-zenburn .highlight .nl,.preview-zenburn .highlight .nx,.preview-zenburn .highlight .py,.preview-zenburn .highlight .w {
101
+ color:#ccc;
102
+ }
103
+
104
+ .highlight .n,.preview-zenburn .highlight .nv,.preview-zenburn .highlight .vg {
105
+ color:#dcdccc;
106
+ }
107
+
108
+ .highlight .o,.preview-zenburn .highlight .ow {
109
+ color:#f0efd0;
110
+ }
111
+
112
+ .highlight .gh,.preview-zenburn .highlight .gp {
113
+ color:#dcdccc;
114
+ font-weight:700;
115
+ }
116
+
117
+ .highlight .gi,.preview-zenburn .highlight .kt {
118
+ color:#00cd00;
119
+ }
120
+
121
+ .highlight .ld,.preview-zenburn .highlight .s,.preview-zenburn .highlight .sb,.preview-zenburn .highlight .sc,.preview-zenburn .highlight .sd,.preview-zenburn .highlight .s2,.preview-zenburn .highlight .se,.preview-zenburn .highlight .sh,.preview-zenburn .highlight .si,.preview-zenburn .highlight .sx,.preview-zenburn .highlight .sr,.preview-zenburn .highlight .s1,.preview-zenburn .highlight .ss {
122
+ color:#cc9393;
123
+ }
124
+
125
+ .highlight .m,.preview-zenburn .highlight .mf,.preview-zenburn .highlight .mh,.preview-zenburn .highlight .mi,.preview-zenburn .highlight .mo,.preview-zenburn .highlight .il {
126
+ color:#8cd0d3;
127
+ }
128
+
129
+ .highlight .na,.preview-zenburn .highlight .nt {
130
+ color:#9ac39f;
131
+ }
132
+
133
+ .highlight .nb,.preview-zenburn .highlight .nc,.preview-zenburn .highlight .nf,.preview-zenburn .highlight .bp,.preview-zenburn .highlight .vc {
134
+ color:#efef8f;
135
+ }
136
+ }