jekyll-rtd-theme 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f94a7289ccca794b05555f5b78e270b6ccd2923b124ea0f3b105edd72c8ce90
4
- data.tar.gz: a9980784705a9095519cfcab9678b89867cd7312e3b525594f32621ad1b7046f
3
+ metadata.gz: ce83e5fded9b546214f895e23e6201513528b3983ff0d0c8327cbd00aac257a4
4
+ data.tar.gz: 7b0e1c1952a373332e021674262c0c5345db66db013f75c9a5be041d74635ce2
5
5
  SHA512:
6
- metadata.gz: 328562d6d9430cedd7d7b93b8586f958117c0dec1dcfc0fbb75d3d2f1b7470d1b7140d02aee80101b9f9b96b1e453c3b8bc86b16ace4bd134c2ce232853d4288
7
- data.tar.gz: 245e29a661dbc001da381b865aec75e01bda6019d6984b8cfb0049dfcf4d93552d47bb1e5b21f412e0f9756249a605a66dfa972a580dc36961b19f18c5c9d982
6
+ metadata.gz: 631141d782ff15262ee5c58cc04c80547c21f879447ce832f5e3073dcc8ccd596566ec733e053001fc1f4869137ddc014be0017368aa02b9911f01065fdc8dbd
7
+ data.tar.gz: fe61300c17e3f8c8daf3b73a830a3e4698a25b2dcbd05711d49f9e531a18f405d1f0334851bc2bc659f97e151743952fdbba556bb40ca4cca37ae21d37f58270
@@ -0,0 +1,7 @@
1
+ <div class="album">
2
+ {%- for item in include.data -%}
3
+ <a class="item" href="{{ item.href | default: '#' }}">
4
+ <img src="{{ item.image }}">{{ item.name }}
5
+ </a>
6
+ {%- endfor -%}
7
+ </div>
File without changes
@@ -2,6 +2,24 @@ function feedback(type, message) {
2
2
  console.log(`feedback: https://github.com/rundocs/jekyll-rtd-theme/issues?q=${type}+${message}`);
3
3
  }
4
4
 
5
+ function highlight() {
6
+ let text = new URL(location.href).searchParams.get("highlight");
7
+ let regexp = new RegExp(text, "im");
8
+
9
+ if (text) {
10
+ $(".section").find("*").each(function() {
11
+ if (this.outerHTML.match(regexp)) {
12
+ $(this).addClass("highlighted-box");
13
+ }
14
+ });
15
+ $(".section").find(".highlighted-box").each(function() {
16
+ if (($(this).find(".highlighted-box").length > 0)) {
17
+ $(this).removeClass("highlighted-box");
18
+ }
19
+ });
20
+ }
21
+ }
22
+
5
23
  function search(data) {
6
24
  let text = new URL(location.href).searchParams.get("q");
7
25
  let results = [];
@@ -34,7 +52,7 @@ function search(data) {
34
52
  feedback("search", e.message);
35
53
  }
36
54
  if (title || content) {
37
- let result = [`<a href="{{ site.baseurl }}${page.url}">${page.title}</a>`];
55
+ let result = [`<a href="{{ site.baseurl }}${page.url}?highlight=${text}">${page.title}</a>`];
38
56
  if (content) {
39
57
  let [min, max] = [content.index - 100, content.index + 100];
40
58
  let [prefix, suffix] = ["...", "..."];
@@ -101,6 +119,7 @@ $(document).ready(function() {
101
119
  }
102
120
  admonition();
103
121
  anchors.add();
122
+ highlight();
104
123
  SphinxRtdTheme.Navigation.reset = reset;
105
124
  SphinxRtdTheme.Navigation.enable(true);
106
125
  });
@@ -1,5 +1,5 @@
1
1
  {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
2
- {%- assign version = "0.1.8" -%}
2
+ {%- assign version = "0.1.9" -%}
3
3
  {%- assign addons = "github, gems, analytics" | split: ", " -%}
4
4
 
5
5
  {%- include reset/site_pages.liquid %}
@@ -27,16 +27,16 @@
27
27
 
28
28
  {% comment %} scss and script {% endcomment %}
29
29
  {%- capture site_scss -%}
30
- @import "style.scss";
30
+ @import "site.scss";
31
31
  {%- if site.fluid %}
32
32
  @import "fluid.scss";
33
33
  {% endif -%}
34
- @import "custom.scss"; {{ site.scss }}
34
+ {% include assets/custom.scss %} {{ site.scss }}
35
35
  {%- endcapture -%}
36
36
 
37
37
  {%- capture site_script %}
38
- {% include assets/js/core.js %}
39
- {% include assets/js/custom.js %} {{ site.script }}
38
+ {% include assets/site.js %}
39
+ {% include assets/custom.js %} {{ site.script }}
40
40
  {%- endcapture -%}
41
41
 
42
42
  {%- if site.debug -%}
@@ -0,0 +1,107 @@
1
+ ---
2
+ layout: plugins/compress
3
+ ---
4
+
5
+ {%- include reset/defaults.liquid -%}
6
+
7
+ <!DOCTYPE html>
8
+
9
+ <!--
10
+ {% if site.remote_theme -%}
11
+ remote_theme: {{ site.remote_theme }}, based on v{{ version }}
12
+ {%- else -%}
13
+ theme: {{ site.theme | default: "jekyll-rtd-theme, based on" }} v{{ version }}
14
+ {%- endif %}
15
+ -->
16
+
17
+ <html class="writer-html5" lang="{{ lang }}">
18
+
19
+ <head>
20
+ <meta charset="utf-8">
21
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
22
+ <title>{{ title }}</title>
23
+ <!-- meta -->
24
+ <meta name="description" content="{{ description }}">
25
+ <meta name="author" content="{{ author }}">
26
+ <meta name="revised" content="{{ commit }}">
27
+ <meta name="generator" content="jekyll-rtd-theme v{{ version }}">
28
+ <!-- custom meta -->
29
+ {% for meta in site.meta -%}
30
+ <meta name="{{ meta.first }}" content="{{ meta.last }}">
31
+ {% endfor -%}
32
+ <!-- og -->
33
+ {% include addons/seo/og.liquid %}
34
+ <!-- schema -->
35
+ {% include addons/seo/schema.liquid %}
36
+ <!-- link -->
37
+ {% if prev -%}
38
+ <link rel="prev" href="{{ prev.url | absolute_url | xml_escape }}">
39
+ {%- endif -%}
40
+ {%- if next -%}
41
+ <link rel="next" href="{{ next.url | absolute_url | xml_escape }}">
42
+ {%- endif -%}
43
+ <link rel="canonical" href="{{ schema_url }}">
44
+ <!-- theme -->
45
+ <link rel="stylesheet" href="{{ cdn }}/assets/css/theme.css">
46
+ <link rel="stylesheet" href="{{ cdn }}/assets/css/rougify/{{ site.rougify | default: 'github' }}.css">
47
+ <style>{{ site_scss | scssify }}</style>
48
+ <!-- icon -->
49
+ <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/favicon.svg">
50
+ <!-- script -->
51
+ <script src="{{ cdn }}/assets/js/jquery.min.js"></script>
52
+ <script src="{{ cdn }}/assets/js/theme.js"></script>
53
+ <script src="{{ cdn }}/assets/js/anchor.min.js"></script>
54
+ <script>{{ site_script }}</script>
55
+ </head>
56
+
57
+ <body class="wy-body-for-nav">
58
+ <div class="wy-grid-for-nav">
59
+ <!-- SIDE NAV, TOGGLES ON MOBILE -->
60
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
61
+ <div class="wy-side-scroll">
62
+ <div class="wy-side-nav-search">
63
+ {% if site.logo %}
64
+ <a href="{{ site.baseurl }}/">
65
+ <img src="{{ site.baseurl }}/{{ site.logo }}" class="logo" alt="{{ site.title }}">
66
+ </a>
67
+ {% else %}
68
+ <a href="{{ site.baseurl }}/" class="icon icon-home"> {{ site.title }}</a>
69
+ {% endif %}
70
+ {% include searchbox.liquid %}
71
+ </div>
72
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
73
+ {% include toctree.liquid %}
74
+ </div>
75
+ {%- if site.embed -%}
76
+ <div class="wy-embed-wrap">
77
+ <div class="wy-embed">{{ site.embed }}</div>
78
+ </div>
79
+ {%- endif -%}
80
+ </div>
81
+ </nav>
82
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
83
+ <!-- MOBILE NAV -->
84
+ <nav class="wy-nav-top" aria-label="top navigation">
85
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
86
+ <a href="{{ site.baseurl }}/">{{ site.title }}</a>
87
+ </nav>
88
+ <div class="wy-nav-content">
89
+ <div class="rst-content">
90
+ {% include breadcrumbs.liquid %}
91
+ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
92
+ <div itemprop="articleBody">{{ content }}</div>
93
+ {% include addons/comments/disqus.liquid %}
94
+ </div>
95
+ {% include footer.liquid %}
96
+ </div>
97
+ </div>
98
+ </section>
99
+ </div>
100
+ {%- if site.addons %}{% include addons.liquid %}{% endif %}
101
+ <!-- analytics -->
102
+ {%- include addons/analytics/baidu.liquid -%}
103
+ {%- include addons/analytics/cnzz.liquid -%}
104
+ {%- include addons/analytics/google.liquid -%}
105
+ </body>
106
+
107
+ </html>
@@ -1,113 +1,5 @@
1
1
  ---
2
- layout: plugins/compress
2
+ layout: basic
3
3
  ---
4
4
 
5
- {%- include reset/defaults.liquid -%}
6
-
7
- <!DOCTYPE html>
8
-
9
- <!--
10
- {% if site.remote_theme -%}
11
- remote_theme: {{ site.remote_theme }}, based on v{{ version }}
12
- {%- else -%}
13
- theme: {{ site.theme | default: "jekyll-rtd-theme, based on" }} v{{ version }}
14
- {%- endif %}
15
- -->
16
-
17
- <html class="writer-html5" lang="{{ lang }}">
18
-
19
- <head>
20
- <meta charset="utf-8">
21
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
22
- <title>{{ title }}</title>
23
- <!-- meta -->
24
- <meta name="description" content="{{ description }}">
25
- <meta name="author" content="{{ author }}">
26
- <meta name="revised" content="{{ commit }}">
27
- <meta name="generator" content="jekyll-rtd-theme v{{ version }}">
28
- <!-- custom meta -->
29
- {% for meta in site.meta -%}
30
- <meta name="{{ meta.first }}" content="{{ meta.last }}">
31
- {% endfor -%}
32
- <!-- og -->
33
- {% include addons/seo/og.liquid %}
34
- <!-- schema -->
35
- {% include addons/seo/schema.liquid %}
36
- <!-- link -->
37
- {% if prev -%}
38
- <link rel="prev" href="{{ prev.url | absolute_url | xml_escape }}">
39
- {%- endif -%}
40
- {%- if next -%}
41
- <link rel="next" href="{{ next.url | absolute_url | xml_escape }}">
42
- {%- endif -%}
43
- <link rel="canonical" href="{{ schema_url }}">
44
- <!-- theme -->
45
- <link rel="stylesheet" href="{{ cdn }}/assets/css/theme.css">
46
- <link rel="stylesheet" href="{{ cdn }}/assets/css/rougify/{{ site.rougify | default: 'github' }}.css">
47
- <style>{{ site_scss | scssify }}</style>
48
- <!-- icon -->
49
- <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/favicon.svg">
50
- <!-- script -->
51
- <script src="{{ cdn }}/assets/js/jquery.min.js"></script>
52
- <script src="{{ cdn }}/assets/js/theme.js"></script>
53
- <script src="{{ cdn }}/assets/js/anchor.min.js"></script>
54
- <script>{{ site_script }}</script>
55
- </head>
56
-
57
- <body class="wy-body-for-nav">
58
- <div class="wy-grid-for-nav">
59
- <!-- SIDE NAV, TOGGLES ON MOBILE -->
60
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
61
- <div class="wy-side-scroll">
62
- <div class="wy-side-nav-search">
63
- {% if site.logo %}
64
- <a href="{{ site.baseurl }}/">
65
- <img src="{{ site.baseurl }}/{{ site.logo }}" class="logo" alt="{{ site.title }}">
66
- </a>
67
- {% else %}
68
- <a href="{{ site.baseurl }}/" class="icon icon-home"> {{ site.title }}</a>
69
- {% endif %}
70
- {% include searchbox.liquid %}
71
- </div>
72
- <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
73
- {% include toctree.liquid %}
74
- </div>
75
- {%- if site.embed -%}
76
- <div class="wy-embed-wrap">
77
- <div class="wy-embed">{{ site.embed }}</div>
78
- </div>
79
- {%- endif -%}
80
- </div>
81
- </nav>
82
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
83
- <!-- MOBILE NAV -->
84
- <nav class="wy-nav-top" aria-label="top navigation">
85
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
86
- <a href="{{ site.baseurl }}/">{{ site.title }}</a>
87
- </nav>
88
- <div class="wy-nav-content">
89
- <div class="rst-content">
90
- {% include breadcrumbs.liquid %}
91
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
92
- <div itemprop="articleBody">
93
- {%- if page.url == "/search.html" -%}
94
- {{ content }}
95
- {%- else -%}
96
- <div class="section">{{ content }}</div>
97
- {%- endif %}
98
- </div>
99
- {% include addons/comments/disqus.liquid %}
100
- </div>
101
- {% include footer.liquid %}
102
- </div>
103
- </div>
104
- </section>
105
- </div>
106
- {%- if site.addons %}{% include addons.liquid %}{% endif %}
107
- <!-- analytics -->
108
- {%- include addons/analytics/baidu.liquid -%}
109
- {%- include addons/analytics/cnzz.liquid -%}
110
- {%- include addons/analytics/google.liquid -%}
111
- </body>
112
-
113
- </html>
5
+ <div class="section">{{ content }}</div>
@@ -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
+ }
@@ -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
- text-align: center;
10
- padding: 1em;
11
- color: #c2c2c2;
12
- background: #4e4b4b;
13
- border: 1px solid #a0a0a0;
14
- border-radius: 5px;
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
- .wy-embed {
18
- a {
19
- color: #e6e6e6;
20
- }
15
+ a {
16
+ color: #e6e6e6;
17
+ }
21
18
 
22
- img {
23
- max-width: 100%;
19
+ img {
20
+ max-width: 100%;
21
+ }
24
22
  }
25
23
  }
@@ -1,3 +1,4 @@
1
+ @import "_album.scss";
1
2
  @import "_embed.scss";
2
3
 
3
4
  p {
@@ -47,10 +48,14 @@ footer {
47
48
  font-family: monospace;
48
49
  font-size: 12px;
49
50
  }
50
- }
51
51
 
52
- .copyright-rtd {
53
- display: none;
52
+ .copyright-rtd {
53
+ display: none;
54
+ }
55
+
56
+ .highlighted-box {
57
+ border: 1px solid #f1c40f;
58
+ }
54
59
  }
55
60
 
56
61
  #search-results {
@@ -67,10 +72,6 @@ footer {
67
72
  }
68
73
  }
69
74
  @media screen and (max-width: 480px) {
70
- html {
71
- font-size: 13px;
72
- }
73
-
74
75
  .wy-breadcrumbs li.wy-breadcrumbs-aside {
75
76
  display: initial;
76
77
  }
@@ -0,0 +1,8 @@
1
+ ---
2
+ permalink: /404.html
3
+ ---
4
+
5
+ {%- include reset/i18n.liquid -%}
6
+
7
+ <h2>{{ __404 }}</h2>
8
+ <p>{{ __not_found }}</p>
@@ -1,3 +1,8 @@
1
+ ---
2
+ permalink: /search.html
3
+ layout: basic
4
+ ---
5
+
1
6
  {%- include reset/i18n.liquid -%}
2
7
 
3
8
  <div id="search-results">
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.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - saowang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-30 00:00:00.000000000 Z
11
+ date: 2020-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-pages
@@ -43,10 +43,10 @@ files:
43
43
  - _includes/addons/source/analytics.liquid
44
44
  - _includes/addons/source/gems.liquid
45
45
  - _includes/addons/source/github.liquid
46
- - _includes/assets/404.liquid
47
- - _includes/assets/js/core.js
48
- - _includes/assets/js/custom.js
49
- - _includes/assets/search.liquid
46
+ - _includes/album.liquid
47
+ - _includes/assets/custom.js
48
+ - _includes/assets/custom.scss
49
+ - _includes/assets/site.js
50
50
  - _includes/breadcrumbs.liquid
51
51
  - _includes/extend/list.liquid
52
52
  - _includes/extend/tabs.liquid
@@ -62,13 +62,14 @@ files:
62
62
  - _includes/reset/workdir.liquid
63
63
  - _includes/searchbox.liquid
64
64
  - _includes/toctree.liquid
65
+ - _layouts/basic.liquid
65
66
  - _layouts/default.liquid
66
67
  - _layouts/plugins/compress.liquid
68
+ - _sass/_album.scss
67
69
  - _sass/_embed.scss
68
- - _sass/custom.scss
69
70
  - _sass/fluid.scss
70
- - _sass/style.scss
71
- - assets/404.md
71
+ - _sass/site.scss
72
+ - assets/404.liquid
72
73
  - assets/css/fonts/Roboto-Slab-Bold.woff
73
74
  - assets/css/fonts/Roboto-Slab-Bold.woff2
74
75
  - assets/css/fonts/Roboto-Slab-Regular.woff
@@ -116,7 +117,7 @@ files:
116
117
  - assets/js/theme.js
117
118
  - assets/pages.json
118
119
  - assets/robots.txt
119
- - assets/search.md
120
+ - assets/search.liquid
120
121
  - assets/sitemap.xml
121
122
  homepage: https://github.com/rundocs/jekyll-rtd-theme
122
123
  licenses:
@@ -1,5 +0,0 @@
1
- {%- include reset/i18n.liquid -%}
2
-
3
- ## {{ __404 }}
4
-
5
- {{ __not_found }}
@@ -1,5 +0,0 @@
1
- ---
2
- permalink: /404.html
3
- ---
4
-
5
- {%- include assets/404.liquid -%}
@@ -1,5 +0,0 @@
1
- ---
2
- permalink: /search.html
3
- ---
4
-
5
- {%- include assets/search.liquid -%}