jekyll-theme-chirpy 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/404.html +20 -0
  3. data/LICENSE +21 -0
  4. data/README.md +223 -0
  5. data/_config.yml +204 -0
  6. data/_data/contact.yml +30 -0
  7. data/_data/date_format.yml +7 -0
  8. data/_data/label.yml +19 -0
  9. data/_data/rights.yml +11 -0
  10. data/_data/share.yml +27 -0
  11. data/_includes/css-selector.html +10 -0
  12. data/_includes/disqus.html +25 -0
  13. data/_includes/favicons.html +32 -0
  14. data/_includes/footer.html +29 -0
  15. data/_includes/google-analytics.html +14 -0
  16. data/_includes/head.html +80 -0
  17. data/_includes/js-selector.html +39 -0
  18. data/_includes/lozad.html +10 -0
  19. data/_includes/mermaid.html +29 -0
  20. data/_includes/mode-toggle.html +145 -0
  21. data/_includes/no-linenos.html +10 -0
  22. data/_includes/panel.html +57 -0
  23. data/_includes/post-nav.html +28 -0
  24. data/_includes/post-paginator.html +80 -0
  25. data/_includes/post-sharing.html +23 -0
  26. data/_includes/read-time.html +19 -0
  27. data/_includes/refactor-content.html +66 -0
  28. data/_includes/related-posts.html +106 -0
  29. data/_includes/search-loader.html +28 -0
  30. data/_includes/search-results.html +19 -0
  31. data/_includes/sidebar.html +91 -0
  32. data/_includes/timeago.html +27 -0
  33. data/_includes/topbar.html +48 -0
  34. data/_includes/trending-tags.html +36 -0
  35. data/_includes/update-list.html +24 -0
  36. data/_layouts/archives.html +36 -0
  37. data/_layouts/categories.html +100 -0
  38. data/_layouts/category.html +24 -0
  39. data/_layouts/compress.html +10 -0
  40. data/_layouts/default.html +51 -0
  41. data/_layouts/home.html +96 -0
  42. data/_layouts/page.html +34 -0
  43. data/_layouts/post.html +130 -0
  44. data/_layouts/tag.html +24 -0
  45. data/_layouts/tags.html +21 -0
  46. data/_plugins/posts-lastmod-hook.rb +14 -0
  47. data/_sass/addon/commons.scss +1629 -0
  48. data/_sass/addon/module.scss +118 -0
  49. data/_sass/addon/syntax.scss +176 -0
  50. data/_sass/addon/variables.scss +27 -0
  51. data/_sass/colors/dark-syntax.scss +84 -0
  52. data/_sass/colors/dark-typography.scss +135 -0
  53. data/_sass/colors/light-syntax.scss +75 -0
  54. data/_sass/colors/light-typography.scss +76 -0
  55. data/_sass/jekyll-theme-chirpy.scss +22 -0
  56. data/_sass/layout/archives.scss +137 -0
  57. data/_sass/layout/categories.scss +64 -0
  58. data/_sass/layout/category-tag.scss +66 -0
  59. data/_sass/layout/home.scss +156 -0
  60. data/_sass/layout/post.scss +349 -0
  61. data/_sass/layout/tags.scss +18 -0
  62. data/_tabs/about.md +8 -0
  63. data/_tabs/archives.md +7 -0
  64. data/_tabs/categories.md +6 -0
  65. data/_tabs/tags.md +6 -0
  66. data/app.js +8 -0
  67. data/assets/css/style.scss +7 -0
  68. data/assets/img/favicons/android-icon-144x144.png +0 -0
  69. data/assets/img/favicons/android-icon-192x192.png +0 -0
  70. data/assets/img/favicons/android-icon-36x36.png +0 -0
  71. data/assets/img/favicons/android-icon-48x48.png +0 -0
  72. data/assets/img/favicons/android-icon-72x72.png +0 -0
  73. data/assets/img/favicons/android-icon-96x96.png +0 -0
  74. data/assets/img/favicons/apple-icon-114x114.png +0 -0
  75. data/assets/img/favicons/apple-icon-120x120.png +0 -0
  76. data/assets/img/favicons/apple-icon-144x144.png +0 -0
  77. data/assets/img/favicons/apple-icon-152x152.png +0 -0
  78. data/assets/img/favicons/apple-icon-180x180.png +0 -0
  79. data/assets/img/favicons/apple-icon-57x57.png +0 -0
  80. data/assets/img/favicons/apple-icon-60x60.png +0 -0
  81. data/assets/img/favicons/apple-icon-72x72.png +0 -0
  82. data/assets/img/favicons/apple-icon-76x76.png +0 -0
  83. data/assets/img/favicons/apple-icon-precomposed.png +0 -0
  84. data/assets/img/favicons/apple-icon.png +0 -0
  85. data/assets/img/favicons/browserconfig.xml +20 -0
  86. data/assets/img/favicons/favicon-16x16.png +0 -0
  87. data/assets/img/favicons/favicon-32x32.png +0 -0
  88. data/assets/img/favicons/favicon-96x96.png +0 -0
  89. data/assets/img/favicons/favicon.ico +0 -0
  90. data/assets/img/favicons/manifest.json +58 -0
  91. data/assets/img/favicons/ms-icon-144x144.png +0 -0
  92. data/assets/img/favicons/ms-icon-150x150.png +0 -0
  93. data/assets/img/favicons/ms-icon-310x310.png +0 -0
  94. data/assets/img/favicons/ms-icon-70x70.png +0 -0
  95. data/assets/js/data/cache-list.js +69 -0
  96. data/assets/js/data/search.json +17 -0
  97. data/assets/js/dist/categories.min.js +6 -0
  98. data/assets/js/dist/home.min.js +6 -0
  99. data/assets/js/dist/page.min.js +6 -0
  100. data/assets/js/dist/post.min.js +6 -0
  101. data/assets/js/dist/pvreport.min.js +6 -0
  102. data/assets/js/lib/jquery.disqusloader.min.js +8 -0
  103. data/feed.xml +60 -0
  104. data/index.html +4 -0
  105. data/robots.txt +10 -0
  106. data/sw.js +61 -0
  107. metadata +247 -0
@@ -0,0 +1,96 @@
1
+ ---
2
+ layout: page
3
+ # The Home page layout
4
+ ---
5
+
6
+
7
+ {% assign pinned = site.posts | where_exp: "item", "item.pin == true" %}
8
+ {% assign default = site.posts | where_exp: "item", "item.pin != true" %}
9
+ {% assign posts = "" | split: "" %}
10
+
11
+ <!-- Get pinned posts -->
12
+
13
+ {% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
14
+ {% assign pinned_num = pinned.size | minus: offset %}
15
+
16
+ {% if pinned_num > 0 %}
17
+ {% for i in (offset..pinned.size) limit: pinned_num %}
18
+ {% assign posts = posts | push: pinned[i] %}
19
+ {% endfor %}
20
+ {% else %}
21
+ {% assign pinned_num = 0 %}
22
+ {% endif %}
23
+
24
+
25
+ <!-- Get default posts -->
26
+
27
+ {% assign default_beg = offset | minus: pinned.size %}
28
+
29
+ {% if default_beg < 0 %}
30
+ {% assign default_beg = 0 %}
31
+ {% endif %}
32
+
33
+ {% assign default_num = paginator.posts | size | minus: pinned_num %}
34
+ {% assign default_end = default_beg | plus: default_num | minus: 1 %}
35
+
36
+ {% if default_num > 0 %}
37
+ {% for i in (default_beg..default_end) %}
38
+ {% assign posts = posts | push: default[i] %}
39
+ {% endfor %}
40
+ {% endif %}
41
+
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
+ {{ content | markdownify | strip_html | truncate: 200 }}
56
+ </p>
57
+ </div>
58
+
59
+ <div class="post-meta text-muted d-flex justify-content-between">
60
+
61
+ <div>
62
+ <!-- posted date -->
63
+ <i class="far fa-calendar fa-fw"></i>
64
+ {% include timeago.html date=post.date tooltip=true %}
65
+
66
+ <!-- time to read -->
67
+ <i class="far fa-clock fa-fw"></i>
68
+ {% include read-time.html content=post.content %}
69
+
70
+ <!-- page views -->
71
+ {% if site.google_analytics.pv.enabled %}
72
+ <i class="far fa-eye fa-fw"></i>
73
+ <span id="pv_{{-post.title-}}" class="pageviews">
74
+ <i class="fas fa-spinner fa-spin fa-fw"></i>
75
+ </span>
76
+ {% endif %}
77
+ </div>
78
+
79
+ {% if post.pin %}
80
+ <div class="pin">
81
+ <i class="fas fa-thumbtack fa-fw"></i>
82
+ <span>{{ site.data.label.pin_prompt | default: 'Pinned' }}</span>
83
+ </div>
84
+ {% endif %}
85
+
86
+ </div> <!-- .post-meta -->
87
+
88
+ </div> <!-- .post-review -->
89
+
90
+ {% endfor %}
91
+
92
+ </div> <!-- #post-list -->
93
+
94
+ {% if paginator.total_pages > 0 %}
95
+ {% include post-paginator.html %}
96
+ {% endif %}
@@ -0,0 +1,34 @@
1
+ ---
2
+ layout: default
3
+ # The page layout
4
+ ---
5
+
6
+ <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 %}
10
+ <h1 class="dynamic-title">{{ page.title }}</h1>
11
+ <div class="post-content">
12
+ {{ content }}
13
+ </div>
14
+ {% else %}
15
+ {{ content }}
16
+ {% endif %}
17
+ </div> <!-- #page -->
18
+ </div><!-- .col-12 -->
19
+
20
+ {% include panel.html %}
21
+
22
+ </div>
23
+
24
+ {% if site.disqus.comments and page.comments %}
25
+ <div class="row">
26
+ <div class="col-12 col-lg-11 col-xl-8">
27
+ <div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
28
+
29
+ {% include disqus.html %}
30
+
31
+ </div> <!-- .pl-1 pr-1 -->
32
+ </div> <!-- .col-12 -->
33
+ </div> <!-- .row -->
34
+ {% endif %}
@@ -0,0 +1,130 @@
1
+ ---
2
+ layout: default
3
+ # The posts' layout
4
+ ---
5
+
6
+ <div class="row">
7
+
8
+ <div id="post-wrapper" class="col-12 col-lg-11 col-xl-8">
9
+
10
+ <div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
11
+
12
+ <h1 data-toc-skip>{{ page.title }}</h1>
13
+
14
+ <div class="post-meta text-muted d-flex flex-column">
15
+ <!-- Published date and author -->
16
+ <div>
17
+ {% include timeago.html date=page.date tooltip=true %}
18
+ by
19
+ <span class="author">
20
+ {{ page.author | default: site.author }}
21
+ </span>
22
+ </div>
23
+
24
+ <div>
25
+ <!-- lastmod -->
26
+ {% if page.last_modified_at %}
27
+ <span>
28
+ Updated
29
+ {% include timeago.html date=page.last_modified_at class="lastmod" tooltip=true %}
30
+ </span>
31
+ {% endif %}
32
+
33
+ <!-- read time -->
34
+ {% include read-time.html content=content %}
35
+
36
+ <!-- page views -->
37
+ {% if site.google_analytics.pv.enabled %}
38
+ <span id="pv" class="pageviews"><i class="fas fa-spinner fa-spin fa-fw"></i></span>
39
+ {% endif %}
40
+
41
+ </div>
42
+
43
+ </div> <!-- .post-meta -->
44
+
45
+ <div class="post-content">
46
+
47
+ {% if page.image %}
48
+ <img src="{{ page.image }}" class="preview-img" alt="Preview Image">
49
+ {% endif %}
50
+
51
+ {{ content }}
52
+
53
+ </div>
54
+
55
+ <div class="post-tail-wrapper text-muted">
56
+
57
+ <!-- categories -->
58
+ {% if page.categories.size > 0 %}
59
+ <div class="post-meta mb-3">
60
+ <i class="far fa-folder-open fa-fw mr-1"></i>
61
+ {% for category in page.categories %}
62
+ <a href='{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/'>{{ category }}</a>
63
+ {%- unless forloop.last -%}, {%- endunless -%}
64
+ {% endfor %}
65
+ </div>
66
+ {% endif %}
67
+
68
+ <!-- tags -->
69
+ {% if page.tags.size > 0 %}
70
+ <div class="post-tags">
71
+ <i class="fa fa-tags fa-fw mr-1"></i>
72
+ {% for tag in page.tags %}
73
+ <a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
74
+ class="post-tag no-text-decoration" >
75
+ {{- tag -}}
76
+ </a>
77
+ {% endfor %}
78
+ </div>
79
+ {% endif %}
80
+
81
+ <div class="post-tail-bottom
82
+ d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
83
+ {% if site.data.rights.license %}
84
+ <div class="license-wrapper">
85
+ This post is licensed under
86
+ <a href="{{ site.data.rights.license.link }}">{{ site.data.rights.license.name }}</a>
87
+ by the author.
88
+ </div>
89
+ {% endif %}
90
+
91
+ {% include post-sharing.html %}
92
+
93
+ </div><!-- .post-tail-bottom -->
94
+
95
+ </div><!-- div.post-tail -->
96
+
97
+ </div> <!-- .post -->
98
+
99
+
100
+ </div> <!-- #post-wrapper -->
101
+
102
+ {% assign enable_toc = false %}
103
+
104
+ {% if site.toc and page.toc %}
105
+ {% if content contains '<h2' or content contains '<h3' %}
106
+ {% assign enable_toc = true %}
107
+ {% endif %}
108
+ {% endif %}
109
+
110
+ {% include panel.html toc=enable_toc %}
111
+
112
+ </div> <!-- .row -->
113
+
114
+ <div class="row">
115
+ <div class="col-12 col-lg-11 col-xl-8">
116
+ <div id="post-extend-wrapper" class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
117
+
118
+ {% include related-posts.html %}
119
+
120
+ {% include post-nav.html %}
121
+
122
+ {% if site.disqus.comments and page.comments %}
123
+ {% include disqus.html %}
124
+ {% endif %}
125
+
126
+ </div> <!-- #post-extend-wrapper -->
127
+
128
+ </div> <!-- .col-* -->
129
+
130
+ </div> <!-- .row -->
data/_layouts/tag.html ADDED
@@ -0,0 +1,24 @@
1
+ ---
2
+ layout: page
3
+ # The layout for Tag page
4
+ ---
5
+
6
+
7
+ <div id="page-tag">
8
+ <h1 class="pl-lg-2">
9
+ <i class="fa fa-tag fa-fw text-muted"></i>
10
+ {{ page.title }}
11
+ <span class="lead text-muted pl-2">{{ page.posts | size }}</span>
12
+ </h1>
13
+ <ul class="post-content pl-0">
14
+ {% assign post_long_df = site.data.date_format.post.long | default: '%b %e, %Y' %}
15
+
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
+ <span class="text-muted small">{{ post.date | date: post_long_df }}</span>
21
+ </li>
22
+ {% endfor %}
23
+ </ul>
24
+ </div>
@@ -0,0 +1,21 @@
1
+ ---
2
+ layout: page
3
+ # All the Tags of posts.
4
+ ---
5
+
6
+ <div id="tags" class="d-flex flex-wrap ml-xl-2 mr-xl-2">
7
+
8
+ {% assign tags = "" | split: "" %}
9
+ {% for t in site.tags %}
10
+ {% assign tags = tags | push: t[0] %}
11
+ {% endfor %}
12
+
13
+ {% assign sorted_tags = tags | sort_natural %}
14
+
15
+ {% for t in sorted_tags %}
16
+ <div>
17
+ <a class="tag" href="{{ site.baseurl }}/tags/{{ t | slugify | url_encode }}/">{{ t }}<span class="text-muted">{{ site.tags[t].size }}</span></a>
18
+ </div>
19
+ {% endfor %}
20
+
21
+ </div>
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Check for changed posts
4
+
5
+ Jekyll::Hooks.register :posts, :post_init do |post|
6
+
7
+ commit_num = `git rev-list --count HEAD "#{ post.path }"`
8
+
9
+ if commit_num.to_i > 1
10
+ lastmod_date = `git log -1 --pretty="%ad" --date=iso "#{ post.path }"`
11
+ post.data['last_modified_at'] = lastmod_date
12
+ end
13
+
14
+ end