jekyll-rtd-theme 0.1.8 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/_includes/addons.liquid +4 -2
- data/_includes/addons/analytics/baidu.liquid +13 -13
- data/_includes/addons/analytics/google.liquid +8 -14
- data/_includes/addons/comments/disqus.liquid +1 -1
- data/_includes/addons/seo/og.liquid +1 -1
- data/_includes/addons/seo/schema.liquid +1 -1
- data/_includes/addons/source/analytics.liquid +1 -3
- data/_includes/addons/source/i18n.liquid +13 -0
- data/_includes/addons/source/{gems.liquid → plugins.liquid} +1 -1
- data/_includes/album.liquid +7 -0
- data/_includes/assets/common.js +40 -0
- data/_includes/assets/{js/custom.js → custom.js} +0 -0
- data/{_sass → _includes/assets}/custom.scss +0 -0
- data/_includes/assets/search.js +76 -0
- data/_includes/breadcrumbs.liquid +8 -2
- data/_includes/extend/toctree.liquid +10 -0
- data/_includes/footer.liquid +2 -2
- data/_includes/i18n/en.liquid +4 -2
- data/_includes/i18n/fr.liquid +29 -0
- data/_includes/i18n/it.liquid +29 -0
- data/_includes/i18n/ja.liquid +29 -0
- data/_includes/i18n/ko.liquid +29 -0
- data/_includes/i18n/ru.liquid +29 -0
- data/_includes/i18n/{zh.liquid → zh-cn.liquid} +3 -1
- data/_includes/reset/defaults.liquid +32 -21
- data/_includes/reset/i18n.liquid +30 -2
- data/_includes/reset/languages.liquid +110 -0
- data/_includes/reset/schema.liquid +4 -0
- data/_includes/reset/workdir.liquid +17 -1
- data/_layouts/default.liquid +57 -10
- data/_sass/_album.scss +25 -0
- data/_sass/_embed.scss +14 -16
- data/_sass/fluid.scss +1 -1
- data/_sass/{style.scss → site.scss} +20 -16
- data/assets/404.liquid +9 -0
- data/assets/favicon.svg +1 -1
- data/assets/js/html5shiv.min.js +4 -0
- data/assets/search.liquid +28 -0
- data/assets/sitemap.xml +1 -1
- metadata +23 -15
- data/_includes/assets/404.liquid +0 -5
- data/_includes/assets/js/core.js +0 -106
- data/_includes/assets/search.liquid +0 -7
- data/_includes/searchbox.liquid +0 -5
- data/assets/404.md +0 -5
- data/assets/search.md +0 -5
data/_sass/_album.scss
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
.flex {
|
2
|
+
display: -webkit-flex;
|
3
|
+
display: flex;
|
4
|
+
flex-wrap: wrap;
|
5
|
+
flex-direction: row;
|
6
|
+
}
|
7
|
+
|
8
|
+
.album {
|
9
|
+
@extend .flex;
|
10
|
+
|
11
|
+
.item {
|
12
|
+
@extend .flex;
|
13
|
+
flex: auto;
|
14
|
+
margin: 10px;
|
15
|
+
justify-content: center;
|
16
|
+
|
17
|
+
&:hover {
|
18
|
+
opacity: 0.7;
|
19
|
+
}
|
20
|
+
|
21
|
+
img {
|
22
|
+
width: 100%;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
data/_sass/_embed.scss
CHANGED
@@ -3,23 +3,21 @@
|
|
3
3
|
padding: 1em 1.5em;
|
4
4
|
font-size: 14px;
|
5
5
|
line-height: 20px;
|
6
|
-
}
|
7
6
|
|
8
|
-
.wy-embed {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
}
|
7
|
+
.wy-embed {
|
8
|
+
text-align: center;
|
9
|
+
padding: 1em;
|
10
|
+
color: #c2c2c2;
|
11
|
+
background: #4e4b4b;
|
12
|
+
border: 1px solid #a0a0a0;
|
13
|
+
border-radius: 5px;
|
16
14
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
15
|
+
a {
|
16
|
+
color: #e6e6e6;
|
17
|
+
}
|
21
18
|
|
22
|
-
|
23
|
-
|
19
|
+
img {
|
20
|
+
max-width: 100%;
|
21
|
+
}
|
24
22
|
}
|
25
|
-
}
|
23
|
+
}
|
data/_sass/fluid.scss
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
+
@import "_album.scss";
|
1
2
|
@import "_embed.scss";
|
2
|
-
|
3
|
+
/* custom */
|
3
4
|
p {
|
4
5
|
font-size: 15px;
|
5
6
|
}
|
@@ -10,21 +11,21 @@ footer {
|
|
10
11
|
text-align: center;
|
11
12
|
}
|
12
13
|
}
|
13
|
-
|
14
|
+
/* breadcrumbs icon */
|
14
15
|
.fa-angle-double-right {
|
15
16
|
font-size: 13px;
|
16
17
|
}
|
17
|
-
|
18
|
+
/* fixed the addon overflow */
|
18
19
|
.rst-versions {
|
19
20
|
&.shift-up {
|
20
21
|
overflow-y: auto;
|
21
22
|
}
|
22
23
|
}
|
23
|
-
|
24
|
+
/* fixed the toctree padding */
|
24
25
|
.wy-nav-side {
|
25
26
|
padding-bottom: 3em;
|
26
27
|
}
|
27
|
-
|
28
|
+
/* mobile title margin, not the best method, flex should be better */
|
28
29
|
.wy-nav-top {
|
29
30
|
a {
|
30
31
|
margin-left: -30px;
|
@@ -32,27 +33,32 @@ footer {
|
|
32
33
|
}
|
33
34
|
|
34
35
|
.rst-content {
|
36
|
+
/* fixed the long list */
|
35
37
|
ol,
|
36
38
|
ul {
|
37
39
|
overflow-x: auto;
|
38
40
|
}
|
39
|
-
|
41
|
+
/* fixed link>code */
|
40
42
|
a code.literal {
|
41
43
|
color: #2980b9;
|
42
44
|
}
|
43
|
-
|
45
|
+
/* custom */
|
44
46
|
code,
|
45
47
|
div[class^=highlight] pre,
|
46
48
|
pre {
|
47
49
|
font-family: monospace;
|
48
50
|
font-size: 12px;
|
49
51
|
}
|
52
|
+
/* theme copyright */
|
53
|
+
.copyright-rtd {
|
54
|
+
display: none;
|
55
|
+
}
|
56
|
+
/* view box of search results */
|
57
|
+
.highlighted-box {
|
58
|
+
border: 1px solid #f1c40f;
|
59
|
+
}
|
50
60
|
}
|
51
|
-
|
52
|
-
.copyright-rtd {
|
53
|
-
display: none;
|
54
|
-
}
|
55
|
-
|
61
|
+
/* fixed the last of search results display */
|
56
62
|
#search-results {
|
57
63
|
li:last-child {
|
58
64
|
border-bottom: 0;
|
@@ -61,16 +67,14 @@ footer {
|
|
61
67
|
}
|
62
68
|
@media screen and (max-width: 768px) {
|
63
69
|
.wy-nav-content-wrap {
|
70
|
+
/* custom */
|
64
71
|
.wy-nav-content {
|
65
72
|
padding: 1em;
|
66
73
|
}
|
67
74
|
}
|
68
75
|
}
|
69
76
|
@media screen and (max-width: 480px) {
|
70
|
-
|
71
|
-
font-size: 13px;
|
72
|
-
}
|
73
|
-
|
77
|
+
/* show edit on mobile */
|
74
78
|
.wy-breadcrumbs li.wy-breadcrumbs-aside {
|
75
79
|
display: initial;
|
76
80
|
}
|
data/assets/404.liquid
ADDED
data/assets/favicon.svg
CHANGED
@@ -0,0 +1,4 @@
|
|
1
|
+
/**
|
2
|
+
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
3
|
+
*/
|
4
|
+
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
permalink: /search.html
|
3
|
+
layout: default
|
4
|
+
---
|
5
|
+
|
6
|
+
{%- include reset/site_pages.liquid -%}
|
7
|
+
{%- include reset/i18n.liquid -%}
|
8
|
+
|
9
|
+
<div id="search-results">
|
10
|
+
<h2>{{ __searching }}<span>...</span></h2>
|
11
|
+
<p class="search-summary"></p>
|
12
|
+
<ul class="search"></ul>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<script>
|
16
|
+
const i18n = {
|
17
|
+
{%- for lang in site_langs -%}
|
18
|
+
{%- include i18n/{{ lang }}.liquid %}
|
19
|
+
"{{ lang }}": {
|
20
|
+
search_docs: "{{ __search_docs }}",
|
21
|
+
search_results: "{{ __search_results }}",
|
22
|
+
search_results_found: "{{ __search_results_found }}",
|
23
|
+
search_results_not_found: "{{ __search_results_not_found }}"
|
24
|
+
}{% unless forloop.last %},{% endunless %}
|
25
|
+
{%- endfor -%}
|
26
|
+
};
|
27
|
+
</script>
|
28
|
+
<script>{% include assets/search.js %}</script>
|
data/assets/sitemap.xml
CHANGED
@@ -11,7 +11,7 @@ permalink: /sitemap.xml
|
|
11
11
|
{% include reset/schema.liquid %}
|
12
12
|
<url>
|
13
13
|
<loc>{{ schema_url }}</loc>
|
14
|
-
<priority>
|
14
|
+
<priority>{{ schema_priority }}</priority>
|
15
15
|
<lastmod>{{ schema_lastmod }}</lastmod>
|
16
16
|
</url>
|
17
17
|
{%- endfor %}
|
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: 0.
|
4
|
+
version: 1.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-
|
11
|
+
date: 2020-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-pages
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '207'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '207'
|
27
27
|
description:
|
28
28
|
email:
|
29
29
|
- saowang@outlook.com
|
@@ -41,34 +41,41 @@ files:
|
|
41
41
|
- _includes/addons/seo/og.liquid
|
42
42
|
- _includes/addons/seo/schema.liquid
|
43
43
|
- _includes/addons/source/analytics.liquid
|
44
|
-
- _includes/addons/source/gems.liquid
|
45
44
|
- _includes/addons/source/github.liquid
|
46
|
-
- _includes/
|
47
|
-
- _includes/
|
48
|
-
- _includes/
|
49
|
-
- _includes/assets/
|
45
|
+
- _includes/addons/source/i18n.liquid
|
46
|
+
- _includes/addons/source/plugins.liquid
|
47
|
+
- _includes/album.liquid
|
48
|
+
- _includes/assets/common.js
|
49
|
+
- _includes/assets/custom.js
|
50
|
+
- _includes/assets/custom.scss
|
51
|
+
- _includes/assets/search.js
|
50
52
|
- _includes/breadcrumbs.liquid
|
51
53
|
- _includes/extend/list.liquid
|
52
54
|
- _includes/extend/tabs.liquid
|
53
55
|
- _includes/extend/toctree.liquid
|
54
56
|
- _includes/footer.liquid
|
55
57
|
- _includes/i18n/en.liquid
|
56
|
-
- _includes/i18n/
|
58
|
+
- _includes/i18n/fr.liquid
|
59
|
+
- _includes/i18n/it.liquid
|
60
|
+
- _includes/i18n/ja.liquid
|
61
|
+
- _includes/i18n/ko.liquid
|
62
|
+
- _includes/i18n/ru.liquid
|
63
|
+
- _includes/i18n/zh-cn.liquid
|
57
64
|
- _includes/list.liquid
|
58
65
|
- _includes/reset/defaults.liquid
|
59
66
|
- _includes/reset/i18n.liquid
|
67
|
+
- _includes/reset/languages.liquid
|
60
68
|
- _includes/reset/schema.liquid
|
61
69
|
- _includes/reset/site_pages.liquid
|
62
70
|
- _includes/reset/workdir.liquid
|
63
|
-
- _includes/searchbox.liquid
|
64
71
|
- _includes/toctree.liquid
|
65
72
|
- _layouts/default.liquid
|
66
73
|
- _layouts/plugins/compress.liquid
|
74
|
+
- _sass/_album.scss
|
67
75
|
- _sass/_embed.scss
|
68
|
-
- _sass/custom.scss
|
69
76
|
- _sass/fluid.scss
|
70
|
-
- _sass/
|
71
|
-
- assets/404.
|
77
|
+
- _sass/site.scss
|
78
|
+
- assets/404.liquid
|
72
79
|
- assets/css/fonts/Roboto-Slab-Bold.woff
|
73
80
|
- assets/css/fonts/Roboto-Slab-Bold.woff2
|
74
81
|
- assets/css/fonts/Roboto-Slab-Regular.woff
|
@@ -112,11 +119,12 @@ files:
|
|
112
119
|
- assets/css/theme.css
|
113
120
|
- assets/favicon.svg
|
114
121
|
- assets/js/anchor.min.js
|
122
|
+
- assets/js/html5shiv.min.js
|
115
123
|
- assets/js/jquery.min.js
|
116
124
|
- assets/js/theme.js
|
117
125
|
- assets/pages.json
|
118
126
|
- assets/robots.txt
|
119
|
-
- assets/search.
|
127
|
+
- assets/search.liquid
|
120
128
|
- assets/sitemap.xml
|
121
129
|
homepage: https://github.com/rundocs/jekyll-rtd-theme
|
122
130
|
licenses:
|
data/_includes/assets/404.liquid
DELETED
data/_includes/assets/js/core.js
DELETED
@@ -1,106 +0,0 @@
|
|
1
|
-
function feedback(type, message) {
|
2
|
-
console.log(`feedback: https://github.com/rundocs/jekyll-rtd-theme/issues?q=${type}+${message}`);
|
3
|
-
}
|
4
|
-
|
5
|
-
function search(data) {
|
6
|
-
let text = new URL(location.href).searchParams.get("q");
|
7
|
-
let results = [];
|
8
|
-
let regexp = new RegExp(text, "im");
|
9
|
-
|
10
|
-
function slice(content, min, max) {
|
11
|
-
return content.slice(min, max).replace(regexp, (match) => `<span class="highlighted">${match}</span>`);
|
12
|
-
}
|
13
|
-
for (page of data) {
|
14
|
-
let [title, content] = [null, null];
|
15
|
-
try {
|
16
|
-
if (page.title) {
|
17
|
-
title = page.title.match(regexp);
|
18
|
-
} else {
|
19
|
-
if (page.url == "/") {
|
20
|
-
page.title = "{{ site.title }}";
|
21
|
-
} else {
|
22
|
-
page.title = page.url;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
} catch (e) {
|
26
|
-
feedback("search", e.message);
|
27
|
-
}
|
28
|
-
try {
|
29
|
-
if (page.content) {
|
30
|
-
page.content = $("<div/>").html(page.content).text();
|
31
|
-
content = page.content.match(regexp);
|
32
|
-
}
|
33
|
-
} catch (e) {
|
34
|
-
feedback("search", e.message);
|
35
|
-
}
|
36
|
-
if (title || content) {
|
37
|
-
let result = [`<a href="{{ site.baseurl }}${page.url}">${page.title}</a>`];
|
38
|
-
if (content) {
|
39
|
-
let [min, max] = [content.index - 100, content.index + 100];
|
40
|
-
let [prefix, suffix] = ["...", "..."];
|
41
|
-
|
42
|
-
if (min < 0) {
|
43
|
-
prefix = "";
|
44
|
-
min = 0;
|
45
|
-
}
|
46
|
-
if (max > page.content.length) {
|
47
|
-
suffix = "";
|
48
|
-
max = page.content.length;
|
49
|
-
}
|
50
|
-
result.push(`<p class="context">${prefix}${slice(page.content ,min, max)}${suffix}</p>`);
|
51
|
-
}
|
52
|
-
results.push(`<li>${result.join("")}</li>`);
|
53
|
-
}
|
54
|
-
}
|
55
|
-
if (results.length > 0 && text.length > 0) {
|
56
|
-
$("#search-results ul.search").html(results.join(""));
|
57
|
-
$("#search-results p.search-summary").html("{{ __search_results_found }}".replace("#", results.length));
|
58
|
-
} else {
|
59
|
-
$("#search-results ul.search").empty();
|
60
|
-
$("#search-results p.search-summary").html("{{ __search_results_not_found }}");
|
61
|
-
}
|
62
|
-
$("#rtd-search-form [name='q']").val(text);
|
63
|
-
$("#search-results h2").html("{{ __search_results }}");
|
64
|
-
}
|
65
|
-
|
66
|
-
function reset() {
|
67
|
-
const link = $(".wy-menu-vertical").find(`[href="${location.pathname}"]`);
|
68
|
-
if (link.length > 0) {
|
69
|
-
$(".wy-menu-vertical .current").removeClass("current");
|
70
|
-
link.addClass("current");
|
71
|
-
link.closest("li.toctree-l1").parent().addClass("current");
|
72
|
-
link.closest("li.toctree-l1").addClass("current");
|
73
|
-
link.closest("li.toctree-l2").addClass("current");
|
74
|
-
link.closest("li.toctree-l3").addClass("current");
|
75
|
-
link.closest("li.toctree-l4").addClass("current");
|
76
|
-
link.closest("li.toctree-l5").addClass("current");
|
77
|
-
}
|
78
|
-
}
|
79
|
-
|
80
|
-
function admonition() {
|
81
|
-
const items = {
|
82
|
-
note: "{{ __note }}",
|
83
|
-
tip: "{{ __tip }}",
|
84
|
-
warning: "{{ __warning }}",
|
85
|
-
danger: "{{ __danger }}"
|
86
|
-
};
|
87
|
-
for (let item in items) {
|
88
|
-
let content = $(`.language-${item}`).html();
|
89
|
-
$(`.language-${item}`).replaceWith(`<div class="admonition ${item}"><p class="admonition-title">${items[item]}</p><p>${content}</p></div>`);
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
|
-
$(document).ready(function() {
|
94
|
-
if (location.pathname == "{{ site.baseurl }}/search.html") {
|
95
|
-
$.ajax({
|
96
|
-
dataType: "json",
|
97
|
-
url: "{{ site.baseurl }}/pages.json"
|
98
|
-
})
|
99
|
-
.done(search)
|
100
|
-
.fail((xhr, message) => feedback("search", message));
|
101
|
-
}
|
102
|
-
admonition();
|
103
|
-
anchors.add();
|
104
|
-
SphinxRtdTheme.Navigation.reset = reset;
|
105
|
-
SphinxRtdTheme.Navigation.enable(true);
|
106
|
-
});
|