just-the-docs 0.2.8 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/_includes/css/custom.scss.liquid +1 -0
- data/_includes/css/just-the-docs.scss.liquid +7 -0
- data/_includes/fix_linenos.html +65 -0
- data/_includes/footer_custom.html +3 -0
- data/_includes/head.html +7 -7
- data/_includes/header_custom.html +0 -0
- data/_includes/nav.html +94 -35
- data/_includes/vendor/anchor_headings.html +53 -9
- data/_layouts/default.html +176 -76
- data/_layouts/table_wrappers.html +1 -1
- data/_sass/base.scss +14 -17
- data/_sass/code.scss +291 -74
- data/_sass/color_schemes/dark.scss +1 -1
- data/_sass/color_schemes/light.scss +0 -0
- data/_sass/content.scss +76 -5
- data/_sass/custom/custom.scss +0 -129
- data/_sass/labels.scss +5 -4
- data/_sass/layout.scss +48 -52
- data/_sass/modules.scss +20 -0
- data/_sass/navigation.scss +149 -50
- data/_sass/print.scss +40 -0
- data/_sass/search.scss +204 -48
- data/_sass/support/_functions.scss +2 -3
- data/_sass/support/_variables.scss +33 -9
- data/_sass/support/mixins/_layout.scss +1 -3
- data/_sass/support/mixins/_typography.scss +25 -22
- data/_sass/typography.scss +13 -7
- data/_sass/utilities/_layout.scss +74 -17
- data/_sass/utilities/_spacing.scss +69 -25
- data/_sass/vendor/normalize.scss/README.md +4 -75
- data/_sass/vendor/normalize.scss/normalize.scss +157 -235
- data/assets/css/just-the-docs-dark.scss +3 -0
- data/assets/css/just-the-docs-default.scss +8 -0
- data/assets/css/just-the-docs-light.scss +3 -0
- data/assets/js/just-the-docs.js +374 -202
- data/assets/js/zzzz-search-data.json +72 -0
- data/lib/tasks/search.rake +69 -10
- metadata +15 -15
- data/_sass/overrides.scss +0 -3
- data/_sass/vendor/normalize.scss/package.json +0 -70
- data/assets/css/dark-mode-preview.scss +0 -45
- data/assets/css/just-the-docs.scss +0 -49
- data/assets/js/dark-mode-preview.js +0 -23
- data/assets/js/search-data.json +0 -12
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
permalink: /assets/js/search-data.json
|
3
|
+
---
|
4
|
+
{
|
5
|
+
{%- assign i = 0 -%}
|
6
|
+
{%- assign pages_array = '' | split: '' -%}
|
7
|
+
{%- assign pages_array = pages_array | push: site.html_pages -%}
|
8
|
+
{%- if site.just_the_docs.collections -%}
|
9
|
+
{%- for collection_entry in site.just_the_docs.collections -%}
|
10
|
+
{%- assign collection_key = collection_entry[0] -%}
|
11
|
+
{%- assign collection_value = collection_entry[1] -%}
|
12
|
+
{%- assign collection = site[collection_key] -%}
|
13
|
+
{%- if collection_value.search_exclude != true -%}
|
14
|
+
{%- assign pages_array = pages_array | push: collection -%}
|
15
|
+
{%- endif -%}
|
16
|
+
{%- endfor -%}
|
17
|
+
{%- endif -%}
|
18
|
+
{%- for pages in pages_array -%}
|
19
|
+
{%- for page in pages -%}
|
20
|
+
{%- if page.title and page.search_exclude != true -%}
|
21
|
+
{%- assign page_content = page.content -%}
|
22
|
+
{%- assign heading_level = site.search.heading_level | default: 2 -%}
|
23
|
+
{%- for j in (2..heading_level) -%}
|
24
|
+
{%- assign tag = '<h' | append: j -%}
|
25
|
+
{%- assign closing_tag = '</h' | append: j -%}
|
26
|
+
{%- assign page_content = page_content | replace: tag, '<h1' | replace: closing_tag, '</h1' -%}
|
27
|
+
{%- endfor -%}
|
28
|
+
{%- assign parts = page_content | split: '<h1' -%}
|
29
|
+
{%- assign title_found = false -%}
|
30
|
+
{%- for part in parts offset: 1 -%}
|
31
|
+
{%- assign titleAndContent = part | split: '</h1>' -%}
|
32
|
+
{%- assign title = titleAndContent[0] | replace_first: '>', '<h1>' | split: '<h1>' -%}
|
33
|
+
{%- assign title = title[1] | strip_html -%}
|
34
|
+
{%- assign content = titleAndContent[1] -%}
|
35
|
+
{%- assign url = page.url -%}
|
36
|
+
{%- if title == page.title and parts[0] == '' -%}
|
37
|
+
{%- assign title_found = true -%}
|
38
|
+
{%- else -%}
|
39
|
+
{%- assign id = titleAndContent[0] -%}
|
40
|
+
{%- assign id = id | split: 'id="' -%}
|
41
|
+
{%- if id.size == 2 -%}
|
42
|
+
{%- assign id = id[1] -%}
|
43
|
+
{%- assign id = id | split: '"' -%}
|
44
|
+
{%- assign id = id[0] -%}
|
45
|
+
{%- capture url -%}{{ url | append: '#' | append: id }}{%- endcapture -%}
|
46
|
+
{%- endif -%}
|
47
|
+
{%- endif -%}
|
48
|
+
{%- unless i == 0 -%},{%- endunless -%}
|
49
|
+
"{{ i }}": {
|
50
|
+
"doc": {{ page.title | jsonify }},
|
51
|
+
"title": {{ title | jsonify }},
|
52
|
+
"content": {{ content | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '<ul', ' . <ul' | replace: '</ul', ' . </ul' | replace: '<ol', ' . <ol' | replace: '</ol', ' . </ol' | replace: '</tr', ' . </tr' | replace: '<li', ' | <li' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | replace: '<td', ' | <td' | replace: '</th', ' | </th' | replace: '<th', ' | <th' | strip_html | remove: 'Table of contents' | normalize_whitespace | replace: '. . .', '.' | replace: '. .', '.' | replace: '| |', '|' | append: ' ' | jsonify }},
|
53
|
+
"url": "{{ url | absolute_url }}",
|
54
|
+
"relUrl": "{{ url }}"
|
55
|
+
}
|
56
|
+
{%- assign i = i | plus: 1 -%}
|
57
|
+
{%- endfor -%}
|
58
|
+
{%- unless title_found -%}
|
59
|
+
{%- unless i == 0 -%},{%- endunless -%}
|
60
|
+
"{{ i }}": {
|
61
|
+
"doc": {{ page.title | jsonify }},
|
62
|
+
"title": {{ page.title | jsonify }},
|
63
|
+
"content": {{ parts[0] | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '<ul', ' . <ul' | replace: '</ul', ' . </ul' | replace: '<ol', ' . <ol' | replace: '</ol', ' . </ol' | replace: '</tr', ' . </tr' | replace: '<li', ' | <li' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | replace: '<td', ' | <td' | replace: '</th', ' | </th' | replace: '<th', ' | <th' | strip_html | remove: 'Table of contents' | normalize_whitespace | replace: '. . .', '.' | replace: '. .', '.' | replace: '| |', '|' | append: ' ' | jsonify }},
|
64
|
+
"url": "{{ page.url | absolute_url }}",
|
65
|
+
"relUrl": "{{ page.url }}"
|
66
|
+
}
|
67
|
+
{%- assign i = i | plus: 1 -%}
|
68
|
+
{%- endunless -%}
|
69
|
+
{%- endif -%}
|
70
|
+
{%- endfor -%}
|
71
|
+
{%- endfor %}
|
72
|
+
}
|
data/lib/tasks/search.rake
CHANGED
@@ -3,23 +3,82 @@ namespace :search do
|
|
3
3
|
task :init do
|
4
4
|
puts 'Creating search data json file...'
|
5
5
|
mkdir_p 'assets/js'
|
6
|
-
touch 'assets/js/search-data.json'
|
7
|
-
content = %Q[{{ page.content | markdownify | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '</ul', ' . </ul' | replace: '</tr', ' . </tr' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | replace: ' . . . ', ' . ' | replace: ' . . ', ' . ' | normalize_whitespace }}]
|
6
|
+
touch 'assets/js/zzzz-search-data.json'
|
8
7
|
puts 'Done.'
|
9
8
|
puts 'Generating content...'
|
10
9
|
|
11
|
-
File.open('assets/js/search-data.json', 'w') do |f|
|
10
|
+
File.open('assets/js/zzzz-search-data.json', 'w') do |f|
|
12
11
|
f.puts '---
|
12
|
+
permalink: /assets/js/search-data.json
|
13
13
|
---
|
14
14
|
{
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
{%- assign i = 0 -%}
|
16
|
+
{%- assign pages_array = '' | split: '' -%}
|
17
|
+
{%- assign pages_array = pages_array | push: site.html_pages -%}
|
18
|
+
{%- if site.just_the_docs.collections -%}
|
19
|
+
{%- for collection_entry in site.just_the_docs.collections -%}
|
20
|
+
{%- assign collection_key = collection_entry[0] -%}
|
21
|
+
{%- assign collection_value = collection_entry[1] -%}
|
22
|
+
{%- assign collection = site[collection_key] -%}
|
23
|
+
{%- if collection_value.search_exclude != true -%}
|
24
|
+
{%- assign pages_array = pages_array | push: collection -%}
|
25
|
+
{%- endif -%}
|
26
|
+
{%- endfor -%}
|
27
|
+
{%- endif -%}
|
28
|
+
{%- for pages in pages_array -%}
|
29
|
+
{%- for page in pages -%}
|
30
|
+
{%- if page.title and page.search_exclude != true -%}
|
31
|
+
{%- assign page_content = page.content -%}
|
32
|
+
{%- assign heading_level = site.search.heading_level | default: 2 -%}
|
33
|
+
{%- for j in (2..heading_level) -%}
|
34
|
+
{%- assign tag = \'<h\' | append: j -%}
|
35
|
+
{%- assign closing_tag = \'</h\' | append: j -%}
|
36
|
+
{%- assign page_content = page_content | replace: tag, \'<h1\' | replace: closing_tag, \'</h1\' -%}
|
37
|
+
{%- endfor -%}
|
38
|
+
{%- assign parts = page_content | split: \'<h1\' -%}
|
39
|
+
{%- assign title_found = false -%}
|
40
|
+
{%- for part in parts offset: 1 -%}
|
41
|
+
{%- assign titleAndContent = part | split: \'</h1>\' -%}
|
42
|
+
{%- assign title = titleAndContent[0] | replace_first: \'>\', \'<h1>\' | split: \'<h1>\' -%}
|
43
|
+
{%- assign title = title[1] | strip_html -%}
|
44
|
+
{%- assign content = titleAndContent[1] -%}
|
45
|
+
{%- assign url = page.url -%}
|
46
|
+
{%- if title == page.title and parts[0] == \'\' -%}
|
47
|
+
{%- assign title_found = true -%}
|
48
|
+
{%- else -%}
|
49
|
+
{%- assign id = titleAndContent[0] -%}
|
50
|
+
{%- assign id = id | split: \'id="\' -%}
|
51
|
+
{%- if id.size == 2 -%}
|
52
|
+
{%- assign id = id[1] -%}
|
53
|
+
{%- assign id = id | split: \'"\' -%}
|
54
|
+
{%- assign id = id[0] -%}
|
55
|
+
{%- capture url -%}{{ url | append: \'#\' | append: id }}{%- endcapture -%}
|
56
|
+
{%- endif -%}
|
57
|
+
{%- endif -%}
|
58
|
+
{%- unless i == 0 -%},{%- endunless -%}
|
59
|
+
"{{ i }}": {
|
60
|
+
"doc": {{ page.title | jsonify }},
|
61
|
+
"title": {{ title | jsonify }},
|
62
|
+
"content": {{ content | replace: \'</h\', \' . </h\' | replace: \'<hr\', \' . <hr\' | replace: \'</p\', \' . </p\' | replace: \'<ul\', \' . <ul\' | replace: \'</ul\', \' . </ul\' | replace: \'<ol\', \' . <ol\' | replace: \'</ol\', \' . </ol\' | replace: \'</tr\', \' . </tr\' | replace: \'<li\', \' | <li\' | replace: \'</li\', \' | </li\' | replace: \'</td\', \' | </td\' | replace: \'<td\', \' | <td\' | replace: \'</th\', \' | </th\' | replace: \'<th\', \' | <th\' | strip_html | remove: \'Table of contents\' | normalize_whitespace | replace: \'. . .\', \'.\' | replace: \'. .\', \'.\' | replace: \'| |\', \'|\' | append: \' \' | jsonify }},
|
63
|
+
"url": "{{ url | relative_url }}",
|
64
|
+
"relUrl": "{{ url }}"
|
65
|
+
}
|
66
|
+
{%- assign i = i | plus: 1 -%}
|
67
|
+
{%- endfor -%}
|
68
|
+
{%- unless title_found -%}
|
69
|
+
{%- unless i == 0 -%},{%- endunless -%}
|
70
|
+
"{{ i }}": {
|
71
|
+
"doc": {{ page.title | jsonify }},
|
72
|
+
"title": {{ page.title | jsonify }},
|
73
|
+
"content": {{ parts[0] | replace: \'</h\', \' . </h\' | replace: \'<hr\', \' . <hr\' | replace: \'</p\', \' . </p\' | replace: \'<ul\', \' . <ul\' | replace: \'</ul\', \' . </ul\' | replace: \'<ol\', \' . <ol\' | replace: \'</ol\', \' . </ol\' | replace: \'</tr\', \' . </tr\' | replace: \'<li\', \' | <li\' | replace: \'</li\', \' | </li\' | replace: \'</td\', \' | </td\' | replace: \'<td\', \' | <td\' | replace: \'</th\', \' | </th\' | replace: \'<th\', \' | <th\' | strip_html | remove: \'Table of contents\' | normalize_whitespace | replace: \'. . .\', \'.\' | replace: \'. .\', \'.\' | replace: \'| |\', \'|\' | append: \' \' | jsonify }},
|
74
|
+
"url": "{{ page.url | relative_url }}",
|
20
75
|
"relUrl": "{{ page.url }}"
|
21
|
-
}
|
22
|
-
|
76
|
+
}
|
77
|
+
{%- assign i = i | plus: 1 -%}
|
78
|
+
{%- endunless -%}
|
79
|
+
{%- endif -%}
|
80
|
+
{%- endfor -%}
|
81
|
+
{%- endfor %}
|
23
82
|
}'
|
24
83
|
end
|
25
84
|
puts 'Done.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: just-the-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Marsceill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -17,7 +17,7 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.1.4
|
20
|
-
type: :
|
20
|
+
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
@@ -31,9 +31,6 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 3.8.5
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 4.1.0
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,9 +38,6 @@ dependencies:
|
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: 3.8.5
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 4.1.0
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: jekyll-seo-tag
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,8 +83,13 @@ files:
|
|
89
83
|
- LICENSE.txt
|
90
84
|
- README.md
|
91
85
|
- Rakefile
|
86
|
+
- _includes/css/custom.scss.liquid
|
87
|
+
- _includes/css/just-the-docs.scss.liquid
|
88
|
+
- _includes/fix_linenos.html
|
89
|
+
- _includes/footer_custom.html
|
92
90
|
- _includes/head.html
|
93
91
|
- _includes/head_custom.html
|
92
|
+
- _includes/header_custom.html
|
94
93
|
- _includes/js/custom.js
|
95
94
|
- _includes/nav.html
|
96
95
|
- _includes/title.html
|
@@ -106,12 +105,14 @@ files:
|
|
106
105
|
- _sass/buttons.scss
|
107
106
|
- _sass/code.scss
|
108
107
|
- _sass/color_schemes/dark.scss
|
108
|
+
- _sass/color_schemes/light.scss
|
109
109
|
- _sass/content.scss
|
110
110
|
- _sass/custom/custom.scss
|
111
111
|
- _sass/labels.scss
|
112
112
|
- _sass/layout.scss
|
113
|
+
- _sass/modules.scss
|
113
114
|
- _sass/navigation.scss
|
114
|
-
- _sass/
|
115
|
+
- _sass/print.scss
|
115
116
|
- _sass/search.scss
|
116
117
|
- _sass/support/_functions.scss
|
117
118
|
- _sass/support/_variables.scss
|
@@ -130,15 +131,14 @@ files:
|
|
130
131
|
- _sass/utilities/utilities.scss
|
131
132
|
- _sass/vendor/normalize.scss/README.md
|
132
133
|
- _sass/vendor/normalize.scss/normalize.scss
|
133
|
-
-
|
134
|
-
- assets/css/
|
135
|
-
- assets/css/just-the-docs.scss
|
134
|
+
- assets/css/just-the-docs-dark.scss
|
135
|
+
- assets/css/just-the-docs-default.scss
|
136
|
+
- assets/css/just-the-docs-light.scss
|
136
137
|
- assets/images/just-the-docs.png
|
137
138
|
- assets/images/search.svg
|
138
|
-
- assets/js/dark-mode-preview.js
|
139
139
|
- assets/js/just-the-docs.js
|
140
|
-
- assets/js/search-data.json
|
141
140
|
- assets/js/vendor/lunr.min.js
|
141
|
+
- assets/js/zzzz-search-data.json
|
142
142
|
- bin/just-the-docs
|
143
143
|
- lib/tasks/search.rake
|
144
144
|
homepage: https://github.com/pmarsceill/just-the-docs
|
data/_sass/overrides.scss
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"_args": [
|
3
|
-
[
|
4
|
-
"normalize.scss",
|
5
|
-
"/Users/pmarsceill/_projects/just-the-docs"
|
6
|
-
]
|
7
|
-
],
|
8
|
-
"_from": "normalize.scss@*",
|
9
|
-
"_id": "normalize.scss@0.1.0",
|
10
|
-
"_inCache": true,
|
11
|
-
"_installable": true,
|
12
|
-
"_location": "/normalize.scss",
|
13
|
-
"_nodeVersion": "0.10.32",
|
14
|
-
"_npmUser": {
|
15
|
-
"email": "alexguerrero1092@gmail.com",
|
16
|
-
"name": "alexguerrero"
|
17
|
-
},
|
18
|
-
"_npmVersion": "2.0.2",
|
19
|
-
"_phantomChildren": {},
|
20
|
-
"_requested": {
|
21
|
-
"name": "normalize.scss",
|
22
|
-
"raw": "normalize.scss",
|
23
|
-
"rawSpec": "",
|
24
|
-
"scope": null,
|
25
|
-
"spec": "*",
|
26
|
-
"type": "range"
|
27
|
-
},
|
28
|
-
"_requiredBy": [
|
29
|
-
"#DEV:/"
|
30
|
-
],
|
31
|
-
"_resolved": "https://registry.npmjs.org/normalize.scss/-/normalize.scss-0.1.0.tgz",
|
32
|
-
"_shasum": "4a21dc25bd4c019c857785f829b658aba2a8f9ab",
|
33
|
-
"_shrinkwrap": null,
|
34
|
-
"_spec": "normalize.scss",
|
35
|
-
"_where": "/Users/pmarsceill/_projects/just-the-docs",
|
36
|
-
"author": "",
|
37
|
-
"bugs": {
|
38
|
-
"url": "https://github.com/guerrero/normalize.scss/issues"
|
39
|
-
},
|
40
|
-
"dependencies": {},
|
41
|
-
"description": "Normalize.scss as a node packaged module",
|
42
|
-
"devDependencies": {},
|
43
|
-
"directories": {},
|
44
|
-
"dist": {
|
45
|
-
"shasum": "4a21dc25bd4c019c857785f829b658aba2a8f9ab",
|
46
|
-
"tarball": "https://registry.npmjs.org/normalize.scss/-/normalize.scss-0.1.0.tgz"
|
47
|
-
},
|
48
|
-
"files": [
|
49
|
-
"normalize.scss"
|
50
|
-
],
|
51
|
-
"gitHead": "d67d517e28615a873066438af1d4845c157c9baf",
|
52
|
-
"homepage": "https://github.com/guerrero/normalize.scss",
|
53
|
-
"license": "MIT",
|
54
|
-
"maintainers": [
|
55
|
-
{
|
56
|
-
"name": "alexguerrero",
|
57
|
-
"email": "alexguerrero1092@gmail.com"
|
58
|
-
}
|
59
|
-
],
|
60
|
-
"name": "normalize.scss",
|
61
|
-
"optionalDependencies": {},
|
62
|
-
"readme": "ERROR: No README data found!",
|
63
|
-
"repository": {
|
64
|
-
"type": "git",
|
65
|
-
"url": "git://github.com/guerrero/normalize.scss.git"
|
66
|
-
},
|
67
|
-
"scripts": {},
|
68
|
-
"style": "normalize.scss",
|
69
|
-
"version": "0.1.0"
|
70
|
-
}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
---
|
2
|
-
# this ensures Jekyll reads the file to be transformed into CSS later
|
3
|
-
# only Main files contain this front matter, not partials.
|
4
|
-
---
|
5
|
-
|
6
|
-
{% if site.logo %}
|
7
|
-
$logo: "{{ site.logo | absolute_url }}";
|
8
|
-
{% endif %}
|
9
|
-
|
10
|
-
//
|
11
|
-
// Import external dependencies
|
12
|
-
//
|
13
|
-
|
14
|
-
@import "./vendor/normalize.scss/normalize.scss";
|
15
|
-
|
16
|
-
//
|
17
|
-
// Import Just the Docs scss
|
18
|
-
//
|
19
|
-
|
20
|
-
// Support
|
21
|
-
@import "./support/support";
|
22
|
-
|
23
|
-
//
|
24
|
-
// Import custom color scheme scss
|
25
|
-
//
|
26
|
-
|
27
|
-
@import "./color_schemes/dark.scss";
|
28
|
-
|
29
|
-
// Modules
|
30
|
-
@import "./base";
|
31
|
-
@import "./layout";
|
32
|
-
@import "./content";
|
33
|
-
@import "./navigation";
|
34
|
-
@import "./typography";
|
35
|
-
@import "./labels";
|
36
|
-
@import "./buttons";
|
37
|
-
@import "./search";
|
38
|
-
@import "./tables";
|
39
|
-
@import "./code";
|
40
|
-
@import "./utilities/utilities";
|
41
|
-
|
42
|
-
//
|
43
|
-
// Import custom overrides
|
44
|
-
//
|
45
|
-
@import "./custom/custom";
|
@@ -1,49 +0,0 @@
|
|
1
|
-
---
|
2
|
-
# this ensures Jekyll reads the file to be transformed into CSS later
|
3
|
-
# only Main files contain this front matter, not partials.
|
4
|
-
---
|
5
|
-
|
6
|
-
{% if site.logo %}
|
7
|
-
$logo: "{{ site.logo | absolute_url }}";
|
8
|
-
{% endif %}
|
9
|
-
|
10
|
-
//
|
11
|
-
// Import external dependencies
|
12
|
-
//
|
13
|
-
|
14
|
-
@import "./vendor/normalize.scss/normalize.scss";
|
15
|
-
|
16
|
-
//
|
17
|
-
// Import Just the Docs scss
|
18
|
-
//
|
19
|
-
|
20
|
-
// Support
|
21
|
-
@import "./support/support";
|
22
|
-
|
23
|
-
//
|
24
|
-
// Import custom overrides
|
25
|
-
//
|
26
|
-
|
27
|
-
@import "./custom/custom";
|
28
|
-
|
29
|
-
//
|
30
|
-
// Import custom color scheme scss
|
31
|
-
//
|
32
|
-
|
33
|
-
{% if site.color_scheme == "dark" %}
|
34
|
-
@import "./color_schemes/dark.scss";
|
35
|
-
{% endif %}
|
36
|
-
|
37
|
-
// Modules
|
38
|
-
@import "./base";
|
39
|
-
@import "./layout";
|
40
|
-
@import "./content";
|
41
|
-
@import "./navigation";
|
42
|
-
@import "./typography";
|
43
|
-
@import "./labels";
|
44
|
-
@import "./buttons";
|
45
|
-
@import "./search";
|
46
|
-
@import "./tables";
|
47
|
-
@import "./code";
|
48
|
-
@import "./utilities/utilities";
|
49
|
-
@import "./overrides";
|
@@ -1,23 +0,0 @@
|
|
1
|
-
document.addEventListener("DOMContentLoaded", function(){
|
2
|
-
|
3
|
-
const toggleDarkMode = document.querySelector('.js-toggle-dark-mode')
|
4
|
-
const cssFile = document.querySelector('[rel="stylesheet"]')
|
5
|
-
const originalCssRef = cssFile.getAttribute('href')
|
6
|
-
const darkModeCssRef = originalCssRef.replace('just-the-docs.css', 'dark-mode-preview.css')
|
7
|
-
const buttonCopy = ['Return to the light side', 'Preview dark color scheme']
|
8
|
-
const updateButtonText = function(toggleDarkMode) {
|
9
|
-
toggleDarkMode.textContent === buttonCopy[0] ?
|
10
|
-
toggleDarkMode.textContent = buttonCopy[1] :
|
11
|
-
toggleDarkMode.textContent = buttonCopy[0]
|
12
|
-
}
|
13
|
-
|
14
|
-
jtd.addEvent(toggleDarkMode, 'click', function(){
|
15
|
-
if (cssFile.getAttribute('href') === originalCssRef) {
|
16
|
-
cssFile.setAttribute('href', darkModeCssRef)
|
17
|
-
updateButtonText(toggleDarkMode)
|
18
|
-
} else {
|
19
|
-
cssFile.setAttribute('href', originalCssRef)
|
20
|
-
updateButtonText(toggleDarkMode)
|
21
|
-
}
|
22
|
-
})
|
23
|
-
})
|