jekyll-theme-abd3lraouf 5.2.6 → 5.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -21
  3. data/README.md +105 -105
  4. data/_data/assets/cross_origin.yml +62 -62
  5. data/_data/assets/self_host.yml +51 -51
  6. data/_data/authors.yml +17 -17
  7. data/_data/contact.yml +30 -30
  8. data/_data/locales/bg-BG.yml +83 -83
  9. data/_data/locales/en.yml +83 -83
  10. data/_data/locales/es-ES.yml +79 -79
  11. data/_data/locales/fr-FR.yml +79 -79
  12. data/_data/locales/hu-HU.yml +81 -81
  13. data/_data/locales/id-ID.yml +79 -79
  14. data/_data/locales/ko-KR.yml +79 -79
  15. data/_data/locales/my-MM.yml +79 -79
  16. data/_data/locales/pt-BR.yml +79 -79
  17. data/_data/locales/ru-RU.yml +79 -79
  18. data/_data/locales/tr-TR.yml +79 -79
  19. data/_data/locales/uk-UA.yml +79 -79
  20. data/_data/locales/vi-VN.yml +77 -77
  21. data/_data/locales/zh-CN.yml +78 -78
  22. data/_data/share.yml +27 -27
  23. data/_includes/assets-origin.html +12 -12
  24. data/_includes/comments/disqus.html +54 -54
  25. data/_includes/comments/giscus.html +56 -56
  26. data/_includes/comments/utterances.html +51 -51
  27. data/_includes/comments.html +5 -5
  28. data/_includes/datetime.html +21 -21
  29. data/_includes/favicons.html +17 -17
  30. data/_includes/footer.html +17 -36
  31. data/_includes/google-analytics.html +14 -14
  32. data/_includes/head.html +116 -116
  33. data/_includes/js-selector.html +104 -104
  34. data/_includes/jsdelivr-combine.html +32 -32
  35. data/_includes/lang.html +8 -8
  36. data/_includes/language-alias.html +70 -70
  37. data/_includes/mermaid.html +57 -57
  38. data/_includes/mode-toggle.html +129 -129
  39. data/_includes/no-linenos.html +10 -10
  40. data/_includes/post-nav.html +30 -30
  41. data/_includes/post-paginator.html +88 -88
  42. data/_includes/post-sharing.html +27 -27
  43. data/_includes/read-time.html +30 -30
  44. data/_includes/refactor-content.html +282 -282
  45. data/_includes/related-posts.html +103 -103
  46. data/_includes/search-loader.html +46 -46
  47. data/_includes/search-results.html +11 -11
  48. data/_includes/sidebar.html +93 -93
  49. data/_includes/toc.html +16 -16
  50. data/_includes/topbar.html +70 -70
  51. data/_includes/trending-tags.html +50 -50
  52. data/_includes/update-list.html +40 -40
  53. data/_layouts/archives.html +48 -48
  54. data/_layouts/categories.html +120 -120
  55. data/_layouts/category.html +24 -24
  56. data/_layouts/compress.html +10 -10
  57. data/_layouts/default.html +74 -74
  58. data/_layouts/home.html +103 -103
  59. data/_layouts/page.html +64 -64
  60. data/_layouts/post.html +159 -159
  61. data/_layouts/tag.html +23 -23
  62. data/_layouts/tags.html +23 -23
  63. data/_plugins/posts-lastmod-hook.rb +14 -14
  64. data/_sass/addon/commons.scss +1694 -1680
  65. data/_sass/addon/module.scss +151 -151
  66. data/_sass/addon/syntax.scss +289 -289
  67. data/_sass/addon/variables.scss +34 -34
  68. data/_sass/colors/dark-syntax.scss +88 -88
  69. data/_sass/colors/dark-typography.scss +157 -157
  70. data/_sass/colors/light-syntax.scss +84 -84
  71. data/_sass/colors/light-typography.scss +94 -94
  72. data/_sass/layout/archives.scss +147 -147
  73. data/_sass/layout/categories.scss +67 -67
  74. data/_sass/layout/category-tag.scss +73 -73
  75. data/_sass/layout/home.scss +184 -184
  76. data/_sass/layout/post.scss +369 -369
  77. data/_sass/layout/tags.scss +19 -19
  78. data/_sass/variables-hook.scss +3 -3
  79. data/_tabs/about.md +8 -8
  80. data/_tabs/archives.md +7 -7
  81. data/_tabs/categories.md +6 -6
  82. data/_tabs/tags.md +6 -6
  83. data/assets/404.html +69 -16
  84. data/assets/css/style.scss +12 -12
  85. data/assets/feed.xml +61 -61
  86. data/assets/img/404.png +0 -0
  87. data/assets/img/favicons/browserconfig.xml +13 -13
  88. data/assets/img/favicons/site.webmanifest +26 -26
  89. data/assets/js/data/search.json +18 -18
  90. data/assets/js/data/swcache.js +55 -55
  91. data/assets/js/pwa/app.js +47 -47
  92. data/assets/js/pwa/sw.js +89 -89
  93. data/assets/js/pwa/unregister.js +12 -12
  94. data/assets/robots.txt +10 -10
  95. data/index.html +4 -4
  96. metadata +8 -7
@@ -1,24 +1,24 @@
1
- ---
2
- layout: page
3
- # The Category layout
4
- ---
5
-
6
- {% include lang.html %}
7
-
8
- <div id="page-category">
9
- <h1 class="pl-lg-2">
10
- <i class="far fa-folder-open fa-fw text-muted"></i>
11
- {{ page.title }}
12
- <span class="lead text-muted pl-2">{{ page.posts | size }}</span>
13
- </h1>
14
-
15
- <ul class="post-content pl-0">
16
- {% for post in page.posts %}
17
- <li class="d-flex justify-content-between pl-md-3 pr-md-3">
18
- <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
19
- <span class="dash flex-grow-1"></span>
20
- {% include datetime.html date=post.date wrap='span' class='text-muted small' %}
21
- </li>
22
- {% endfor %}
23
- </ul>
24
- </div>
1
+ ---
2
+ layout: page
3
+ # The Category layout
4
+ ---
5
+
6
+ {% include lang.html %}
7
+
8
+ <div id="page-category">
9
+ <h1 class="pl-lg-2">
10
+ <i class="far fa-folder-open fa-fw text-muted"></i>
11
+ {{ page.title }}
12
+ <span class="lead text-muted pl-2">{{ page.posts | size }}</span>
13
+ </h1>
14
+
15
+ <ul class="post-content pl-0">
16
+ {% for post in page.posts %}
17
+ <li class="d-flex justify-content-between pl-md-3 pr-md-3">
18
+ <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
19
+ <span class="dash flex-grow-1"></span>
20
+ {% include datetime.html date=post.date wrap='span' class='text-muted small' %}
21
+ </li>
22
+ {% endfor %}
23
+ </ul>
24
+ </div>
@@ -1,10 +1,10 @@
1
- ---
2
- # Jekyll layout that compresses HTML
3
- # v3.1.0
4
- # http://jch.penibelst.de/
5
- # © 2014–2015 Anatol Broder
6
- # MIT License
7
- ---
8
-
9
- {% capture _LINE_FEED %}
10
- {% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
1
+ ---
2
+ # Jekyll layout that compresses HTML
3
+ # v3.1.0
4
+ # http://jch.penibelst.de/
5
+ # © 2014–2015 Anatol Broder
6
+ # MIT License
7
+ ---
8
+
9
+ {% capture _LINE_FEED %}
10
+ {% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
@@ -1,74 +1,74 @@
1
- ---
2
- layout: compress
3
- # Default layout
4
- ---
5
-
6
- <!DOCTYPE html>
7
-
8
- {% include lang.html %}
9
-
10
- {% include assets-origin.html %}
11
-
12
- {% capture prefer_mode %}
13
- {% if site.theme_mode %}
14
- data-mode="{{ site.theme_mode }}"
15
- {% endif %}
16
- {% endcapture %}
17
-
18
- <html lang="{{ site.lang }}"{{ prefer_mode }}>
19
-
20
- {% include head.html %}
21
-
22
- <body data-spy="scroll" data-target="#toc" data-topbar-visible="true">
23
-
24
- {% include sidebar.html %}
25
-
26
- {% include topbar.html %}
27
-
28
- <div id="main-wrapper" class="d-flex justify-content-center">
29
- <div id="main" class="container pl-xl-4 pr-xl-4">
30
-
31
- {{ content }}
32
-
33
- {% include footer.html %}
34
-
35
- </div>
36
-
37
- {% include search-results.html %}
38
-
39
- </div> <!-- #main-wrapper -->
40
-
41
- {% if page.mermaid %}
42
- {% include mermaid.html %}
43
- {% endif %}
44
-
45
- <div id="mask"></div>
46
-
47
- <a id="back-to-top" href="#" aria-label="back-to-top" class="btn btn-lg btn-box-shadow" role="button">
48
- <i class="fas fa-angle-up"></i>
49
- </a>
50
-
51
- {% if site.pwa.enabled %}
52
- <div id="notification" class="toast" role="alert" aria-live="assertive" aria-atomic="true"
53
- data-animation="true" data-autohide="false">
54
- <div class="toast-header">
55
- <button type="button" class="ml-2 ml-auto close" data-dismiss="toast" aria-label="Close">
56
- <span aria-hidden="true">&times;</span>
57
- </button>
58
- </div>
59
- <div class="toast-body text-center pt-0">
60
- <p class="pl-2 pr-2 mb-3">{{ site.data.locales[lang].notification.update_found }}</p>
61
- <button type="button" class="btn btn-primary" aria-label="Update">
62
- {{ site.data.locales[lang].notification.update }}
63
- </button>
64
- </div>
65
- </div>
66
- {% endif %}
67
-
68
- {% include search-loader.html %}
69
-
70
- {% include js-selector.html %}
71
-
72
- </body>
73
-
74
- </html>
1
+ ---
2
+ layout: compress
3
+ # Default layout
4
+ ---
5
+
6
+ <!DOCTYPE html>
7
+
8
+ {% include lang.html %}
9
+
10
+ {% include assets-origin.html %}
11
+
12
+ {% capture prefer_mode %}
13
+ {% if site.theme_mode %}
14
+ data-mode="{{ site.theme_mode }}"
15
+ {% endif %}
16
+ {% endcapture %}
17
+
18
+ <html lang="{{ site.lang }}"{{ prefer_mode }}>
19
+
20
+ {% include head.html %}
21
+
22
+ <body data-spy="scroll" data-target="#toc" data-topbar-visible="true">
23
+
24
+ {% include sidebar.html %}
25
+
26
+ {% include topbar.html %}
27
+
28
+ <div id="main-wrapper" class="d-flex justify-content-center">
29
+ <div id="main" class="container pl-xl-4 pr-xl-4">
30
+
31
+ {{ content }}
32
+
33
+ {% include footer.html %}
34
+
35
+ </div>
36
+
37
+ {% include search-results.html %}
38
+
39
+ </div> <!-- #main-wrapper -->
40
+
41
+ {% if page.mermaid %}
42
+ {% include mermaid.html %}
43
+ {% endif %}
44
+
45
+ <div id="mask"></div>
46
+
47
+ <a id="back-to-top" href="#" aria-label="back-to-top" class="btn btn-lg btn-box-shadow" role="button">
48
+ <i class="fas fa-angle-up"></i>
49
+ </a>
50
+
51
+ {% if site.pwa.enabled %}
52
+ <div id="notification" class="toast" role="alert" aria-live="assertive" aria-atomic="true"
53
+ data-animation="true" data-autohide="false">
54
+ <div class="toast-header">
55
+ <button type="button" class="ml-2 ml-auto close" data-dismiss="toast" aria-label="Close">
56
+ <span aria-hidden="true">&times;</span>
57
+ </button>
58
+ </div>
59
+ <div class="toast-body text-center pt-0">
60
+ <p class="pl-2 pr-2 mb-3">{{ site.data.locales[lang].notification.update_found }}</p>
61
+ <button type="button" class="btn btn-primary" aria-label="Update">
62
+ {{ site.data.locales[lang].notification.update }}
63
+ </button>
64
+ </div>
65
+ </div>
66
+ {% endif %}
67
+
68
+ {% include search-loader.html %}
69
+
70
+ {% include js-selector.html %}
71
+
72
+ </body>
73
+
74
+ </html>
data/_layouts/home.html CHANGED
@@ -1,103 +1,103 @@
1
- ---
2
- layout: page
3
- # The Home page layout
4
- ---
5
-
6
- {% include lang.html %}
7
-
8
- {% assign pinned = site.posts | where: "pin", "true" %}
9
- {% assign default = site.posts | where_exp: "item", "item.pin != true and item.hidden != true" %}
10
-
11
- {% assign posts = "" | split: "" %}
12
-
13
- <!-- Get pinned posts -->
14
-
15
- {% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
16
- {% assign pinned_num = pinned.size | minus: offset %}
17
-
18
- {% if pinned_num > 0 %}
19
- {% for i in (offset..pinned.size) limit: pinned_num %}
20
- {% assign posts = posts | push: pinned[i] %}
21
- {% endfor %}
22
- {% else %}
23
- {% assign pinned_num = 0 %}
24
- {% endif %}
25
-
26
- <!-- Get default posts -->
27
-
28
- {% assign default_beg = offset | minus: pinned.size %}
29
-
30
- {% if default_beg < 0 %}
31
- {% assign default_beg = 0 %}
32
- {% endif %}
33
-
34
- {% assign default_num = paginator.posts | size | minus: pinned_num %}
35
- {% assign default_end = default_beg | plus: default_num | minus: 1 %}
36
-
37
- {% if default_num > 0 %}
38
- {% for i in (default_beg..default_end) %}
39
- {% assign posts = posts | push: default[i] %}
40
- {% endfor %}
41
- {% endif %}
42
-
43
- <div id="post-list">
44
-
45
- {% for post in posts %}
46
-
47
- <div class="post-preview">
48
- <h1>
49
- <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
50
- </h1>
51
-
52
- <div class="post-content">
53
- <p>
54
- {% include no-linenos.html content=post.content %}
55
- <!-- extract excerpt-block from content -->
56
- {% assign excerptParts = post.excerpt | split: "<!-- excerpt-start -->" %}
57
- <!-- check if the excerpt tag exists -->
58
- {% if excerptParts.size == 1 %}
59
- {{ content | markdownify | strip_html | truncate: 200 | escape }}
60
- {% else %}
61
- {{ excerptParts[1] | markdownify | strip_html | truncate: 200 | escape }}
62
- {% endif %}
63
- </p>
64
- </div>
65
-
66
- <div class="post-meta text-muted d-flex">
67
- <div class="mr-auto">
68
-
69
- <!-- posted date -->
70
- <i class="far fa-calendar fa-fw"></i>
71
- {% include datetime.html date=post.date %}
72
-
73
- <!-- categories -->
74
- {% if post.categories.size > 0 %}
75
- <i class="far fa-folder-open fa-fw"></i>
76
- <span>
77
- {% for category in post.categories %}
78
- {{ category }}
79
- {%- unless forloop.last -%},{%- endunless -%}
80
- {% endfor %}
81
- </span>
82
- {% endif %}
83
-
84
- </div>
85
-
86
- {% if post.pin %}
87
- <div class="pin">
88
- <i class="fas fa-thumbtack fa-fw"></i>
89
- <span>{{ site.data.locales[lang].post.pin_prompt }}</span>
90
- </div>
91
- {% endif %}
92
-
93
- </div> <!-- .post-meta -->
94
-
95
- </div> <!-- .post-review -->
96
-
97
- {% endfor %}
98
-
99
- </div> <!-- #post-list -->
100
-
101
- {% if paginator.total_pages > 0 %}
102
- {% include post-paginator.html %}
103
- {% endif %}
1
+ ---
2
+ layout: page
3
+ # The Home page layout
4
+ ---
5
+
6
+ {% include lang.html %}
7
+
8
+ {% assign pinned = site.posts | where: "pin", "true" %}
9
+ {% assign default = site.posts | where_exp: "item", "item.pin != true and item.hidden != true" %}
10
+
11
+ {% assign posts = "" | split: "" %}
12
+
13
+ <!-- Get pinned posts -->
14
+
15
+ {% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
16
+ {% assign pinned_num = pinned.size | minus: offset %}
17
+
18
+ {% if pinned_num > 0 %}
19
+ {% for i in (offset..pinned.size) limit: pinned_num %}
20
+ {% assign posts = posts | push: pinned[i] %}
21
+ {% endfor %}
22
+ {% else %}
23
+ {% assign pinned_num = 0 %}
24
+ {% endif %}
25
+
26
+ <!-- Get default posts -->
27
+
28
+ {% assign default_beg = offset | minus: pinned.size %}
29
+
30
+ {% if default_beg < 0 %}
31
+ {% assign default_beg = 0 %}
32
+ {% endif %}
33
+
34
+ {% assign default_num = paginator.posts | size | minus: pinned_num %}
35
+ {% assign default_end = default_beg | plus: default_num | minus: 1 %}
36
+
37
+ {% if default_num > 0 %}
38
+ {% for i in (default_beg..default_end) %}
39
+ {% assign posts = posts | push: default[i] %}
40
+ {% endfor %}
41
+ {% endif %}
42
+
43
+ <div id="post-list">
44
+
45
+ {% for post in posts %}
46
+
47
+ <div class="post-preview">
48
+ <h1>
49
+ <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
50
+ </h1>
51
+
52
+ <div class="post-content">
53
+ <p>
54
+ {% include no-linenos.html content=post.content %}
55
+ <!-- extract excerpt-block from content -->
56
+ {% assign excerptParts = post.excerpt | split: "<!-- excerpt-start -->" %}
57
+ <!-- check if the excerpt tag exists -->
58
+ {% if excerptParts.size == 1 %}
59
+ {{ content | markdownify | strip_html | truncate: 200 | escape }}
60
+ {% else %}
61
+ {{ excerptParts[1] | markdownify | strip_html | truncate: 200 | escape }}
62
+ {% endif %}
63
+ </p>
64
+ </div>
65
+
66
+ <div class="post-meta text-muted d-flex">
67
+ <div class="mr-auto">
68
+
69
+ <!-- posted date -->
70
+ <i class="far fa-calendar fa-fw"></i>
71
+ {% include datetime.html date=post.date %}
72
+
73
+ <!-- categories -->
74
+ {% if post.categories.size > 0 %}
75
+ <i class="far fa-folder-open fa-fw"></i>
76
+ <span>
77
+ {% for category in post.categories %}
78
+ {{ category }}
79
+ {%- unless forloop.last -%},{%- endunless -%}
80
+ {% endfor %}
81
+ </span>
82
+ {% endif %}
83
+
84
+ </div>
85
+
86
+ {% if post.pin %}
87
+ <div class="pin">
88
+ <i class="fas fa-thumbtack fa-fw"></i>
89
+ <span>{{ site.data.locales[lang].post.pin_prompt }}</span>
90
+ </div>
91
+ {% endif %}
92
+
93
+ </div> <!-- .post-meta -->
94
+
95
+ </div> <!-- .post-review -->
96
+
97
+ {% endfor %}
98
+
99
+ </div> <!-- #post-list -->
100
+
101
+ {% if paginator.total_pages > 0 %}
102
+ {% include post-paginator.html %}
103
+ {% endif %}
data/_layouts/page.html CHANGED
@@ -1,64 +1,64 @@
1
- ---
2
- layout: default
3
- ---
4
-
5
- {% include lang.html %}
6
-
7
- {% include assets-origin.html %}
8
-
9
- <div class="row">
10
-
11
- <!-- core -->
12
- <div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-4">
13
- <div class="post pl-1 pr-1 pl-md-2 pr-md-2">
14
-
15
- {% capture _content %}
16
- {% if layout.refactor or page.layout == 'page' %}
17
- {% include refactor-content.html content=content %}
18
- {% else %}
19
- {{ content }}
20
- {% endif %}
21
- {% endcapture %}
22
-
23
- {% if page.layout == 'page' or page.collection == 'tabs'%}
24
- {% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
25
- <h1 class="dynamic-title">
26
- {{ title }}
27
- </h1>
28
- <div class="post-content">
29
- {{ _content }}
30
- </div>
31
- {% else %}
32
- {{ _content }}
33
- {% endif %}
34
-
35
- </div>
36
- </div> <!-- #core-wrapper -->
37
-
38
- <!-- pannel -->
39
- <div id="panel-wrapper" class="col-xl-3 pl-2 text-muted">
40
-
41
- <div class="access">
42
- {% include update-list.html %}
43
- {% include trending-tags.html %}
44
- </div>
45
-
46
- {% for _include in layout.pannel_includes %}
47
- {% assign _include_path = _include | append: '.html' %}
48
- {% include {{ _include_path }} %}
49
- {% endfor %}
50
- </div>
51
-
52
- </div>
53
-
54
- <!-- tail -->
55
- {% if layout.tail_includes %}
56
- <div class="row">
57
- <div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 pl-3 pr-3 pr-xl-4">
58
- {% for _include in layout.tail_includes %}
59
- {% assign _include_path = _include | append: '.html' %}
60
- {% include {{ _include_path }} %}
61
- {% endfor %}
62
- </div>
63
- </div>
64
- {% endif %}
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% include lang.html %}
6
+
7
+ {% include assets-origin.html %}
8
+
9
+ <div class="row">
10
+
11
+ <!-- core -->
12
+ <div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-4">
13
+ <div class="post pl-1 pr-1 pl-md-2 pr-md-2">
14
+
15
+ {% capture _content %}
16
+ {% if layout.refactor or page.layout == 'page' %}
17
+ {% include refactor-content.html content=content %}
18
+ {% else %}
19
+ {{ content }}
20
+ {% endif %}
21
+ {% endcapture %}
22
+
23
+ {% if page.layout == 'page' or page.collection == 'tabs'%}
24
+ {% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
25
+ <h1 class="dynamic-title">
26
+ {{ title }}
27
+ </h1>
28
+ <div class="post-content">
29
+ {{ _content }}
30
+ </div>
31
+ {% else %}
32
+ {{ _content }}
33
+ {% endif %}
34
+
35
+ </div>
36
+ </div> <!-- #core-wrapper -->
37
+
38
+ <!-- pannel -->
39
+ <div id="panel-wrapper" class="col-xl-3 pl-2 text-muted">
40
+
41
+ <div class="access">
42
+ {% include update-list.html %}
43
+ {% include trending-tags.html %}
44
+ </div>
45
+
46
+ {% for _include in layout.pannel_includes %}
47
+ {% assign _include_path = _include | append: '.html' %}
48
+ {% include {{ _include_path }} %}
49
+ {% endfor %}
50
+ </div>
51
+
52
+ </div>
53
+
54
+ <!-- tail -->
55
+ {% if layout.tail_includes %}
56
+ <div class="row">
57
+ <div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 pl-3 pr-3 pr-xl-4">
58
+ {% for _include in layout.tail_includes %}
59
+ {% assign _include_path = _include | append: '.html' %}
60
+ {% include {{ _include_path }} %}
61
+ {% endfor %}
62
+ </div>
63
+ </div>
64
+ {% endif %}