databook-theme 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.MD +1 -0
  4. data/_includes/blog/blog.liquid +50 -0
  5. data/_includes/blog/features.liquid +36 -0
  6. data/_includes/blog/full.liquid +3 -0
  7. data/_includes/blog/list.liquid +41 -0
  8. data/_includes/blog/post.liquid +6 -0
  9. data/_includes/components/analytics.google.liquid +11 -0
  10. data/_includes/components/analytics.liquid +11 -0
  11. data/_includes/components/comments.disqus.liquid +17 -0
  12. data/_includes/components/comments.gitalk.liquid +22 -0
  13. data/_includes/components/comments.liquid +13 -0
  14. data/_includes/components/navmenu.items.liquid +51 -0
  15. data/_includes/components/navmenu.liquid +4 -0
  16. data/_includes/components/pagination.liquid +83 -0
  17. data/_includes/components/prevnext.liquid +1 -0
  18. data/_includes/components/search.baidu.liquid +7 -0
  19. data/_includes/components/search.bing.liquid +6 -0
  20. data/_includes/components/search.google.liquid +6 -0
  21. data/_includes/components/search.liquid +21 -0
  22. data/_includes/components/social_button.liquid +9 -0
  23. data/_includes/components/social_link.liquid +14 -0
  24. data/_includes/components/title.liquid +41 -0
  25. data/_includes/components/toc.liquid +28 -0
  26. data/_includes/custom/analytics.liquid +3 -0
  27. data/_includes/custom/blog.liquid +3 -0
  28. data/_includes/custom/body.liquid +3 -0
  29. data/_includes/custom/comments.liquid +3 -0
  30. data/_includes/custom/footer.liquid +3 -0
  31. data/_includes/custom/head.liquid +3 -0
  32. data/_includes/custom/katex.liquid +15 -0
  33. data/_includes/custom/mathjax.liquid +19 -0
  34. data/_includes/custom/search.liquid +3 -0
  35. data/_includes/extensions/toc.liquid +182 -0
  36. data/_includes/functions/get_config.liquid +11 -0
  37. data/_includes/functions/get_config_data.liquid +23 -0
  38. data/_includes/functions/get_icon.liquid +5 -0
  39. data/_includes/functions/get_page_meta.liquid +60 -0
  40. data/_includes/functions/get_page_thumbnail.liquid +23 -0
  41. data/_includes/functions/get_page_title.liquid +7 -0
  42. data/_includes/functions/get_recent_posts.liquid +17 -0
  43. data/_includes/functions/get_taxonomy_link.liquid +9 -0
  44. data/_includes/head/head.liquid +12 -0
  45. data/_includes/head/meta.liquid +41 -0
  46. data/_includes/head/opengraph.liquid +1 -0
  47. data/_includes/head/requirements.liquid +87 -0
  48. data/_includes/head/styles.liquid +10 -0
  49. data/_includes/js/codes.js +116 -0
  50. data/_includes/js/scrollspy.js +16 -0
  51. data/_includes/layout/article.liquid +71 -0
  52. data/_includes/layout/footer.liquid +53 -0
  53. data/_includes/layout/header.liquid +31 -0
  54. data/_includes/layout/hero.liquid +29 -0
  55. data/_includes/layout/page.liquid +33 -0
  56. data/_includes/layout/pagehead.liquid +17 -0
  57. data/_includes/layout/sidebar.liquid +178 -0
  58. data/_includes/localize +29 -0
  59. data/_includes/notice +6 -0
  60. data/_includes/version +1 -0
  61. data/_layouts/article.liquid +10 -0
  62. data/_layouts/default.liquid +131 -0
  63. data/_layouts/home.liquid +20 -0
  64. data/_layouts/page.liquid +9 -0
  65. data/_layouts/post.liquid +9 -0
  66. data/_layouts/system.liquid +35 -0
  67. data/_layouts/taxonomy.liquid +67 -0
  68. data/_sass/_custom.scss +0 -0
  69. data/_sass/_databook.scss +42 -0
  70. data/_sass/_debug.scss +7 -0
  71. data/_sass/_variables.scss +24 -0
  72. data/_sass/base/_misc.scss +0 -0
  73. data/_sass/base/_mixins.scss +32 -0
  74. data/_sass/base/_normalize.scss +45 -0
  75. data/_sass/base/_responsive.scss +28 -0
  76. data/_sass/components/_archive.scss +49 -0
  77. data/_sass/components/_blog.scss +249 -0
  78. data/_sass/components/_forms.scss +30 -0
  79. data/_sass/components/_hero.scss +70 -0
  80. data/_sass/components/_misc.scss +3 -0
  81. data/_sass/components/_notice.scss +27 -0
  82. data/_sass/components/_notification.scss +10 -0
  83. data/_sass/components/_post.scss +19 -0
  84. data/_sass/components/_sidebar.scss +303 -0
  85. data/_sass/components/_tabs.scss +67 -0
  86. data/_sass/components/_text.scss +27 -0
  87. data/_sass/components/_toc.scss +50 -0
  88. data/_sass/layout/_article.scss +211 -0
  89. data/_sass/layout/_body.scss +26 -0
  90. data/_sass/layout/_footer.scss +76 -0
  91. data/_sass/layout/_header.scss +124 -0
  92. data/_sass/layout/_main.scss +8 -0
  93. data/_sass/layout/_misc.scss +7 -0
  94. data/_sass/layout/_navbar.scss +323 -0
  95. data/_sass/layout/_sidebar.scss +115 -0
  96. data/_sass/layout/_wrapper.scss +7 -0
  97. data/_sass/theme/_scheme.scss +112 -0
  98. data/_sass/typography/_article.scss +49 -0
  99. data/_sass/typography/_doc.scss +104 -0
  100. data/_sass/typography/_highlight.scss +208 -0
  101. data/_sass/typography/_markdown.scss +18 -0
  102. data/_sass/typography/_table.scss +119 -0
  103. data/_sass/typography/_typography.scss +108 -0
  104. data/_sass/utilities/_thinscrollbar.scss +35 -0
  105. data/assets/databook/css/databook.scss +6 -0
  106. data/assets/databook/img/avatar.png +0 -0
  107. data/assets/databook/img/logo.png +0 -0
  108. data/assets/databook/js/databook.js +8 -0
  109. data/assets/databook/js/search.js +47 -0
  110. data/assets/databook/version.json +9 -0
  111. data/assets/favicon.ico +0 -0
  112. data/assets/search.json +30 -0
  113. metadata +224 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3e4085d8974328a7c20cf4503530c169e9db1e89905f6fd97f9db19ba5748391
4
+ data.tar.gz: 456d4e6879a4e6659503b7a2ca08b8af8b66deb95a10f6617acb12fb6a3ad668
5
+ SHA512:
6
+ metadata.gz: 98dd4eafe9a9768046b5800a250668241ac3917f97d245c2a58f4ce2f42cf9d4bc39b26efff8977588a6a2e8efae70c17ac8f07bebf74631273b24b22cc0593b
7
+ data.tar.gz: a4d4ca208da651e843ef9ddc500c88568f5bdc41223e26a21e87f7791120b7860817d4b98a9e1596f94601eba021e7b59aec820e714675d2f871f88ca09b020c
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Fortelle
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.MD ADDED
@@ -0,0 +1 @@
1
+ # DATABOOK-THEME
@@ -0,0 +1,50 @@
1
+ {%- assign sticky_posts = site.posts | sort: "date" | where_exp: "item", "item.sticky == true" -%}
2
+ {%- assign normal_posts = site.posts | sort: "date" | where_exp: "item", "item.sticky != true" -%}
3
+ {%- assign posts = sticky_posts | concat: normal_posts -%}
4
+ {%- assign page_number = include.page_number | default: 1 -%}
5
+
6
+ {%- if paginator -%}{%- comment -%}Obsolete{%- endcomment -%}
7
+ {%- assign page_number = paginator.page | default: 1 -%}
8
+ {%- assign post_begin = page_number | minus: 1 | times: paginator.per_page -%}
9
+ {%- assign post_count = paginator.posts.size -%}
10
+ {%- elsif site.plugins contains "jekyll-paginate" and site.paginate > 0 -%}
11
+ {%- assign post_begin = page_number | default: 1 | minus: 1 | times: site.paginate -%}
12
+ {%- assign post_count = site.paginate -%}
13
+ {%- else -%}
14
+ {%- assign post_begin = 0 -%}
15
+ {%- assign post_count = posts.size -%}
16
+ {%- endif -%}
17
+
18
+ {%- assign selected_posts = posts | slice: post_begin, post_count -%}
19
+
20
+ {%- capture pagination -%}
21
+ {%- if site.posts.size > site.paginate -%}
22
+ {%- include components/pagination.liquid page_number=page_number -%}
23
+ {%- endif -%}
24
+ {%- endcapture -%}
25
+
26
+ {%- assign blog_style = include.style | default: page.blog_style | default: layout.blog_style | default: site.blog_style | default: "full" -%}
27
+
28
+ {%- if blog_style == "full" -%}
29
+ {%- include blog/full.liquid posts=selected_posts -%}
30
+ {%- else -%}
31
+ {%- capture blog_content -%}
32
+ {%- case blog_style -%}
33
+ {%- when "list" -%}
34
+ {%- include blog/list.liquid posts=selected_posts -%}
35
+ {%- when "custom" -%}
36
+ {%- include custom/blog.liquid posts=selected_posts -%}
37
+ {%- endcase -%}
38
+ {%- endcapture -%}
39
+ {%- include layout/page.liquid
40
+ type = "blog"
41
+ content = blog_content
42
+ -%}
43
+ {%- endif -%}
44
+
45
+ {%- if pagination.size > 0 -%}
46
+ {%- include layout/page.liquid
47
+ type = "pagination"
48
+ content = pagination
49
+ -%}
50
+ {%- endif -%}
@@ -0,0 +1,36 @@
1
+ {%- assign count = include.count | default: 3 -%}
2
+ {%- assign posts = include.posts -%}
3
+ {%- unless posts -%}
4
+ {%- include functions/get_recent_posts.liquid count=count -%}
5
+ {%- assign posts = return -%}
6
+ {%- endunless -%}
7
+
8
+ <div class="c-blog-grid">
9
+ {%- for post in posts -%}
10
+ {%- assign html = post.content | markdownify -%}
11
+ {%- capture page_title -%}
12
+ {%- include functions/get_page_title.liquid page=post -%}
13
+ {%- endcapture -%}
14
+ {%- capture thumbnail -%}
15
+ {%- include functions/get_page_thumbnail.liquid page=post html=html autodetect=true -%}
16
+ {%- endcapture -%}
17
+
18
+ <a class="c-blog-grid__item" href="{{- post.url | relative_url -}}">
19
+ <div class="c-blog-grid__thumbnail">
20
+ {%- if thumbnail.size > 0 -%}
21
+ <img src="{{- thumbnail -}}" />
22
+ {%- endif -%}
23
+ </div>
24
+ <div class="c-blog-grid__body">
25
+ <div class="c-blog-grid__title">
26
+ {{- page_title -}}
27
+ </div>
28
+ <div class="c-blog-grid__content">
29
+ {{- html | strip_html | truncate: 200 -}}
30
+ </div>
31
+ </div>
32
+ <div class="c-blog-grid__footer">
33
+ </div>
34
+ </a>
35
+ {%- endfor -%}
36
+ </div>
@@ -0,0 +1,3 @@
1
+ {%- for post in include.posts -%}
2
+ {%- include blog/post.liquid page=post -%}
3
+ {%- endfor -%}
@@ -0,0 +1,41 @@
1
+ <div class="c-blog-list">
2
+ {%- for post in include.posts -%}
3
+ {%- assign html = post.content | markdownify -%}
4
+ {%- capture page_title -%}
5
+ {%- include functions/get_page_title.liquid page=post -%}
6
+ {%- endcapture -%}
7
+ {%- capture thumbnail -%}
8
+ {%- include functions/get_page_thumbnail.liquid page=post html=html autodetect=true -%}
9
+ {%- endcapture -%}
10
+
11
+ <div class="c-blog-list__item">
12
+ <div class="c-blog-list__title">
13
+ {%- if post.sticky -%}
14
+ <span class="c-blog-list__badge c-blog-list__badge--sticky">
15
+ <i class="fas fa-thumbtack fa-fw"></i>
16
+ {%- include localize key="tag_sticky" default="Sticky" -%}
17
+ </span>
18
+ {%- endif -%}
19
+ {%- if post.featured -%}
20
+ <span class="c-blog-list__badge c-blog-list__badge--featured">
21
+ <i class="fas fa-check fa-fw"></i>
22
+ {%- include localize key="tag_featured" default="Featured" -%}
23
+ </span>
24
+ {%- endif -%}
25
+ <a class="c-blog-list__link" href="{{- post.url | relative_url -}}">{{- page_title -}}</a>
26
+ </div>
27
+ <div class="c-blog-list__meta">
28
+ {%- include functions/get_page_meta.liquid page=post tags=true categories=true short_date=true details=false -%}
29
+ </div>
30
+ <div class="c-blog-list__content">
31
+ {{- html | strip_html | truncate: 256 -}}
32
+ </div>
33
+
34
+ {%- if thumbnail.size > 0 -%}
35
+ <div class="c-blog-list__thumbnail">
36
+ <img src="{{- thumbnail -}}" />
37
+ </div>
38
+ {%- endif -%}
39
+ </div>
40
+ {%- endfor -%}
41
+ </div>
@@ -0,0 +1,6 @@
1
+ {%- assign pageitem = include.page | default: page -%}
2
+
3
+ {%- include layout/article.liquid
4
+ page=pageitem
5
+ has_side=true
6
+ -%}
@@ -0,0 +1,11 @@
1
+ {%- assign google_analytics_id = site.google_analytics.id -%}
2
+
3
+ {%- if google_analytics_id -%}
4
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{google_analytics_id}}"></script>
5
+ <script>
6
+ window.dataLayer = window.dataLayer || [];
7
+ function gtag(){ dataLayer.push(arguments); }
8
+ gtag('js', new Date());
9
+ gtag('config', '{{google_analytics_id}}');
10
+ </script>
11
+ {%- endif -%}
@@ -0,0 +1,11 @@
1
+ {%- assign provider = site.analytics -%}
2
+ {%- if page.analytics == false -%}
3
+ {%- assign provider = false -%}
4
+ {%- endif -%}
5
+
6
+ {%- case provider -%}
7
+ {%- when "google_analytics" -%}
8
+ {%- include components/analytics.google.liquid -%}
9
+ {%- when "custom" -%}
10
+ {%- include custom/analytics.liquid -%}
11
+ {%- endcase -%}
@@ -0,0 +1,17 @@
1
+ {%- comment -%}
2
+ https://help.disqus.com/en/articles/1717112-universal-embed-code
3
+ {%- endcomment -%}
4
+
5
+ <div id="disqus_thread"></div>
6
+ <script>
7
+ var disqus_config = function () {
8
+ this.page.url = '{{page.url | relative_url}}';
9
+ this.page.identifier = '{{page.url}}';
10
+ };
11
+ (function() {
12
+ var d = document, s = d.createElement('script');
13
+ s.src = 'https://{{site.disqus.shortname}}.disqus.com/embed.js';
14
+ s.setAttribute('data-timestamp', + new Date());
15
+ (d.head || d.body).appendChild(s);
16
+ })();
17
+ </script>
@@ -0,0 +1,22 @@
1
+ {%- comment -%}
2
+ https://github.com/gitalk/gitalk
3
+ {%- endcomment -%}
4
+
5
+ <link rel="stylesheet" href="{{site.npm_cdn}}/gitalk@1/dist/gitalk.css">
6
+ <script src="{{site.npm_cdn}}/gitalk@1/dist/gitalk.min.js"></script>
7
+
8
+ <div id="gitalk-container"></div>
9
+ <script type="text/javascript">
10
+ var gitalk = new Gitalk({
11
+ clientID: "{{ site.gitalk.clientID }}",
12
+ clientSecret: "{{ site.gitalk.clientSecret }}",
13
+ repo: "{{ site.gitalk.repo }}",
14
+ owner: "{{ site.gitalk.owner }}",
15
+ admin: ["{{ site.gitalk.owner }}"],
16
+ id: location.pathname,
17
+ language: "{{ site.language }}",
18
+ title: "{{ page.title }}",
19
+ });
20
+
21
+ gitalk.render('gitalk-container');
22
+ </script>
@@ -0,0 +1,13 @@
1
+ {%- assign provider = site.comments -%}
2
+ {%- if page.comments == false -%}
3
+ {%- assign provider = false -%}
4
+ {%- endif -%}
5
+
6
+ {%- case provider -%}
7
+ {%- when "disqus" -%}
8
+ {%- include components/comments.disqus.liquid -%}
9
+ {%- when "gitalk" -%}
10
+ {%- include components/comments.gitalk.liquid -%}
11
+ {%- when "custom" -%}
12
+ {%- include custom/comments.liquid -%}
13
+ {%- endcase -%}
@@ -0,0 +1,51 @@
1
+ {%- if include.items -%}
2
+
3
+ <div class="c-navmenu__menu">
4
+ {%- for item in include.items -%}
5
+ {%- if item.text == "-" -%}
6
+ <div class="c-navmenu__divider"></div>
7
+ {%- else -%}
8
+ <div class="c-navmenu__item">
9
+ {%- if item.url -%}
10
+ <a class="c-navmenu__text" href="{{- item.url | relative_url -}}">
11
+ {%- if item.icon -%}{%- include functions/get_icon.liquid icon=item.icon -%}{%- endif -%}{{- item.text -}}
12
+ </a>
13
+ {%- elsif item.onclick -%}
14
+ <a class="c-navmenu__text" href="javascript:void(0);" onclick="{{ item.onclick }};document.activeElement.blur();">
15
+ {%- if item.icon -%}{%- include functions/get_icon.liquid icon=item.icon -%}{%- endif -%}{{- item.text -}}
16
+ </a>
17
+ {%- else -%}
18
+ <div class="c-navmenu__text">
19
+ {%- if item.icon -%}{%- include functions/get_icon.liquid icon=item.icon -%}{%- endif -%}{{- item.text -}}
20
+ </div>
21
+ {%- endif -%}
22
+ {%- if item.items -%}
23
+ {%- include components/navmenu.items.liquid items=item.items -%}
24
+ {%- elsif item.taxonomy -%}
25
+ {%- include components/navmenu.items.liquid taxonomy=item.taxonomy -%}
26
+ {%- endif -%}
27
+ </div>
28
+ {%- endif -%}
29
+ {%- endfor -%}
30
+ </div>
31
+
32
+ {%- elsif include.taxonomy -%}
33
+ {%- case include.taxonomy -%}
34
+ {%- when "categories" -%}
35
+ {%- assign collection = site.categories -%}
36
+ {%- when "tags" -%}
37
+ {%- assign collection = site.tags -%}
38
+ {%- endcase -%}
39
+
40
+ <div class="c-navmenu__menu">
41
+ {%- for item in collection -%}
42
+ {%- assign text = item | first -%}
43
+ <div class="c-navmenu__item">
44
+ <a class="c-navmenu__text" href="/{{- include.taxonomy -}}/#!/{{- text | url_encode -}}">
45
+ {{- text -}} <small>({{- item | last | size -}})</small>
46
+ </a>
47
+ </div>
48
+ {%- endfor -%}
49
+ </div>
50
+
51
+ {%- endif -%}
@@ -0,0 +1,4 @@
1
+ <div class="c-navmenu {%- unless include.data.collapsed %} c-navmenu--responsive{%- endunless -%} {%- if include.is_right %} c-navmenu--right{%- endif -%}">
2
+ <button class="c-navmenu__button c-navbutton c-navbutton--menu"><i class="fas fa-bars"></i></button>
3
+ {%- include components/navmenu.items.liquid items=include.data -%}
4
+ </div>
@@ -0,0 +1,83 @@
1
+ {%- assign page_number = include.page_number | default: paginator.page | default: 1 -%}
2
+ {%- assign total_page_number = site.posts.size | times: 1.0 | divided_by: site.paginate | ceil -%}
3
+
4
+ {%- if page_number > 1 -%}
5
+ {%- assign first_page_path = site.paginate_first_page_path | default: "/" | relative_url -%}
6
+ {%- if page_number == 2 -%}
7
+ {%- assign previous_page_path = first_page_path -%}
8
+ {%- else -%}
9
+ {%- assign previous_page = page_number | minus: 1 -%}
10
+ {%- assign previous_page_path = site.paginate_path | relative_url | replace: ":num", previous_page -%}
11
+ {%- endif -%}
12
+ {%- endif -%}
13
+
14
+ {%- if page_number < total_page_number -%}
15
+ {%- assign last_page_path = site.paginate_path | relative_url | replace: ":num", total_page_number -%}
16
+ {%- assign next_page = page_number | plus: 1 -%}
17
+ {%- assign next_page_path = site.paginate_path | relative_url | replace: ":num", next_page -%}
18
+ {%- endif -%}
19
+
20
+ {%- capture page_text -%}
21
+ {%- include localize key="title-postlist" default="Page :param1" param1=page_number -%}
22
+ {%- endcapture -%}
23
+
24
+ <div class="c-pagination" data-text="{{- page_text -}}">
25
+ {%- if first_page_path -%}
26
+ <a class="c-pagination__item" href="{{- first_page_path -}}">
27
+ <i class="fas fa-angle-double-left"></i>
28
+ </a>
29
+ {%- else -%}
30
+ <div class="c-pagination__item">
31
+ <i class="fas fa-angle-double-left"></i>
32
+ </div>
33
+ {%- endif -%}
34
+
35
+ {%- if previous_page_path -%}
36
+ <a class="c-pagination__item" href="{{- previous_page_path -}}">
37
+ <i class="fas fa-angle-left"></i>
38
+ </a>
39
+ {%- else -%}
40
+ <div class="c-pagination__item">
41
+ <i class="fas fa-angle-left"></i>
42
+ </div>
43
+ {%- endif -%}
44
+
45
+ {%- for pi in (1..total_page_number) -%}
46
+ {%- if pi == page_number -%}
47
+ <div class="c-pagination__item">
48
+ {{- pi -}}
49
+ </div>
50
+ {%- elsif pi == 1 -%}
51
+ <a class="c-pagination__item" href="{{- first_page_path -}}">
52
+ {{- pi -}}
53
+ </a>
54
+ {%- else -%}
55
+ <a class="c-pagination__item" href="{{- site.paginate_path | relative_url | replace: ':num', pi -}}">
56
+ {{- pi -}}
57
+ </a>
58
+ {%- endif -%}
59
+ {%- endfor -%}
60
+
61
+ {%- if next_page_path -%}
62
+ <a class="c-pagination__item" href="{{- next_page_path -}}">
63
+ <i class="fas fa-angle-right"></i>
64
+ </a>
65
+ {%- else -%}
66
+ <div class="c-pagination__item">
67
+ <i class="fas fa-angle-right"></i>
68
+ </div>
69
+ {%- endif -%}
70
+
71
+ {%- if last_page_path -%}
72
+ <a class="c-pagination__item" href="{{- last_page_path -}}">
73
+ <i class="fas fa-angle-double-right"></i>
74
+ </a>
75
+ {%- else -%}
76
+ <div class="c-pagination__item">
77
+ <i class="fas fa-angle-double-right"></i>
78
+ </div>
79
+ {%- endif -%}
80
+
81
+ </div>
82
+
83
+ {%- assign return = total_page_number -%}
@@ -0,0 +1 @@
1
+ {%- comment -%}todo{%- endcomment -%}
@@ -0,0 +1,7 @@
1
+ <form class="c-search" action="https://www.baidu.com/s" onsubmit="this.si.value=document.domain;" target="_blank">
2
+ <input id="db-searchbox" class="c-search__textbox" type="textbox" name="wd" placeholder="baidu.com" />
3
+ <input type="hidden" name="si" value="" />
4
+ <input type="hidden" name="ct" value="2097152" />
5
+ <button class="c-search__expand c-navbutton" type="button"><label for="db-searchbox"><i class="fas fa-search"></i></label></button>
6
+ <button class="c-search__go c-navbutton" type="submit"><i class="fas fa-angle-right"></i></button>
7
+ </form>
@@ -0,0 +1,6 @@
1
+ <form class="c-search" action="https://www.bing.com/search" target="_blank" onsubmit="this.q1.value=`site:${document.domain}`;">
2
+ <input id="db-searchbox" class="c-search__textbox" type="textbox" name="q" placeholder="bing.com" />
3
+ <input type="hidden" name="q1" value="" />
4
+ <button class="c-search__expand c-navbutton" type="button"><label for="db-searchbox"><i class="fas fa-search"></i></label></button>
5
+ <button class="c-search__go c-navbutton" type="submit"><i class="fas fa-angle-right"></i></button>
6
+ </form>
@@ -0,0 +1,6 @@
1
+ <form class="c-search" action="https://www.google.com/search" target="_blank" onsubmit="this.as_sitesearch.value=document.domain;">
2
+ <input id="db-searchbox" class="c-search__textbox" type="textbox" name="q" placeholder="google.com" />
3
+ <input type="hidden" name="as_sitesearch" value="" />
4
+ <button class="c-search__expand c-navbutton" type="button"><label for="db-searchbox"><i class="fas fa-search"></i></label></button>
5
+ <button class="c-search__go c-navbutton" type="submit"><i class="fas fa-angle-right"></i></button>
6
+ </form>
@@ -0,0 +1,21 @@
1
+ {%- assign provider = site.search -%}
2
+ {%- if page.search == false -%}
3
+ {%- assign provider = false -%}
4
+ {%- endif -%}
5
+
6
+ {%- case provider -%}
7
+ {%- when true, "title", "content" -%}
8
+ <form class="c-search" action="/search">
9
+ <input id="db-searchbox" class="c-search__textbox" type="textbox" name="q" required />
10
+ <button class="c-search__expand c-navbutton" type="button"><label for="db-searchbox"><i class="fas fa-search"></i></label></button>
11
+ <button class="c-search__go c-navbutton" type="submit"><i class="fas fa-angle-right"></i></button>
12
+ </form>
13
+ {%- when "google" -%}
14
+ {%- include components/search.google.liquid -%}
15
+ {%- when "bing" -%}
16
+ {%- include components/search.bing.liquid -%}
17
+ {%- when "baidu" -%}
18
+ {%- include components/search.baidu.liquid -%}
19
+ {%- when "custom" -%}
20
+ {%- include custom/search.liquid -%}
21
+ {%- endcase -%}
@@ -0,0 +1,9 @@
1
+ <div class="c-sidebuttons__item" title="{{- include.text -}}">
2
+ <a class="c-sidebuttons__link" href="{{- include.url -}}">
3
+ {%- if include.icon -%}
4
+ {%- include functions/get_icon.liquid icon=include.icon -%}
5
+ {%- else -%}
6
+ <div class="c-texticon">{{- include.text -}}</div>
7
+ {%- endif -%}
8
+ </a>
9
+ </div>
@@ -0,0 +1,14 @@
1
+ <tr class="c-sociallist__item">
2
+ <td class="c-sociallist__icon">
3
+ {%- if include.icon -%}
4
+ {%- include functions/get_icon.liquid icon=include.icon -%}
5
+ {%- endif -%}
6
+ </td>
7
+ <td class="c-sociallist__text">
8
+ {%- if include.url -%}
9
+ <a href="{{- include.url | relative_url -}}" target="_blank">{{- include.text -}}</a>
10
+ {%- else -%}
11
+ {{- include.text -}}
12
+ {%- endif -%}
13
+ </td>
14
+ </tr>
@@ -0,0 +1,41 @@
1
+ <div class="c-title">
2
+
3
+ {%- if include.breadcrumb -%}
4
+ <div class="c-title__breadcrumb">
5
+ {{- include.breadcrumb -}}
6
+ </div>
7
+ {%- endif -%}
8
+
9
+ <h1 class="c-title__title">
10
+ <a href="{{ include.url | relative_url }}">
11
+ {{- include.title -}}
12
+ </a>
13
+ </h1>
14
+
15
+ {%- if include.right -%}
16
+ <div class="c-title__right">
17
+ {{- include.right -}}
18
+ </div>
19
+ {%- endif -%}
20
+
21
+ {%- if include.tagline -%}
22
+ <div class="c-title__tagline">
23
+ {{- include.tagline -}}
24
+ </div>
25
+ {%- endif -%}
26
+
27
+ <hr class="c-title__divider" />
28
+
29
+ {%- if include.meta -%}
30
+ <div class="c-title__meta">
31
+ {{- include.meta -}}
32
+ </div>
33
+ {%- endif -%}
34
+
35
+ {%- if include.indicator -%}
36
+ <div class="c-title__indicator">
37
+ {{- include.indicator -}}
38
+ </div>
39
+ {%- endif -%}
40
+
41
+ </div>
@@ -0,0 +1,28 @@
1
+ {%- include functions/get_config.liquid key="toc" -%}
2
+ {%- assign use_toc = return | default: false -%}
3
+ {%- assign toc_level = site.toc_level | default: 4 -%}
4
+
5
+ {%- if use_toc -%}
6
+ {%- assign has_header = false -%}
7
+ {%- for i in (1..toc_level) -%}
8
+ {%- assign header_tag = "<h" | append: i -%}
9
+ {%- if include.html contains header_tag -%}
10
+ {%- assign has_header = true -%}
11
+ {%- endif -%}
12
+ {%- endfor -%}
13
+ {%- if has_header -%}
14
+ <div class="c-toc">
15
+ <div class="c-toc__header"><i class="fas fa-stream"></i>&nbsp;{%- include localize key="toc" default="Contents" -%}</div>
16
+ <div class="c-toc__content">
17
+ {%- include extensions/toc.liquid
18
+ html=include.html
19
+ ordered=true
20
+ item_class="c-toc__item"
21
+ anchor_class="c-toc__link"
22
+ h_min=1
23
+ h_max=toc_level
24
+ -%}
25
+ </div>
26
+ </div>
27
+ {%- endif -%}
28
+ {%- endif -%}
@@ -0,0 +1,3 @@
1
+ {%- comment -%}
2
+ Put your custom code here.
3
+ {%- endcomment -%}
@@ -0,0 +1,3 @@
1
+ {%- comment -%}
2
+ Put your custom code here.
3
+ {%- endcomment -%}
@@ -0,0 +1,3 @@
1
+ {%- comment -%}
2
+ Put your custom code here.
3
+ {%- endcomment -%}
@@ -0,0 +1,3 @@
1
+ {%- comment -%}
2
+ Put your custom code here.
3
+ {%- endcomment -%}
@@ -0,0 +1,3 @@
1
+ {%- comment -%}
2
+ Put your custom code here.
3
+ {%- endcomment -%}
@@ -0,0 +1,3 @@
1
+ {%- comment -%}
2
+ Put your custom code here.
3
+ {%- endcomment -%}
@@ -0,0 +1,15 @@
1
+ <script>
2
+ window.addEventListener("load", function () {
3
+ renderMathInElement(document.body, {
4
+ delimiters: [
5
+ { left: '\\(', right: '\\)', display: false }
6
+ ],
7
+ throwOnError: false
8
+ });
9
+ [...document.querySelectorAll('p')]
10
+ .filter(p => p.childElementCount == 0 && p.textContent.startsWith('[') && p.textContent.endsWith(']'))
11
+ .forEach(p => katex.render(p.textContent.replace(/^\[(.+)\]/, '$1'), p, {
12
+ displayMode: true
13
+ }));
14
+ });
15
+ </script>
@@ -0,0 +1,19 @@
1
+ <script>
2
+ window.MathJax = {
3
+ tex: {
4
+ inlineMath: [
5
+ ['\\(', '\\)'],
6
+ ],
7
+ },
8
+ options: {
9
+ renderActions: {
10
+ addMenu: []
11
+ }
12
+ },
13
+ };
14
+ window.addEventListener("load", function() {
15
+ [...document.querySelectorAll('p')]
16
+ .filter(p => p.childElementCount == 0 && p.textContent.startsWith('[') && p.textContent.endsWith(']'))
17
+ .forEach(p => p.replaceChildren(MathJax.tex2chtml(p.textContent.replace(/^\[(.+)\]/, '$1'))));
18
+ });
19
+ </script>
@@ -0,0 +1,3 @@
1
+ {%- comment -%}
2
+ Put your custom code here.
3
+ {%- endcomment -%}