jekyll-theme-chirpy-customized-upe 3.2.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f1e3a13b8cef8fcb6250cdd014e73599f19e600c58e9f57404889e9290c6595
4
- data.tar.gz: 712ea1dcb3a5ae3b24e53e0213f3f42991cff19627b446b5c3d20c696feb53e0
3
+ metadata.gz: cd497204326cabb735f5b16b228854197e24815ebddadfa682243433fb735ec9
4
+ data.tar.gz: ed9f89afd4c2dbfffe3177dc72e0e6494bdc0a7cb6335359a568f2c6f83630ff
5
5
  SHA512:
6
- metadata.gz: 33703f85576302530e258983eb8f33192b232fe36cefbe30c21078001f5cd5667cb501f3541a7544ecc31b748f91815c4a3380cf7368234e93bf617e54232137
7
- data.tar.gz: c034e23a67ff75ce96e3629979f78236deac5bd5e83a7b7f702fe9bc06aa97898bcaf56d33fb3f178b55176a2fcb4fed44f1d41420a50f045349f23ccef88e94
6
+ metadata.gz: 1c56d5990c356f1925ce1f87fc90e15fef091379a00da1e1aa25255516570507df810a4823e908009a676ba9c12375c90d8ebb422d7592706c39e9c080431a8c
7
+ data.tar.gz: bd200f6b892b138e7d06e48cdf9cd6ec90f049ae1a885b38930d80a2d6daf63a7e0256d454091985294ed06f0bab52df4cd15610a826f99e903384b3c56eb2d6
data/README (CN).md ADDED
@@ -0,0 +1,87 @@
1
+ # Unpublished Posts Enhancement for Chirpy Theme
2
+
3
+ [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy-customized-upe)][gem] 
4
+ [![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit]
5
+
6
+ *由 [Chirpy][chirpy] 主题改编*
7
+
8
+ ## 为什么需要这个变体?
9
+
10
+ 我在使用Chirpy主题时发现了一些与我习惯不同的和仍缺失的功能,包括访问博客登录(当前仓库应设置为私密,或者部署到自己的服务器上)、Mathjax插件增强,更改UI样式等。同时,这也是对我的前端代码能力的一次挑战。
11
+
12
+ > 接下来的步骤与Chirpy文档类似
13
+
14
+ ## 安装
15
+
16
+ ### 创建一个新的URL
17
+
18
+ 登录GitHub并浏览到[**unpublished-posts-enhancement**](https://github.com/Jo-CRuiSe/unpublished-posts-enhancement)页面,点击按钮<kbd>[Use this template][use-template]</kbd> > <kbd>Create a new repository</kbd>,然后为新的存储库命名,以表示您未发布的帖子页面的URL。
19
+
20
+ ### 安装依赖项
21
+
22
+ 在第一次运行本地服务器之前,进入您站点的根目录并运行以下命令:
23
+
24
+ ```console
25
+ $ bundle
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ 在发布之前,您可能希望预览站点的内容,只需运行以下命令:
31
+
32
+ ```console
33
+ $ bundle exec jekyll s
34
+ ```
35
+
36
+ 几秒钟后,本地服务将发布在 [http://127.0.0.1:4000](http://127.0.0.1:4000)。
37
+
38
+ ## 部署
39
+
40
+ 在开始部署之前,请查看 `_config.yml`文件,并确保 `url` 配置正确。记得将 `baseurl` 更改为以斜杠开头的项目名称,例如 `/project-name`。
41
+
42
+ 现在,您可以选择以下方法之一来部署您的Jekyll站点。
43
+
44
+ ### 使用 GitHub Actions 进行部署
45
+
46
+ 准备一些事项:
47
+
48
+ - 如果您使用的是GitHub免费计划,请保持站点存储库为公开状态。
49
+ - 如果您已经将 `Gemfile.lock`提交到存储库中,并且您的本地机器不是运行Linux,请转到站点的根目录,并更新锁定文件的平台列表:
50
+
51
+ ```console
52
+ $ bundle lock --add-platform x86_64-linux
53
+ ```
54
+
55
+ 接下来,配置 _Pages_ 服务。
56
+
57
+ 1. 浏览到您的GitHub存储库。选择选项卡 _Settings_,然后在左侧导航栏中点击 _Pages_。在 **Source** 部分(位于 _Build and deployment_ 下方),从下拉菜单中选择 [**GitHub Actions**][pages-workflow-src]。
58
+
59
+ 2. 推送任何提交到GitHub以触发 _Actions_ 工作流程。在存储库的 _Actions_ 选项卡中,您应该看到 _Build and Deploy_ 工作流正在运行。一旦构建完成并成功,站点将自动部署。
60
+
61
+ 此时,您可以前往GitHub指定的URL访问您的站点。
62
+
63
+ ### 手动构建和部署
64
+
65
+ 在自托管服务器上,您无法享受 **GitHub Actions** 的便利。因此,您应该在本地机器上构建站点,然后将站点文件上传到服务器。
66
+
67
+ 进入源项目的根目录,并按以下方式构建站点:
68
+
69
+ ```console
70
+ $ JEKYLL_ENV=production bundle exec jekyll b
71
+ ```
72
+
73
+ 除非您指定了输出路径,否则生成的站点文件将放置在项目根目录的 `_site`文件夹中。现在,您应该将这些文件上传到目标服务器。
74
+
75
+ ## 配置
76
+
77
+ [此博客](https://jo-cruise.github.io/2024-02-06-HowToUseUPE)将指导您完成相关配置。
78
+
79
+ ## 许可证
80
+
81
+ 此作品以 [MIT][mit] 许可证发布。
82
+
83
+ [gem]: https://rubygems.org/gems/jekyll-theme-chirpy-customized-upe
84
+ [chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/
85
+ [use-template]: https://github.com/Jo-CRuiSe/unpublished-posts-enhancement/generate
86
+ [CD]: https://en.wikipedia.org/wiki/Continuous_deployment
87
+ [mit]: https://github.com/Jo-CRuiSe/jekyll-theme-chirpy-customized-upe/blob/master/LICENSE
data/README.md CHANGED
@@ -3,13 +3,21 @@
3
3
  [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy-customized-upe)][gem]&nbsp;
4
4
  [![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit]
5
5
 
6
- *Derived from Chirpy theme*
6
+ *Derived from [Chirpy][chirpy] theme*
7
+
8
+ [中文版](https://github.com/Jo-CRuiSe/jekyll-theme-chirpy-customized-upe/blob/master/README%20(CN).md)
9
+
10
+ ## Why do I need this customization?
11
+
12
+ While using the Chirpy theme, I have noticed some functionalities that are different from what I'm accustomed to and some functionalities that are still missing. These include implementing blog login access (the current repository should be set to private or deployed to my own server), enhancing the Mathjax plugin, and changing the UI style, among others. Additionally, this serves as a challenge to test my frontend coding skills.
13
+
14
+ > The next steps are similar to the Chirpy documentation
7
15
 
8
16
  ## Installation
9
17
 
10
18
  ### Creating a New URL
11
19
 
12
- Sign in to GitHub and browse to [**unpublished-posts-enhancement**](https://github.com/Jo-CRuiSe/unpublished-posts-enhancement), click the button <kbd>Use this template</kbd> > <kbd>Create a new repository</kbd>, and name the new repository to what you like which represents your unpulished posts pages URL.
20
+ Sign in to GitHub and browse to [**unpublished-posts-enhancement**](https://github.com/Jo-CRuiSe/unpublished-posts-enhancement), click the button <kbd>[Use this template][use-template]</kbd> > <kbd>Create a new repository</kbd>, and name the new repository to what you like which represents your unpulished posts pages URL.
13
21
 
14
22
  ### Installing Dependencies
15
23
 
@@ -31,7 +39,7 @@ After a few seconds, the local service will be published at _<http://127.0.0.1:4
31
39
 
32
40
  ## Deployment
33
41
 
34
- Before the deployment begins, check out the file `_config.yml`{: .filepath} and make sure the `url` is configured correctly. Remember to change the `baseurl` to your project name that starts with a slash, e.g, `/project-name`.
42
+ Before the deployment begins, check out the file `_config.yml`and make sure the `url` is configured correctly. Remember to change the `baseurl` to your project name that starts with a slash, e.g, `/project-name`.
35
43
 
36
44
  Now you can choose _ONE_ of the following methods to deploy your Jekyll site.
37
45
 
@@ -40,7 +48,7 @@ Now you can choose _ONE_ of the following methods to deploy your Jekyll site.
40
48
  There are a few things to get ready for.
41
49
 
42
50
  - If you're on the GitHub Free plan, keep your site repository public.
43
- - If you have committed `Gemfile.lock`{: .filepath} to the repository, and your local machine is not running Linux, go to the root of your site and update the platform list of the lock-file:
51
+ - If you have committed `Gemfile.lock` to the repository, and your local machine is not running Linux, go to the root of your site and update the platform list of the lock-file:
44
52
 
45
53
  ```console
46
54
  $ bundle lock --add-platform x86_64-linux
@@ -64,7 +72,7 @@ Go to the root of the source project, and build your site as follows:
64
72
  $ JEKYLL_ENV=production bundle exec jekyll b
65
73
  ```
66
74
 
67
- Unless you specified the output path, the generated site files will be placed in folder `_site`{: .filepath} of the project's root directory. Now you should upload those files to the target server.
75
+ Unless you specified the output path, the generated site files will be placed in folder `_site`of the project's root directory. Now you should upload those files to the target server.
68
76
 
69
77
  ## Configuration
70
78
 
@@ -75,9 +83,8 @@ Unless you specified the output path, the generated site files will be placed in
75
83
 
76
84
  This work is published under [MIT][mit] License.
77
85
 
78
- [gem]: https://rubygems.org/gems/jekyll-theme-chirpy
86
+ [gem]: https://rubygems.org/gems/jekyll-theme-chirpy-customized-upe
79
87
  [chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/
80
- [use-template]: https://github.com/cotes2020/chirpy-starter/generate
88
+ [use-template]: https://github.com/Jo-CRuiSe/unpublished-posts-enhancement/generate
81
89
  [CD]: https://en.wikipedia.org/wiki/Continuous_deployment
82
- [mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE
83
- [https://github.com/Jo-CRuiSe/unpublished-posts-enhancement]: UnpublishedPostsEnhancementforChirpyTheme
90
+ [mit]: https://github.com/Jo-CRuiSe/jekyll-theme-chirpy-customized-upe/blob/master/LICENSE
@@ -1,17 +1,30 @@
1
1
  <!-- The Side Bar -->
2
2
  <style>
3
- #InfoForm {
4
- display: none;
5
- justify-content: center;
6
- align-items: center;
7
- position: fixed;
8
- max-width: 400px;
9
- top: 50%;
10
- left: 50%;
11
- transform: translate(-50%, -50%);
12
- z-index: 9999;
13
- animation: appear 0.3s ease-in-out;
14
- transition: 0.3s;
3
+ .info-form {
4
+ visibility: hidden;
5
+ opacity: 0;
6
+ display: flex;
7
+ justify-content: center;
8
+ align-items: center;
9
+ position: fixed;
10
+ max-width: 400px;
11
+ top: 50%;
12
+ left: 50%;
13
+ z-index: 9999;
14
+ transform: translate(-50%, -60%);
15
+ animation: disappear 0.3s ease-in-out;
16
+ }
17
+
18
+ .info-form.active {
19
+ display: flex;
20
+ visibility: visible;
21
+ opacity: 1;
22
+ transform: translate(-50%, -50%);
23
+ animation: appear 0.3s ease-in-out;
24
+ }
25
+
26
+ .gal-info {
27
+ transition: all 0.3s ease-in-out;
15
28
  }
16
29
 
17
30
  @keyframes appear {
@@ -25,6 +38,18 @@
25
38
  }
26
39
  }
27
40
 
41
+ @keyframes disappear {
42
+ from {
43
+ opacity: 1;
44
+ transform: translate(-50%, -50%);
45
+ }
46
+ to {
47
+ opacity: 0;
48
+ transform: translate(-50%, -60%);
49
+ }
50
+
51
+ }
52
+
28
53
  .form-changeInfo input[type="text"],
29
54
  input[type="url"]
30
55
  {
@@ -68,6 +93,7 @@
68
93
  </style>
69
94
 
70
95
  {% include lang.html %}
96
+ {% if site.Leancloud.needLogin %}
71
97
  <div id = "InfoForm">
72
98
  <div class = "info">
73
99
  <form target="_self" class="form-changeInfo">
@@ -93,10 +119,13 @@
93
119
  </div>
94
120
  </div>
95
121
  <div class="gal-info"></div>
122
+ {% endif %}
96
123
  <aside aria-label="Sidebar" id="sidebar" class="d-flex flex-column align-items-end">
124
+ {% if site.Leancloud.needLogin %}
97
125
  <a href="javascript:void(0)" id="changeInfo" onclick="document.getElementById('InfoForm').style.display = 'flex'; document.querySelector('.gal-info').classList.add('active');" style="position: absolute; top: 140px; left: 150px;">
98
126
  <i class="fa-fw fas fa-pen-to-square"></i>
99
127
  </a>
128
+ {% endif %}
100
129
  <header class="profile-wrapper">
101
130
  <a href="{{ site.baseurl }}" id="avatar" class="rounded-circle">
102
131
  {%- if site.avatar != empty and site.avatar -%}
@@ -108,7 +137,7 @@
108
137
  </a>
109
138
 
110
139
  <div class="site-title">
111
- <a href="{{ site.baseurl }}">Hi Guest!</a>
140
+ <a href="{{ site.baseurl }}">{{site.social.name}}</a>
112
141
  </div>
113
142
  <p class="site-subtitle fst-italic mb-0">{{ site.tagline }}</p>
114
143
  </header>
@@ -189,9 +218,11 @@
189
218
  </a>
190
219
  {% endif %}
191
220
  {% endfor %}
221
+ {% if site.Leancloud.needLogin %}
192
222
  <a href="javascript:void(0);" onclick="AV.User.logOut();setTimeout(function() { window.location.reload(); }, 1000)" title="{{ site.data.locales[lang].login.logout }}">
193
223
  <i class="fas fa-right-from-bracket" style="color: rgb(181, 27, 27);"></i>
194
224
  </a>
225
+ {% endif %}
195
226
  </div>
196
227
  <!-- .sidebar-bottom -->
197
228
  </aside>
@@ -202,6 +233,8 @@
202
233
  window.location.href = '{{ site.baseurl }}';
203
234
  });
204
235
  </script>
236
+
237
+ {% if site.Leancloud.needLogin %}
205
238
  <script>
206
239
  var formValidate = {
207
240
  checkNickname: function() {
@@ -260,4 +293,5 @@
260
293
  event.preventDefault();
261
294
  });
262
295
  </script>
296
+ {% endif %}
263
297
 
@@ -77,7 +77,9 @@ layout: compress
77
77
 
78
78
  <!-- JavaScripts -->
79
79
 
80
- {% include login-check.html %}
80
+ {% if site.Leancloud.needLogin %}
81
+ {% include login-check.html %}
82
+ {% endif %}
81
83
 
82
84
  {% if site.mathjax.display_on_home.enabled %}
83
85
  {% unless page.layout == 'post' or page.layout == 'archives' %}
@@ -93,6 +95,11 @@ layout: compress
93
95
 
94
96
  {% include_cached search-loader.html %}
95
97
 
98
+ {% unless site.Leancloud.needLogin %}
99
+ <script>
100
+ document.querySelector('body').style.display='block';
101
+ </script>
102
+ {% endunless %}
96
103
 
97
104
  </body>
98
105
  </html>
data/_layouts/forgot.html CHANGED
@@ -1,6 +1,6 @@
1
+ {% if site.Leancloud.needLogin %}
1
2
  <!DOCTYPE html>
2
3
  <html>
3
-
4
4
  <head>
5
5
  <meta charset="utf-8">
6
6
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -47,13 +47,11 @@
47
47
  border-radius: 10px;
48
48
  padding: 5px;
49
49
  font-size: 1rem;
50
- outline: none;
50
+ /* outline: none; */
51
51
  }
52
52
 
53
- input[type="submit"] {
54
- width: 30%;
55
- height: 30px;
56
- padding: 0;
53
+ #forgotBtn {
54
+ padding: 5px 20px;
57
55
  margin: 15px 0;
58
56
  font-family: Arial, Helvetica, sans-serif;
59
57
  color: #fff;
@@ -63,7 +61,7 @@
63
61
  border: none;
64
62
  text-align: center;
65
63
  align-items: center;
66
- border-radius: 8px;
64
+ border-radius: 999px;;
67
65
  }
68
66
 
69
67
  #forgotBtn:active {
@@ -131,8 +129,8 @@
131
129
  <body>
132
130
  <div class="shell">
133
131
  <h2 class="title">Forgot</h2>
134
- <input type="email" id="email" placeholder="Enter the email you used to login">
135
- <input type="submit" value="Confirm" id="forgotBtn">
132
+ <input type="email" id="email" placeholder="Enter the email you used to login" required>
133
+ <button id="forgotBtn">{{ site.data.locales[lang].login.confirm }}</button>
136
134
  </div>
137
135
 
138
136
 
@@ -166,4 +164,9 @@
166
164
  </script>
167
165
  </body>
168
166
 
169
- </html>
167
+ </html>
168
+ {% else %}
169
+ <script>
170
+ window.location.href = '{{ site.baseurl}}';
171
+ </script>
172
+ {% endif %}
data/_layouts/login.html CHANGED
@@ -1,6 +1,4 @@
1
- ---
2
- layout: compress
3
- ---
1
+ {% if site.Leancloud.needLogin %}
4
2
  <!DOCTYPE html>
5
3
  <html>
6
4
 
@@ -50,17 +48,15 @@ layout: compress
50
48
  border-radius: 10px;
51
49
  padding: 5px;
52
50
  font-size: 1rem;
53
- outline: none;
51
+ /* outline: none; */
54
52
  }
55
53
 
56
54
  #email {
57
55
  display: none;
58
56
  }
59
57
 
60
- input[type="submit"] {
61
- width: 30%;
62
- height: 30px;
63
- padding: 0;
58
+ #loginBtn {
59
+ padding: 5px 20px;
64
60
  margin: 15px 0;
65
61
  font-family: Arial, Helvetica, sans-serif;
66
62
  color: #fff;
@@ -70,7 +66,7 @@ layout: compress
70
66
  border: none;
71
67
  text-align: center;
72
68
  align-items: center;
73
- border-radius: 8px;
69
+ border-radius: 999px;
74
70
  }
75
71
 
76
72
  #loginBtn:active {
@@ -184,10 +180,10 @@ layout: compress
184
180
  {% include lang.html %}
185
181
  <div class="shell">
186
182
  <h2 class="title">{{ site.data.locales[lang].login.login }}</h2>
187
- <input type="text" id="username" placeholder="{{ site.data.locales[lang].login.username }}">
188
- <input type="password" id="password" placeholder="{{ site.data.locales[lang].login.password }}">
189
- <input type="email" id="email" placeholder="{{ site.data.locales[lang].login.email }}">
190
- <input type="submit" value="{{ site.data.locales[lang].login.login }}" id="loginBtn">
183
+ <input type="text" id="username" placeholder="{{ site.data.locales[lang].login.username }}" required>
184
+ <input type="password" id="password" placeholder="{{ site.data.locales[lang].login.password }}" required>
185
+ <input type="email" id="email" placeholder="{{ site.data.locales[lang].login.email }}" required>
186
+ <button id="loginBtn">{{ site.data.locales[lang].login.login }}</button>
191
187
  <div class="footer">
192
188
  {% if site.Leancloud.allowRegister %}
193
189
  <button id="signUp">{{ site.data.locales[lang].login.go_to_register }}</button>
@@ -204,7 +200,7 @@ layout: compress
204
200
  var signUpBtn = document.getElementById('signUp');
205
201
  if (title.innerText == '{{ site.data.locales[lang].login.login }}') {
206
202
  title.innerText = '{{ site.data.locales[lang].login.register }}';
207
- loginBtn.value = '{{ site.data.locales[lang].login.register }}';
203
+ loginBtn.innerText = '{{ site.data.locales[lang].login.register }}';
208
204
  signUpBtn.innerText = '{{ site.data.locales[lang].login.go_to_login }}';
209
205
  document.getElementById('username').value = '';
210
206
  document.getElementById('password').value = '';
@@ -214,7 +210,7 @@ layout: compress
214
210
  document.getElementById('email').style.display = 'block';
215
211
  } else {
216
212
  title.innerText = '{{ site.data.locales[lang].login.login }}';
217
- loginBtn.value = '{{ site.data.locales[lang].login.login }}';
213
+ loginBtn.innerText = '{{ site.data.locales[lang].login.login }}';
218
214
  signUpBtn.innerText = '{{ site.data.locales[lang].login.go_to_register }}';
219
215
  document.getElementById('username').placeholder = '{{ site.data.locales[lang].login.username }}';
220
216
  document.getElementById('password').placeholder = '{{ site.data.locales[lang].login.password }}';
@@ -310,7 +306,7 @@ layout: compress
310
306
  }).catch(function (error) {
311
307
  /* 注册失败,处理错误信息 */
312
308
  console.log('注册失败:', error);
313
- alert('{{ site.data.locales[lang].login.register_fail }}');
309
+ alert('{{ site.data.locales[lang].login.login_fail }}' + '\n' + error.message.replace(/\[.*?\]/g, ''));
314
310
  });
315
311
  }
316
312
  };
@@ -326,4 +322,9 @@ layout: compress
326
322
  </script>
327
323
  </body>
328
324
 
329
- </html>
325
+ </html>
326
+ {% else %}
327
+ <script>
328
+ window.location.href = '{{ site.baseurl}}';
329
+ </script>
330
+ {% endif%}
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-chirpy-customized-upe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Cotes Chung
7
8
  - Jo Cruise
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2024-02-29 00:00:00.000000000 Z
12
+ date: 2024-03-18 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: jekyll
@@ -116,6 +117,7 @@ extensions: []
116
117
  extra_rdoc_files: []
117
118
  files:
118
119
  - LICENSE
120
+ - README (CN).md
119
121
  - README.md
120
122
  - _data/locales/de-DE.yml
121
123
  - _data/locales/en.yml
@@ -228,7 +230,12 @@ files:
228
230
  homepage: https://github.com/Jo-CRuiSe
229
231
  licenses:
230
232
  - MIT
231
- metadata: {}
233
+ metadata:
234
+ bug_tracker_uri: https://github.com/Jo-CRuiSe/jekyll-theme-chirpy-customized-upe/issues
235
+ documentation_uri: https://github.com/Jo-CRuiSe/jekyll-theme-chirpy-customized-upe/#readme
236
+ homepage_uri: https://jo-cruise.github.io/GemTest
237
+ source_code_uri: https://github.com/Jo-CRuiSe/jekyll-theme-chirpy-customized-upe
238
+ plugin_type: theme
232
239
  post_install_message:
233
240
  rdoc_options: []
234
241
  require_paths: