jekyll-rtd-theme 2.0.0.pre.beta → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +68 -22
- data/_includes/addons/analytics.liquid +4 -4
- data/_includes/addons/github.liquid +10 -7
- data/_includes/assets/custom.js +0 -0
- data/_includes/assets/custom.scss +0 -0
- data/_includes/assets/sw.caches.js +3 -7
- data/_includes/{breadcrumbs.liquid → class/_breadcrumbs.liquid} +11 -5
- data/_includes/{footer.liquid → class/_footer.liquid} +14 -9
- data/_includes/{toctree.liquid → class/_toctree.liquid} +4 -4
- data/_includes/class/addons-wrap.liquid +26 -0
- data/_includes/class/content-wrap.liquid +20 -0
- data/_includes/class/sidebar-wrap.liquid +18 -0
- data/_includes/extend/list.liquid +2 -2
- data/_includes/extend/toctree.liquid +10 -6
- data/_includes/extra/footer.html +0 -0
- data/_includes/extra/head.html +0 -0
- data/_includes/list.liquid +1 -1
- data/_includes/node/links.liquid +24 -0
- data/_includes/node/metadata.liquid +21 -0
- data/_includes/node/script.extension.liquid +29 -0
- data/_includes/node/script.liquid +19 -0
- data/_includes/node/script.schema.liquid +27 -0
- data/_includes/node/title.liquid +1 -0
- data/_includes/reset/content.liquid +5 -0
- data/_includes/reset/defaults.liquid +8 -51
- data/_includes/reset/description.liquid +6 -0
- data/_includes/reset/i18n.liquid +1 -0
- data/_includes/reset/navigation.liquid +20 -0
- data/_includes/{extend → reset}/tabs.liquid +0 -0
- data/_includes/reset/title.liquid +18 -0
- data/_includes/reset/variables.liquid +31 -0
- data/_includes/reset/version.liquid +1 -0
- data/_includes/reset/workdir.liquid +0 -1
- data/_includes/shortcodes/danger.liquid +8 -6
- data/_includes/shortcodes/note.liquid +8 -6
- data/_includes/shortcodes/tip.liquid +8 -6
- data/_includes/shortcodes/warning.liquid +8 -6
- data/_layouts/default.liquid +20 -184
- data/_layouts/plugins/extension.liquid +4 -3
- data/_sass/@primer/forms/form-control.scss +6 -3
- data/_sass/@primer/loaders/index.scss +2 -0
- data/_sass/@primer/loaders/loaders.scss +21 -0
- data/_sass/@primer/markdown/lists.scss +1 -0
- data/_sass/@primer/support/variables/misc.scss +1 -0
- data/_sass/@primer/utilities/borders.scss +6 -3
- data/_sass/@primer/utilities/flexbox.scss +3 -0
- data/_sass/@primer/utilities/layout.scss +42 -25
- data/_sass/_font-face.scss +7 -6
- data/_sass/_icons.scss +4 -0
- data/_sass/_layout.scss +3 -4
- data/_sass/_reset.scss +0 -8
- data/_sass/_variables.scss +10 -7
- data/_sass/class/admonition.scss +47 -0
- data/_sass/class/container.scss +1 -1
- data/_sass/class/markdown-body.scss +28 -9
- data/_sass/class/sidebar-wrap.scss +50 -27
- data/_sass/class/title.scss +0 -1
- data/_sass/theme.scss +9 -7
- data/assets/404.liquid +3 -1
- data/assets/css/theme.min.css +1 -1
- data/assets/js/mermaid.min.js +0 -1
- data/assets/js/theme.js +242 -191
- data/assets/js/theme.min.js +1 -1
- data/assets/search.liquid +5 -14
- data/assets/sw.caches.liquid +1 -1
- metadata +33 -11
- data/_includes/safe/shortcodes.liquid +0 -9
- data/assets/js/search.js +0 -90
data/assets/js/theme.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(t){var e={};function n(
|
1
|
+
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(r,a,function(e){return t[e]}.bind(null,a));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){n(1),t.exports=n(2)},function(t,e){function n(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var a=0,o=function(){};return{s:o,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,l=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,c=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw c}}}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e=$(".toctree").find('[href="'.concat(decodeURI(t),'"]'));if(e.length>0){$(".toctree .current").removeClass("current"),e.addClass("current"),e.closest(".level-1").parent().addClass("current");for(var n=1;n<=11;n++)e.closest(".level-".concat(n)).addClass("current")}}function o(t,e){return localStorage.setItem(t,e)}function c(t){return localStorage.getItem(t)||!1}function l(){console.debug.apply(console,arguments)}var s,i,u,h;$(window).bind("hashchange",(function(){return a(location.hash||location.pathname)})),$(document).on("scroll",(function(){var t=$(this).scrollTop()+5,e=[];$(".markdown-body").find("h1,h2,h3,h4,h5,h6").each((function(){e.push({offset:$(this).offset().top,id:this.id,level:parseInt(this.tagName.slice(1))})}));for(var n=0;n<e.length;n++)t>e[n].offset&&(n<e.length-1?t<e[n+1].offset&&(1==e[n].level?a(location.pathname):a("#"+e[n].id)):a("#"+e[n].id))})),$("#toggle").click((function(){$(".sidebar-wrap,.content-wrap,.addons-wrap").toggleClass("shift")})),$(".status").click((function(){$(".addons").toggleClass("d-none")})),$(".toc ul").siblings("a").each((function(){var t=$(this),e=$('<i class="fa fa-plus-square-o"></i>');e.on("click",(function(e){return e.stopPropagation(),function(t){var e=t.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}(t),!1})),t.prepend(e)})),location.pathname=="".concat(ui.baseurl,"/search.html")&&$.ajax("".concat(ui.baseurl,"/pages.json")).done((function(t){var e=new URL(location.href).searchParams.get("q");new URL(location.href).searchParams.get("lang")||ui.lang,$("input[name='q']").val(e);var r=[],a=new RegExp;try{a=new RegExp(e,"im")}catch(t){return $(".search-results .content").empty(),$(".search-results .summary").html(ui.i18n.search_results_not_found),$(".search-results h2").html(ui.i18n.search_results),l(t.message)}function o(t,e,n){return t.slice(e,n).replace(a,(function(t){return'<span class="bg-yellow">'.concat(t,"</span>")}))}var c,s=n(t);try{for(s.s();!(c=s.n()).done;){page=c.value;var i=null,u=null;try{page.title?i=page.title.match(a):"/"==page.url?page.title=ui.title:page.title=page.url}catch(t){l(t.message)}try{page.content&&(page.content=$("<div/>").html(page.content).text(),u=page.content.match(a))}catch(t){l(t.message)}if(i||u){var h=['<a href="'.concat(ui.baseurl).concat(page.url,"?highlight=").concat(e,'">').concat(page.title,"</a>")];if(u){var f=u.index-100,p=u.index+100,d="...",g="...";f<0&&(d="",f=0),p>page.content.length&&(g="",p=page.content.length),h.push('<p class="text-gray">'.concat(d).concat(o(page.content,f,p)).concat(g,"</p>"))}r.push('<li class="border-top py-4">'.concat(h.join(""),"</li>"))}}}catch(t){s.e(t)}finally{s.f()}r.length>0&&e.length>0?($(".search-results .content").html(r.join("")),$(".search-results .summary").html(ui.i18n.search_results_found.replace("#",r.length))):($(".search-results .content").empty(),$(".search-results .summary").html(ui.i18n.search_results_not_found)),$(".search-results h2").html(ui.i18n.search_results)})).fail((function(t,e){return l(e)})),$(".toctree li.current").append('<ul class="content-toc"></ul>').html((function(){var t=parseInt(this.dataset.level),e=0,n=[$(this).find(".content-toc")];$(".markdown-body").find("h2,h3,h4,h5,h6").each((function(){var r=$("<a/>").addClass("d-flex flex-items-baseline").text($(this).text()).attr("href","#".concat(this.id)),a=parseInt(this.tagName.slice(1))-1;if(a>e){var o=n[0].children("li:last")[0];o&&n.unshift($("<ul/>").appendTo(o))}else n.splice(0,Math.min(e-a,Math.max(n.length-1,0)));e=a,$("<li/>").addClass("toc level-".concat(t+a)).append(r).appendTo(n[0])})),n[0].html()||n[0].remove()})),a(location.pathname),a(location.hash),s=c("scroll"),i=c("scrollTime"),u=c("scrollHost"),s&&i&&u&&u==location.host&&Date.now()-i<6e5&&$(".sidebar").scrollTop(s),$(".sidebar").scroll((function(){o("scroll",this.scrollTop),o("scrollTime",Date.now()),o("scrollHost",location.host)})),(h=new URL(location.href).searchParams.get("highlight"))&&($(".markdown-body").find("*").each((function(){try{this.outerHTML.match(new RegExp(h,"im"))&&($(this).addClass("search-result"),$(this).parentsUntil(".markdown-body").removeClass("search-result"))}catch(t){l(t.message)}})),$(".search-result").each((function(){$(this).html((function(t,e){return e.replace(h,'<span class="bg-yellow">'.concat(h,"</span>"))}))})),$(".search input").val(h)),"serviceWorker"in navigator?navigator.serviceWorker.register("".concat(ui.baseurl,"/sw.caches.js")):l("Service Worker not supported!"),ui.collect.searchParams.append("host",location.host),ui.collect.searchParams.append("user_lang",navigator.language),ui.collect.searchParams.append("platform",navigator.platform),$.getJSON(ui.collect.toString(),(function(t){return $("#counter").html(t.count)}))},function(t,e,n){}]);
|
data/assets/search.liquid
CHANGED
@@ -3,19 +3,10 @@ layout: default
|
|
3
3
|
permalink: /search.html
|
4
4
|
---
|
5
5
|
|
6
|
-
{%- include reset/
|
6
|
+
{%- include reset/i18n.liquid -%}
|
7
7
|
|
8
|
-
<div
|
9
|
-
<h2>{{
|
10
|
-
<p class="
|
11
|
-
<ul class="
|
8
|
+
<div class="search-results">
|
9
|
+
<h2>{{ __.searching | default: "Searching"}}<span class="AnimatedEllipsis"></span></h2>
|
10
|
+
<p class="summary"></p>
|
11
|
+
<ul class="content pl-0"></ul>
|
12
12
|
</div>
|
13
|
-
|
14
|
-
<script>
|
15
|
-
window.i18n = {
|
16
|
-
search_docs: "{{ __search_docs }}",
|
17
|
-
search_results: "{{ __search_results }}",
|
18
|
-
search_results_found: "{{ __search_results_found }}",
|
19
|
-
search_results_not_found: "{{ __search_results_not_found }}"
|
20
|
-
};
|
21
|
-
</script>
|
data/assets/sw.caches.liquid
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-rtd-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saowang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-pages
|
@@ -35,23 +35,42 @@ files:
|
|
35
35
|
- README.md
|
36
36
|
- _includes/addons/analytics.liquid
|
37
37
|
- _includes/addons/github.liquid
|
38
|
+
- _includes/assets/custom.js
|
39
|
+
- _includes/assets/custom.scss
|
38
40
|
- _includes/assets/sw.caches.js
|
39
|
-
- _includes/
|
41
|
+
- _includes/class/_breadcrumbs.liquid
|
42
|
+
- _includes/class/_footer.liquid
|
43
|
+
- _includes/class/_toctree.liquid
|
44
|
+
- _includes/class/addons-wrap.liquid
|
45
|
+
- _includes/class/content-wrap.liquid
|
46
|
+
- _includes/class/sidebar-wrap.liquid
|
40
47
|
- _includes/extend/list.liquid
|
41
|
-
- _includes/extend/tabs.liquid
|
42
48
|
- _includes/extend/toctree.liquid
|
43
|
-
- _includes/footer.
|
49
|
+
- _includes/extra/footer.html
|
50
|
+
- _includes/extra/head.html
|
44
51
|
- _includes/list.liquid
|
52
|
+
- _includes/node/links.liquid
|
53
|
+
- _includes/node/metadata.liquid
|
54
|
+
- _includes/node/script.extension.liquid
|
55
|
+
- _includes/node/script.liquid
|
56
|
+
- _includes/node/script.schema.liquid
|
57
|
+
- _includes/node/title.liquid
|
58
|
+
- _includes/reset/content.liquid
|
45
59
|
- _includes/reset/defaults.liquid
|
60
|
+
- _includes/reset/description.liquid
|
61
|
+
- _includes/reset/i18n.liquid
|
62
|
+
- _includes/reset/navigation.liquid
|
46
63
|
- _includes/reset/site_pages.liquid
|
64
|
+
- _includes/reset/tabs.liquid
|
65
|
+
- _includes/reset/title.liquid
|
66
|
+
- _includes/reset/variables.liquid
|
67
|
+
- _includes/reset/version.liquid
|
47
68
|
- _includes/reset/workdir.liquid
|
48
|
-
- _includes/safe/shortcodes.liquid
|
49
69
|
- _includes/shortcodes/danger.liquid
|
50
70
|
- _includes/shortcodes/mermaid.liquid
|
51
71
|
- _includes/shortcodes/note.liquid
|
52
72
|
- _includes/shortcodes/tip.liquid
|
53
73
|
- _includes/shortcodes/warning.liquid
|
54
|
-
- _includes/toctree.liquid
|
55
74
|
- _layouts/default.liquid
|
56
75
|
- _layouts/plugins/compress.liquid
|
57
76
|
- _layouts/plugins/extension.liquid
|
@@ -73,6 +92,8 @@ files:
|
|
73
92
|
- _sass/@primer/forms/index.scss
|
74
93
|
- _sass/@primer/forms/input-group.scss
|
75
94
|
- _sass/@primer/forms/radio-group.scss
|
95
|
+
- _sass/@primer/loaders/index.scss
|
96
|
+
- _sass/@primer/loaders/loaders.scss
|
76
97
|
- _sass/@primer/markdown/blob-csv.scss
|
77
98
|
- _sass/@primer/markdown/code.scss
|
78
99
|
- _sass/@primer/markdown/headings.scss
|
@@ -110,6 +131,7 @@ files:
|
|
110
131
|
- _sass/_root.scss
|
111
132
|
- _sass/_variables.scss
|
112
133
|
- _sass/class/addons-wrap.scss
|
134
|
+
- _sass/class/admonition.scss
|
113
135
|
- _sass/class/container.scss
|
114
136
|
- _sass/class/content-wrap.scss
|
115
137
|
- _sass/class/header.scss
|
@@ -141,7 +163,6 @@ files:
|
|
141
163
|
- assets/favicon.liquid
|
142
164
|
- assets/js/jquery.min.js
|
143
165
|
- assets/js/mermaid.min.js
|
144
|
-
- assets/js/search.js
|
145
166
|
- assets/js/theme.js
|
146
167
|
- assets/js/theme.min.js
|
147
168
|
- assets/pages.liquid
|
@@ -164,12 +185,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
185
|
version: '0'
|
165
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
187
|
requirements:
|
167
|
-
- - "
|
188
|
+
- - ">="
|
168
189
|
- !ruby/object:Gem::Version
|
169
|
-
version:
|
190
|
+
version: '0'
|
170
191
|
requirements: []
|
171
192
|
rubygems_version: 3.1.2
|
172
193
|
signing_key:
|
173
194
|
specification_version: 4
|
174
|
-
summary: Opinionated github flavored
|
195
|
+
summary: Opinionated github flavored standard document theme for open source projects,
|
196
|
+
with few options, but everything!
|
175
197
|
test_files: []
|
data/assets/js/search.js
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
function search(data) {
|
2
|
-
let text = new URL(location.href).searchParams.get("q");
|
3
|
-
let lang = new URL(location.href).searchParams.get("lang") || ui.lang;
|
4
|
-
|
5
|
-
$("input[name='q']").val(text);
|
6
|
-
$("input[name='q']").attr("placeholder", i18n[lang].search_docs + "...");
|
7
|
-
|
8
|
-
let results = [];
|
9
|
-
let regexp = new RegExp();
|
10
|
-
try {
|
11
|
-
regexp = new RegExp(text, "im");
|
12
|
-
} catch (e) {
|
13
|
-
$(".search").empty();
|
14
|
-
$(".search-summary").html(i18n[lang].search_results_not_found);
|
15
|
-
$("#search-results h2").html(i18n[lang].search_results);
|
16
|
-
return debug(e.message);
|
17
|
-
}
|
18
|
-
|
19
|
-
function slice(content, min, max) {
|
20
|
-
return content
|
21
|
-
.slice(min, max)
|
22
|
-
.replace(regexp, (match) => `<span class="highlighted">${match}</span>`);
|
23
|
-
}
|
24
|
-
for (page of data) {
|
25
|
-
let [title, content] = [null, null];
|
26
|
-
try {
|
27
|
-
if (page.title) {
|
28
|
-
title = page.title.match(regexp);
|
29
|
-
} else {
|
30
|
-
if (page.url == "/") {
|
31
|
-
page.title = ui.title;
|
32
|
-
} else {
|
33
|
-
page.title = page.url;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
} catch (e) {
|
37
|
-
debug(e.message);
|
38
|
-
}
|
39
|
-
try {
|
40
|
-
if (page.content) {
|
41
|
-
page.content = $("<div/>").html(page.content).text();
|
42
|
-
content = page.content.match(regexp);
|
43
|
-
}
|
44
|
-
} catch (e) {
|
45
|
-
debug(e.message);
|
46
|
-
}
|
47
|
-
if (title || content) {
|
48
|
-
let result = [
|
49
|
-
`<a href="${ui.baseurl}${page.url}?highlight=${text}">${page.title}</a>`,
|
50
|
-
];
|
51
|
-
if (content) {
|
52
|
-
let [min, max] = [content.index - 100, content.index + 100];
|
53
|
-
let [prefix, suffix] = ["...", "..."];
|
54
|
-
|
55
|
-
if (min < 0) {
|
56
|
-
prefix = "";
|
57
|
-
min = 0;
|
58
|
-
}
|
59
|
-
if (max > page.content.length) {
|
60
|
-
suffix = "";
|
61
|
-
max = page.content.length;
|
62
|
-
}
|
63
|
-
result.push(
|
64
|
-
`<p class="context">${prefix}${slice(
|
65
|
-
page.content,
|
66
|
-
min,
|
67
|
-
max
|
68
|
-
)}${suffix}</p>`
|
69
|
-
);
|
70
|
-
}
|
71
|
-
results.push(`<li>${result.join("")}</li>`);
|
72
|
-
}
|
73
|
-
}
|
74
|
-
if (results.length > 0 && text.length > 0) {
|
75
|
-
$(".search").html(results.join(""));
|
76
|
-
$(".search-summary").html(
|
77
|
-
i18n[lang].search_results_found.replace("#", results.length)
|
78
|
-
);
|
79
|
-
} else {
|
80
|
-
$(".search").empty();
|
81
|
-
$(".search-summary").html(i18n[lang].search_results_not_found);
|
82
|
-
}
|
83
|
-
$("#search-results h2").html(i18n[lang].search_results);
|
84
|
-
}
|
85
|
-
|
86
|
-
$(document).ready(function () {
|
87
|
-
$.ajax(`${ui.baseurl}/pages.json`)
|
88
|
-
.done(search)
|
89
|
-
.fail((xhr, message) => debug(message));
|
90
|
-
});
|