jekyll-theme-chirpy 4.3.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -32
  3. data/_config.yml +12 -8
  4. data/_data/locales/en.yml +2 -1
  5. data/_data/locales/id-ID.yml +2 -1
  6. data/_data/locales/ko-KR.yml +91 -0
  7. data/_data/locales/zh-CN.yml +2 -1
  8. data/_includes/{disqus.html → comments/disqus.html} +4 -4
  9. data/_includes/comments/utterances.html +51 -0
  10. data/_includes/comments.html +5 -0
  11. data/_includes/footer.html +1 -1
  12. data/_includes/js-selector.html +1 -1
  13. data/_includes/language-alias.html +1 -3
  14. data/_includes/mermaid.html +28 -0
  15. data/_includes/mode-toggle.html +48 -65
  16. data/_includes/read-time.html +3 -3
  17. data/_includes/refactor-content.html +109 -35
  18. data/_includes/related-posts.html +1 -1
  19. data/_includes/search-loader.html +1 -1
  20. data/_includes/search-results.html +0 -8
  21. data/_includes/sidebar.html +10 -11
  22. data/_includes/timeago.html +11 -12
  23. data/_includes/toc.html +16 -0
  24. data/_includes/topbar.html +1 -1
  25. data/_includes/trending-tags.html +14 -0
  26. data/_includes/update-list.html +16 -0
  27. data/_layouts/default.html +6 -2
  28. data/_layouts/home.html +12 -9
  29. data/_layouts/page.html +45 -22
  30. data/_layouts/post.html +128 -127
  31. data/_sass/addon/commons.scss +198 -187
  32. data/_sass/addon/module.scss +48 -28
  33. data/_sass/addon/syntax.scss +56 -43
  34. data/_sass/addon/variables.scss +1 -1
  35. data/_sass/colors/dark-syntax.scss +3 -4
  36. data/_sass/colors/dark-typography.scss +23 -15
  37. data/_sass/colors/light-syntax.scss +3 -3
  38. data/_sass/colors/light-typography.scss +4 -5
  39. data/_sass/jekyll-theme-chirpy.scss +1 -1
  40. data/_sass/layout/archives.scss +5 -1
  41. data/_sass/layout/category-tag.scss +3 -2
  42. data/_sass/layout/home.scss +15 -4
  43. data/_sass/layout/post.scss +70 -46
  44. data/_sass/layout/tags.scss +1 -0
  45. data/assets/js/data/search.json +1 -1
  46. data/assets/js/dist/categories.min.js +2 -2
  47. data/assets/js/dist/commons.min.js +2 -2
  48. data/assets/js/dist/home.min.js +2 -2
  49. data/assets/js/dist/page.min.js +2 -2
  50. data/assets/js/dist/post.min.js +2 -2
  51. data/assets/js/dist/pvreport.min.js +2 -2
  52. metadata +12 -9
  53. data/_includes/panel.html +0 -59
data/_layouts/page.html CHANGED
@@ -1,41 +1,64 @@
1
1
  ---
2
2
  layout: default
3
- # The page layout
4
3
  ---
5
4
 
5
+ {% include lang.html %}
6
+
6
7
  <div class="row">
7
- <div class="col-12 col-lg-11 col-xl-8">
8
- <div id="page" class="post pb-5 pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4 mb-md-4">
9
- {% if page.dynamic_title %}
8
+
9
+ <!-- core -->
10
+ <div id="core-wrapper" class="col-12 col-lg-11 col-xl-8">
11
+ <div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
12
+
13
+ {% capture _content %}
14
+ {% if layout.refactor or page.layout == 'page' %}
15
+ {% include refactor-content.html content=content %}
16
+ {% else %}
17
+ {{ content }}
18
+ {% endif %}
19
+ {% endcapture %}
20
+
21
+ {% if page.layout == 'page' or page.collection == 'tabs'%}
22
+ {% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
10
23
  <h1 class="dynamic-title">
11
- {% if page.collection == 'tabs' %}
12
- {%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
13
- {{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
14
- {% else %}
15
- {{- page.title -}}
16
- {% endif %}
24
+ {{ title }}
17
25
  </h1>
18
26
  <div class="post-content">
19
- {{ content }}
27
+ {{ _content }}
20
28
  </div>
21
29
  {% else %}
22
- {{ content }}
30
+ {{ _content }}
23
31
  {% endif %}
24
- </div> <!-- #page -->
25
- </div><!-- .col-12 -->
26
32
 
27
- {% include panel.html %}
33
+ </div>
34
+ </div> <!-- #core-wrapper -->
35
+
36
+ <!-- pannel -->
37
+ <div id="panel-wrapper" class="col-xl-3 pl-2 text-muted topbar-down">
38
+
39
+ <div class="access">
40
+ {% include update-list.html %}
41
+ {% include trending-tags.html %}
42
+ </div>
43
+
44
+ {% for _include in layout.pannel_includes %}
45
+ {% assign _include_path = _include | append: '.html' %}
46
+ {% include {{ _include_path }} %}
47
+ {% endfor %}
48
+ </div>
28
49
 
29
50
  </div>
30
51
 
31
- {% if site.disqus.comments and page.comments %}
52
+ <!-- tail -->
53
+ {% if layout.tail_includes %}
32
54
  <div class="row">
33
55
  <div class="col-12 col-lg-11 col-xl-8">
34
- <div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
35
-
36
- {% include disqus.html %}
37
-
38
- </div> <!-- .pl-1 pr-1 -->
39
- </div> <!-- .col-12 -->
56
+ <div id="tail-wrapper" class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
57
+ {% for _include in layout.tail_includes %}
58
+ {% assign _include_path = _include | append: '.html' %}
59
+ {% include {{ _include_path }} %}
60
+ {% endfor %}
61
+ </div>
62
+ </div>
40
63
  </div> <!-- .row -->
41
64
  {% endif %}
data/_layouts/post.html CHANGED
@@ -1,143 +1,144 @@
1
1
  ---
2
- layout: default
3
- # The posts' layout
2
+ layout: page
3
+ refactor: true
4
+ pannel_includes:
5
+ - toc
6
+ tail_includes:
7
+ - related-posts
8
+ - post-nav
9
+ - comments
4
10
  ---
5
11
 
6
12
  {% include lang.html %}
7
13
 
8
- <div class="row">
9
-
10
- <div id="post-wrapper" class="col-12 col-lg-11 col-xl-8">
11
-
12
- <div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
13
-
14
- <h1 data-toc-skip>{{ page.title }}</h1>
15
-
16
- <div class="post-meta text-muted d-flex flex-column">
17
- <!-- Published date and author -->
18
- <div>
19
- <span class="semi-bold">
20
- {{ page.author | default: site.social.name }}
21
- </span>
22
- {% capture _preposition %}{{ site.data.locales[lang].post.published }}{% endcapture %}
23
- {% include timeago.html date=page.date tooltip=true preposition=_preposition %}
24
- </div>
25
-
26
- <div>
27
- <!-- lastmod -->
28
- {% if page.last_modified_at %}
29
- <span>
30
- {{ site.data.locales[lang].post.updated }}
31
- {% include timeago.html date=page.last_modified_at class="lastmod" tooltip=true %}
32
- </span>
33
- {% endif %}
34
-
35
- <!-- read time -->
36
- {% include read-time.html content=content prompt=true %}
37
-
38
- <!-- page views -->
39
- {% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
40
- <span id="pv" class="pageviews">
41
- <i class="fas fa-spinner fa-spin fa-fw"></i>
42
- </span>
43
- {{ site.data.locales[lang].post.pageview_measure }}
44
- {% endif %}
45
-
46
- </div>
47
-
48
- </div> <!-- .post-meta -->
49
-
50
- <div class="post-content">
51
-
52
- {% if page.image.src %}
53
- <img src="{{ page.image.src }}"
54
- class="preview-img"
55
- alt="{{ page.image.alt | default: "Preview Image" }}"
56
- {% if page.image.width %}width="{{ page.image.width }}"{% endif %}
57
- {% if page.image.height %}height="{{ page.image.height }}"{% endif %}>
58
- {% endif %}
59
-
60
- {{ content }}
61
-
62
- </div>
63
-
64
- <div class="post-tail-wrapper text-muted">
65
-
66
- <!-- categories -->
67
- {% if page.categories.size > 0 %}
68
-
69
- <div class="post-meta mb-3">
70
- <i class="far fa-folder-open fa-fw mr-1"></i>
71
- {% for category in page.categories %}
72
- <a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
73
- {%- unless forloop.last -%}, {%- endunless -%}
74
- {% endfor %}
75
- </div>
76
- {% endif %}
77
-
78
- <!-- tags -->
79
- {% if page.tags.size > 0 %}
80
- <div class="post-tags">
81
- <i class="fa fa-tags fa-fw mr-1"></i>
82
- {% for tag in page.tags %}
83
- <a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
84
- class="post-tag no-text-decoration" >
85
- {{- tag -}}
86
- </a>
87
- {% endfor %}
88
- </div>
89
- {% endif %}
90
-
91
- <div class="post-tail-bottom
92
- d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
93
- <div class="license-wrapper">
94
- {% if site.data.locales[lang].copyright.license.template %}
95
- {% capture _replacement %}
96
- <a href="{{ site.data.locales[lang].copyright.license.link }}">
97
- {{ site.data.locales[lang].copyright.license.name }}
98
- </a>
99
- {% endcapture %}
100
- {{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
101
- {% endif %}
102
- </div>
103
-
104
- {% include post-sharing.html %}
105
-
106
- </div><!-- .post-tail-bottom -->
107
-
108
- </div><!-- div.post-tail -->
109
-
110
- </div> <!-- .post -->
111
-
112
-
113
- </div> <!-- #post-wrapper -->
114
-
115
- {% assign enable_toc = false %}
116
-
117
- {% if site.toc and page.toc %}
118
- {% if content contains '<h2' or content contains '<h3' %}
119
- {% assign enable_toc = true %}
14
+ {% if page.image.src %}
15
+ {% capture bg %}
16
+ {% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
17
+ {% endcapture %}
18
+ <img src="{{ page.image.src }}" class="preview-img {{ bg | strip }}"
19
+ alt="{{ page.image.alt | default: "Preview Image" }}"
20
+
21
+ {% if page.image.width %}
22
+ width="{{ page.image.width }}"
23
+ {% elsif page.image.w %}
24
+ width="{{ page.image.w }}"
25
+ {% endif %}
26
+
27
+ {% if page.image.height %}
28
+ height="{{ page.image.height }}"
29
+ {% elsif page.image.h %}
30
+ height="{{ page.image.h }}"
31
+ {% endif %}>
32
+ {% endif %}
33
+
34
+ <h1 data-toc-skip>{{ page.title }}</h1>
35
+
36
+ <div class="post-meta text-muted">
37
+
38
+ <!-- author -->
39
+ <div>
40
+ {% capture author_name %}{{ page.author.name | default: site.social.name }}{% endcapture %}
41
+ {% assign author_link = nil %}
42
+
43
+ {% if page.author.link %}
44
+ {% assign author_link = page.author.link %}
45
+ {% elsif author_name == site.social.name %}
46
+ {% assign author_link = site.social.links[0] %}
120
47
  {% endif %}
48
+
49
+ {{ site.data.locales[lang].post.written_by }}
50
+ <em>
51
+ {% if author_link %}
52
+ <a href="{{ author_link }}">{{ author_name }}</a>
53
+ {% else %}
54
+ {{ author_name }}
55
+ {% endif %}
56
+ </em>
57
+ </div>
58
+
59
+ <div class="d-flex">
60
+ <div>
61
+ <!-- published date -->
62
+ <span>
63
+ {{ site.data.locales[lang].post.posted }}
64
+ {% include timeago.html date=page.date tooltip=true %}
65
+ </span>
66
+
67
+ <!-- lastmod date -->
68
+ {% if page.last_modified_at %}
69
+ <span>
70
+ {{ site.data.locales[lang].post.updated }}
71
+ {% include timeago.html date=page.last_modified_at tooltip=true %}
72
+ </span>
73
+ {% endif %}
74
+
75
+ <!-- read time -->
76
+ {% include read-time.html content=content prompt=true %}
77
+
78
+ <!-- page views -->
79
+ {% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
80
+ <span>
81
+ <em id="pv" class="pageviews">
82
+ <i class="fas fa-spinner fa-spin fa-fw"></i>
83
+ </em>
84
+ {{ site.data.locales[lang].post.pageview_measure }}
85
+ </span>
86
+ {% endif %}
87
+ </div>
88
+
89
+ </div> <!-- .d-flex -->
90
+
91
+ </div> <!-- .post-meta -->
92
+
93
+ <div class="post-content">
94
+ {{ content }}
95
+ </div>
96
+
97
+ <div class="post-tail-wrapper text-muted">
98
+
99
+ <!-- categories -->
100
+ {% if page.categories.size > 0 %}
101
+ <div class="post-meta mb-3">
102
+ <i class="far fa-folder-open fa-fw mr-1"></i>
103
+ {% for category in page.categories %}
104
+ <a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
105
+ {%- unless forloop.last -%}, {%- endunless -%}
106
+ {% endfor %}
107
+ </div>
121
108
  {% endif %}
122
109
 
123
- {% include panel.html toc=enable_toc %}
110
+ <!-- tags -->
111
+ {% if page.tags.size > 0 %}
112
+ <div class="post-tags">
113
+ <i class="fa fa-tags fa-fw mr-1"></i>
114
+ {% for tag in page.tags %}
115
+ <a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
116
+ class="post-tag no-text-decoration" >
117
+ {{- tag -}}
118
+ </a>
119
+ {% endfor %}
120
+ </div>
121
+ {% endif %}
124
122
 
125
- </div> <!-- .row -->
123
+ <div class="post-tail-bottom
124
+ d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
125
+ <div class="license-wrapper">
126
126
 
127
- <div class="row">
128
- <div class="col-12 col-lg-11 col-xl-8">
129
- <div id="post-extend-wrapper" class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
127
+ {% if site.data.locales[lang].copyright.license.template %}
130
128
 
131
- {% include related-posts.html %}
129
+ {% capture _replacement %}
130
+ <a href="{{ site.data.locales[lang].copyright.license.link }}">
131
+ {{ site.data.locales[lang].copyright.license.name }}
132
+ </a>
133
+ {% endcapture %}
132
134
 
133
- {% include post-nav.html %}
135
+ {{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
134
136
 
135
- {% if site.disqus.comments and page.comments %}
136
- {% include disqus.html %}
137
- {% endif %}
137
+ {% endif %}
138
+ </div>
138
139
 
139
- </div> <!-- #post-extend-wrapper -->
140
+ {% include post-sharing.html %}
140
141
 
141
- </div> <!-- .col-* -->
142
+ </div><!-- .post-tail-bottom -->
142
143
 
143
- </div> <!-- .row -->
144
+ </div><!-- div.post-tail-wrapper -->