jekyll-theme-chirpy 4.3.4 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/_config.yml +9 -5
  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/mermaid.html +28 -0
  14. data/_includes/mode-toggle.html +48 -65
  15. data/_includes/read-time.html +3 -3
  16. data/_includes/refactor-content.html +109 -35
  17. data/_includes/related-posts.html +1 -1
  18. data/_includes/search-results.html +0 -8
  19. data/_includes/sidebar.html +10 -11
  20. data/_includes/timeago.html +11 -12
  21. data/_includes/toc.html +16 -0
  22. data/_includes/topbar.html +1 -1
  23. data/_includes/trending-tags.html +14 -0
  24. data/_includes/update-list.html +16 -0
  25. data/_layouts/default.html +6 -2
  26. data/_layouts/home.html +12 -9
  27. data/_layouts/page.html +45 -22
  28. data/_layouts/post.html +128 -127
  29. data/_sass/addon/commons.scss +154 -175
  30. data/_sass/addon/module.scss +48 -28
  31. data/_sass/addon/syntax.scss +55 -44
  32. data/_sass/addon/variables.scss +1 -1
  33. data/_sass/colors/dark-syntax.scss +3 -4
  34. data/_sass/colors/dark-typography.scss +11 -8
  35. data/_sass/colors/light-syntax.scss +3 -3
  36. data/_sass/colors/light-typography.scss +4 -5
  37. data/_sass/jekyll-theme-chirpy.scss +1 -1
  38. data/_sass/layout/home.scss +6 -2
  39. data/_sass/layout/post.scss +52 -46
  40. data/assets/js/dist/categories.min.js +2 -2
  41. data/assets/js/dist/commons.min.js +2 -2
  42. data/assets/js/dist/home.min.js +2 -2
  43. data/assets/js/dist/page.min.js +2 -2
  44. data/assets/js/dist/post.min.js +2 -2
  45. data/assets/js/dist/pvreport.min.js +2 -2
  46. metadata +7 -4
  47. data/_includes/panel.html +0 -59
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 -->