jekyll-theme-chirpy-customized-upe 0.0.7 → 0.0.8

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: a6743e1d57385617ea45d144d7e6ccc0f1425787c36c03c3e9f09c23d192c664
4
- data.tar.gz: 984b663331973f39addf1a9af13ef7d33f1e8c5ae55bed6a0abdfc23fd15e13c
3
+ metadata.gz: 7d11cfa94e88b60b009f85a8c72729e9f007ab43ff6349913697f8586d735e17
4
+ data.tar.gz: 2debc999f79e8595f13ab21be3947c1ecbdd9aa61a54ca96e3b7400291e14912
5
5
  SHA512:
6
- metadata.gz: 2df78e174e0d328cfb7ea97f6a23c6d0ce41fb9499232f8f5eedbc9dcf1a38d9a58890abdc65c0f54dcac8cf7a702be78ea0bb4d912c68fad19b99069780dc8a
7
- data.tar.gz: a3159235331edbe7e5a49bfda0f378227704094d70d328c3c32eee8a320e3db44e14e913c1cf42b9bfaf5014e19bce607e85b98c1746757a3990fc6832db192a
6
+ metadata.gz: afba89fcd48cefcb313d9eff2acf89149846235bdd15ef69741956eb411a12dc8531de3aeb79208dea7e2fe1697506b2deb3e37299b0bc6641788c1b7eae0ae4
7
+ data.tar.gz: 6021389bae4fcbfe3d2c8248fe00dac0e582b7ebc06796349f3604d5cb48deec8bd679c39ded6b7544475c2a6efcc4c8c04fe8af691bc0e7d651dd6e840687bc
data/README.md CHANGED
@@ -1,81 +1,83 @@
1
- <div align="center">
1
+ # Unpublished Posts Enhancement for Chirpy Theme
2
2
 
3
- # Chirpy Jekyll Theme
3
+ [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy)][gem]&nbsp;
4
+ [![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit]
4
5
 
5
- A minimal, responsive, and feature-rich Jekyll theme for technical writing.
6
+ *Derived from Chirpy theme*
6
7
 
7
- [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)][gem]&nbsp;
8
- [![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg?branch=master&event=push)][ci]&nbsp;
9
- [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)][codacy]&nbsp;
10
- [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)][license]&nbsp;
11
- [![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
8
+ ## Installation
12
9
 
13
- [**Live Demo** →][demo]
10
+ ### Creating a New URL
14
11
 
15
- [![Devices Mockup](https://chirpy-img.netlify.app/commons/devices-mockup.png)][demo]
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.
16
13
 
17
- </div>
14
+ ### Installing Dependencies
18
15
 
19
- ## Features
16
+ Before running local server for the first time, go to the root directory of your site and run:
20
17
 
21
- - Dark / Light Theme Mode
22
- - Localized UI language
23
- - Pinned Posts on Home Page
24
- - Hierarchical Categories
25
- - Trending Tags
26
- - Table of Contents
27
- - Last Modified Date
28
- - Syntax Highlighting
29
- - Mathematical Expressions
30
- - Mermaid Diagrams & Flowcharts
31
- - Dark / Light Mode Images
32
- - Embed Videos
33
- - Disqus / Giscus / Utterances Comments
34
- - Built-in Search
35
- - Atom Feeds
36
- - PWA
37
- - Google Analytics / GoatCounter
38
- - SEO & Performance Optimization
18
+ ```console
19
+ $ bundle
20
+ ```
39
21
 
40
- ## Documentation
22
+ ## Usage
41
23
 
42
- To learn how to use, develop, and upgrade the project, please refer to the [Wiki][wiki].
24
+ You may want to preview the site contents before publishing, so just run it by:
43
25
 
44
- ## Contributing
26
+ ```console
27
+ $ bundle exec jekyll s
28
+ ```
45
29
 
46
- Contributions (_pull requests_, _issues_, and _discussions_) are what make the open-source community such an amazing place
47
- to learn, inspire, and create. Any contributions you make are greatly appreciated.
48
- For details, see the "[Contributing Guidelines][contribute-guide]".
30
+ After a few seconds, the local service will be published at _<http://127.0.0.1:4000>_.
49
31
 
50
- ## Credits
32
+ ## Deployment
51
33
 
52
- ### Contributors
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`.
53
35
 
54
- Thanks to [all the contributors][contributors] involved in the development of the project!
36
+ Now you can choose _ONE_ of the following methods to deploy your Jekyll site.
55
37
 
56
- [![all-contributors](https://contrib.rocks/image?repo=cotes2020/jekyll-theme-chirpy&columns=16)][contributors]
57
- <sub> —— Made with [contrib.rocks](https://contrib.rocks)</sub>
38
+ ### Deploy by Using GitHub Actions
58
39
 
59
- ### Third-Party Assets
40
+ There are a few things to get ready for.
60
41
 
61
- This project is built on the [Jekyll][jekyllrb] ecosystem and some [great libraries][lib], and is developed using [VS Code][vscode] as well as tools provided by [JetBrains][jetbrains] under a non-commercial open-source software license.
42
+ - 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:
44
+
45
+ ```console
46
+ $ bundle lock --add-platform x86_64-linux
47
+ ```
48
+
49
+ Next, configure the _Pages_ service.
50
+
51
+ 1. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar. Then, in the **Source** section (under _Build and deployment_), select [**GitHub Actions**][pages-workflow-src] from the dropdown menu.
52
+
53
+ 2. Push any commits to GitHub to trigger the _Actions_ workflow. In the _Actions_ tab of your repository, you should see the workflow _Build and Deploy_ running. Once the build is complete and successful, the site will be deployed automatically.
54
+
55
+ At this point, you can go to the URL indicated by GitHub to access your site.
56
+
57
+ ### Manually Build and Deploy
58
+
59
+ On self-hosted servers, you cannot enjoy the convenience of **GitHub Actions**. Therefore, you should build the site on your local machine and then upload the site files to the server.
60
+
61
+ Go to the root of the source project, and build your site as follows:
62
+
63
+ ```console
64
+ $ JEKYLL_ENV=production bundle exec jekyll b
65
+ ```
66
+
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.
68
+
69
+ ## Configuration
70
+
71
+ [This blog](https://jo-cruise.github.io/2024-02-06-HowToUseUPE) will guide you to complete relative configuration.
62
72
 
63
- The avatar and favicon for the project's website are from [ClipartMAX][clipartmax].
64
73
 
65
74
  ## License
66
75
 
67
- This project is published under [MIT License][license].
76
+ This work is published under [MIT][mit] License.
68
77
 
69
78
  [gem]: https://rubygems.org/gems/jekyll-theme-chirpy
70
- [ci]: https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml?query=event%3Apush+branch%3Amaster
71
- [codacy]: https://app.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
72
- [license]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE
73
- [jekyllrb]: https://jekyllrb.com/
74
- [clipartmax]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
75
- [demo]: https://cotes2020.github.io/chirpy-demo/
76
- [wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
77
- [contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md
78
- [contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors
79
- [lib]: https://github.com/cotes2020/chirpy-static-assets
80
- [vscode]: https://code.visualstudio.com/
81
- [jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
79
+ [chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/
80
+ [use-template]: https://github.com/cotes2020/chirpy-starter/generate
81
+ [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
@@ -1,5 +1,4 @@
1
1
  <script src="https://cdn.jsdelivr.net/npm/leancloud-storage/dist/av-min.js"></script>
2
-
3
2
  <script type="text/javascript">
4
3
  let appId = '{{ site.Leancloud.appId }}';
5
4
  let appKey = '{{ site.Leancloud.appKey }}';
@@ -36,57 +35,4 @@
36
35
  };
37
36
  /* 在页面加载时调用checkLogin函数检查登录状态 */
38
37
  window.addEventListener('load', checkLogin);
39
- </script>
40
-
41
- <script src="https://code.jquery.com/jquery-3.2.0.min.js"></script>
42
- <script>
43
-
44
- const visitors_record = AV.Object.extend('visitors_record');
45
- const visitors = new visitors_record();
46
-
47
- function getPageInfo() {
48
- return new Promise(function (resolve, reject) {
49
- $.getJSON("https://2024.ipchaxun.com/", function (data) {
50
- resolve(data);
51
- });
52
- });
53
- }
54
-
55
- getPageInfo().then(function (locationData) {
56
- if (AV.User.current() == null || AV.User.current().get('username') != 'JoCruise') {
57
- var currentUrl = window.location.href;
58
- var ip = locationData.ip;
59
- var country = locationData.data[0];
60
- var province = locationData.data[1];
61
- var city = locationData.data[2];
62
- var district = locationData.data[3];
63
- var isp = locationData.data[4];
64
- var userAgent = navigator.userAgent;
65
- var loadTime = window.performance.timing.domContentLoadedEventEnd - window.performance.timing.navigationStart;
66
-
67
- visitors.set('visitor_ip', ip);
68
- visitors.set('visited_url', currentUrl);
69
- visitors.set('visitor_country', country);
70
- visitors.set('visitor_province', province);
71
- visitors.set('visitor_city', city);
72
- visitors.set('visitor_district', district);
73
- visitors.set('visitor_isp', isp);
74
- visitors.set('visitor_ua', userAgent);
75
- visitors.set('page_load_time', loadTime);
76
- console.log('Page load time is ' + loadTime);
77
-
78
-
79
- visitors.save().then(
80
- (visitors) => {
81
- console.log(`${visitors.id}`);
82
- },
83
- (error) => {
84
- console.log(error);
85
- }
86
- );
87
- }
88
-
89
- });
90
-
91
-
92
38
  </script>
@@ -4,7 +4,7 @@
4
4
  display: none;
5
5
  justify-content: center;
6
6
  align-items: center;
7
- position: fixed;
7
+ position: absolute;
8
8
  top: 50%;
9
9
  left: 50%;
10
10
  transform: translate(-50%, -50%);
@@ -23,7 +23,7 @@
23
23
  transform: translate(-50%, -50%);
24
24
  }
25
25
  }
26
-
26
+
27
27
  .form-changeInfo input[type="text"],
28
28
  input[type="url"]
29
29
  {
@@ -69,26 +69,25 @@
69
69
  }
70
70
  </style>
71
71
 
72
- {% include lang.html %}
73
72
  <div id = "InfoForm">
74
73
  <div class = "info">
75
74
  <form target="_self" class="form-changeInfo">
76
75
  <div class="form-avatar">
77
- <label for="avatar">{{ site.data.locales[lang].sidebar.new_avatar }}</label>
78
- <input type="url" name="avatar" placeholder="{{ site.data.locales[lang].sidebar.optional }}" id="newAvatar" onblur="formValidate.checkAvatar()"/>
76
+ <label for="avatar">请提供新头像的URL:</label>
77
+ <input type="url" name="avatar" placeholder="Optional" id="newAvatar" onblur="formValidate.checkAvatar()"/>
79
78
  <span class="validatemsg" id="isAvatarValid"></span>
80
79
  </div>
81
80
  <div class="form-nickname">
82
- <label for="nickname">{{ site.data.locales[lang].sidebar.new_nickname }}</label>
83
- <input type="text" name="nickname" maxlength="15" placeholder="{{ site.data.locales[lang].sidebar.optional }}" id="newNickname" onblur="formValidate.checkNickname()"/>
81
+ <label for="nickname">请输入您的新昵称: </label>
82
+ <input type="text" name="nickname" maxlength="15" placeholder="Optional" id="newNickname" onblur="formValidate.checkNickname()"/>
84
83
  <span class="validatemsg" id="isNicknameValid"></span>
85
84
  </div>
86
85
  <div class="form-buttons">
87
86
  <div class="form-submit">
88
- <input type="button" class="submitChange" value="{{ site.data.locales[lang].sidebar.submit }}" onclick="updateUserInfo()"/>
87
+ <input type="button" class="submitChange" value="Submit" onclick="updateUserInfo()"/>
89
88
  </div>
90
89
  <div class="form-cancel">
91
- <input type="button" class="cancelChange" value="{{ site.data.locales[lang].sidebar.cancel }}"/>
90
+ <input type="button" class="cancelChange" value="Cancel"/>
92
91
  </div>
93
92
  </div>
94
93
  </form>
@@ -121,7 +120,7 @@
121
120
  <!-- home -->
122
121
  <li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
123
122
  <a href="{{ '/' | relative_url }}" class="nav-link">
124
- <i class="fa-fw fas fa-eye-slash"></i>
123
+ <i class="fa-fw fas fa-home"></i>
125
124
  <span>{{ site.data.locales[include.lang].tabs.home | upcase }}</span>
126
125
  </a>
127
126
  </li>
@@ -191,7 +190,7 @@
191
190
  </a>
192
191
  {% endif %}
193
192
  {% endfor %}
194
- <a href="javascript:void(0);" onclick="AV.User.logOut();setTimeout(function() { window.location.reload(); }, 1000)" title="{{ site.data.locales[lang].login.logout }}">
193
+ <a href="javascript:void(0);" onclick="AV.User.logOut();setTimeout(function() { window.location.reload(); }, 1000)">
195
194
  <i class="fas fa-right-from-bracket" style="color: rgb(181, 27, 27);"></i>
196
195
  </a>
197
196
  </div>
@@ -222,7 +221,7 @@
222
221
  document.getElementById('isAvatarValid').style.color = 'green';
223
222
  return true;
224
223
  } else if (document.getElementById('newAvatar').value.trim() !='') {
225
- document.getElementById('isAvatarValid').innerHTML = '<i class="fa-fw fas fa-xmark"></i>{{ site.data.locales[lang].sidebar.invalid_url }}';
224
+ document.getElementById('isAvatarValid').innerHTML = '<i class="fa-fw fas fa-xmark"></i>Invalid URL';
226
225
  document.getElementById('isAvatarValid').style.color = 'red';
227
226
  } else {
228
227
  document.getElementById('isAvatarValid').innerHTML = '';
@@ -246,7 +245,7 @@
246
245
  currentUser.save().then((user) => {
247
246
  console.log('保存成功!');
248
247
  if (newAvatar != '' || newNickname != '') {
249
- alert("{{ site.data.locales[lang].sidebar.save_success }}");
248
+ alert("Save Successfully!");
250
249
  window.location.reload();
251
250
  }
252
251
  }).catch((error) => {
@@ -1,17 +1,17 @@
1
1
  {% if site.valine_comment.enable %}
2
- <div id="comments"></div>
3
- <script src='https://cdn1.lncld.net/static/js/3.0.4/av-min.js'></script>
4
- <script src='https://unpkg.com/valine/dist/Valine.min.js'></script>
5
- <script>
6
- new Valine({
7
- el: '#comments',
8
- app_id: '{{ site.valine_comment.leancloud_appid }}',
9
- app_key: '{{ site.valine_comment.leancloud_appkey }}',
10
- placeholder: '🥳 快来发表一条评论吧!(允许匿名评论)\n📨 呢称填入QQ号可以自动补全邮箱和显示头像 \n📬 留下您的邮箱,如有回复消息,会通过邮件向您发送通知 \n📝 请遵守网络道德',
11
- avatar: 'monsterid',
12
- serverURLs: '{{ site.valine_comment.serverURLs }}',
13
- visitor: true,
14
- enableQQ: '{{ site.valine_comment.enableQQ }}'
15
- });
16
- </script>
2
+ <div id="comments"></div>
3
+ <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
4
+ <script src='//unpkg.com/valine/dist/Valine.min.js'></script>
5
+ <script>
6
+ new Valine({
7
+ el: '#comments',
8
+ app_id: '{{ site.valine_comment.leancloud_appid }}',
9
+ app_key: '{{ site.valine_comment.leancloud_appkey }}',
10
+ placeholder: '🥳 快来发表一条评论吧!(允许匿名评论)\n📨 呢称填入QQ号可以自动补全邮箱和显示头像 \n📬 留下您的邮箱,如有回复消息,会通过邮件向您发送通知 \n📝 请遵守网络道德',
11
+ avatar: 'monsterid',
12
+ serverURLs: '{{ site.valine_comment.serverURLs }}',
13
+ visitor: true,
14
+ enableQQ: '{{ site.valine_comment.enableQQ }}'
15
+ });
16
+ </script>
17
17
  {% endif %}
@@ -135,4 +135,4 @@ layout: page
135
135
 
136
136
  {% assign group_index = group_index | plus: 1 %}
137
137
  {% endif %}
138
- {% endfor %}
138
+ {% endfor %}
@@ -21,4 +21,4 @@ layout: page
21
21
  </li>
22
22
  {% endfor %}
23
23
  </ul>
24
- </div>
24
+ </div>
@@ -80,8 +80,6 @@ layout: compress
80
80
 
81
81
  {% include login-check.html %}
82
82
 
83
- <!-- {% include visits.html %} -->
84
-
85
83
  {% include js-selector.html %}
86
84
 
87
85
  {% if page.mermaid %}
data/_layouts/forgot.html CHANGED
@@ -31,7 +31,6 @@
31
31
  font-size: 60px;
32
32
  font-family: 'Times New Roman', Times, serif;
33
33
  margin-bottom: 30px;
34
- white-space: nowrap;
35
34
  }
36
35
 
37
36
  input[type="text"],
@@ -125,11 +124,10 @@
125
124
  </head>
126
125
 
127
126
  <body>
128
- {% include lang.html %}
129
127
  <div class="shell">
130
- <h2 class="title">{{ site.data.locales[lang].login.forgot }}</h2>
131
- <input type="email" id="email" placeholder="{{ site.data.locales[lang].login.forgot_prompt }}">
132
- <input type="submit" value="{{ site.data.locales[lang].login.confirm }}" id="loginBtn">
128
+ <h2 class="title">Forgot</h2>
129
+ <input type="email" id="email" placeholder="Enter the email you used to login">
130
+ <input type="submit" value="Confirm" id="loginBtn">
133
131
  </div>
134
132
 
135
133
 
@@ -147,13 +145,13 @@
147
145
  var email = document.getElementById("email").value.trim();
148
146
  try {
149
147
  await AV.User.requestPasswordReset(email);
150
- alert('');
148
+ alert('The reset-password email was successfully!');
151
149
  } catch (error) {
152
150
  if (error.code == '204') {
153
- alert('{{ site.data.locales[lang].login.email_missing }}');
151
+ alert('The email is missing, please enter your email address.');
154
152
  }
155
153
  else if (error.code == '205') {
156
- alert('{{ site.data.locales[lang].login.enter_valid_email }}');
154
+ alert('The email is invalid.');
157
155
  } else {
158
156
  alert('An unknown error occurred');
159
157
  }
data/_layouts/login.html CHANGED
@@ -133,18 +133,17 @@ layout: compress
133
133
  </head>
134
134
 
135
135
  <body>
136
- {% include lang.html %}
137
136
  <div class="shell">
138
- <h2 class="title">{{ site.data.locales[lang].login.login }}</h2>
139
- <input type="text" id="username" placeholder="{{ site.data.locales[lang].login.username }}">
140
- <input type="password" id="password" placeholder="{{ site.data.locales[lang].login.password }}">
141
- <input type="email" id="email" placeholder="{{ site.data.locales[lang].login.email }}">
142
- <input type="submit" value="{{ site.data.locales[lang].login.login }}" id="loginBtn">
137
+ <h2 class="title">Login</h2>
138
+ <input type="text" id="username" placeholder="Username">
139
+ <input type="password" id="password" placeholder="Password">
140
+ <input type="email" id="email" placeholder="Email(MUST)">
141
+ <input type="submit" value="Login" id="loginBtn">
143
142
  <div class="footer">
144
143
  {% if site.Leancloud.allowRegister %}
145
- <button id="signUp">{{ site.data.locales[lang].login.go_to_register }}</button>
144
+ <button id="signUp">Go to Register</button>
146
145
  {% endif %}
147
- <button id="forgotPassword">{{ site.data.locales[lang].login.forgot_password }}</button>
146
+ <button id="forgotPassword">Forgot Password?</button>
148
147
  </div>
149
148
  </div>
150
149
 
@@ -154,22 +153,22 @@ layout: compress
154
153
  var title = document.querySelector('.title');
155
154
  var loginBtn = document.getElementById('loginBtn');
156
155
  var signUpBtn = document.getElementById('signUp');
157
- if (title.innerText == '{{ site.data.locales[lang].login.login }}') {
158
- title.innerText = '{{ site.data.locales[lang].login.register }}';
159
- loginBtn.value = '{{ site.data.locales[lang].login.register }}';
160
- signUpBtn.innerText = '{{ site.data.locales[lang].login.go_to_login }}';
156
+ if (title.innerText == 'Login') {
157
+ title.innerText = 'Register';
158
+ loginBtn.value = 'Register';
159
+ signUpBtn.innerText = 'Go to login';
161
160
  document.getElementById('username').value = '';
162
161
  document.getElementById('password').value = '';
163
- document.getElementById('username').placeholder = '{{ site.data.locales[lang].login.new_username }}';
164
- document.getElementById('password').placeholder = '{{ site.data.locales[lang].login.new_password }}';
162
+ document.getElementById('username').placeholder = 'New User Name';
163
+ document.getElementById('password').placeholder = 'New Password';
165
164
  document.getElementById('password').type = 'password';
166
165
  document.getElementById('email').style.display = 'block';
167
166
  } else {
168
- title.innerText = '{{ site.data.locales[lang].login.login }}';
169
- loginBtn.value = '{{ site.data.locales[lang].login.login }}';
170
- signUpBtn.innerText = '{{ site.data.locales[lang].login.go_to_register }}';
171
- document.getElementById('username').placeholder = '{{ site.data.locales[lang].login.username }}';
172
- document.getElementById('password').placeholder = '{{ site.data.locales[lang].login.password }}';
167
+ title.innerText = 'Login';
168
+ loginBtn.value = 'Login';
169
+ signUpBtn.innerText = 'Go to register';
170
+ document.getElementById('username').placeholder = 'Username';
171
+ document.getElementById('password').placeholder = 'Password';
173
172
  document.getElementById('password').type = 'password';
174
173
  document.getElementById('email').style.display = 'none';
175
174
  }
@@ -203,11 +202,11 @@ layout: compress
203
202
  document.getElementById('loginBtn').addEventListener("click", function () {
204
203
  var username = document.getElementById('username').value.trim();
205
204
  var password = document.getElementById('password').value.trim();
206
- if (document.querySelector('.title').innerText == '{{ site.data.locales[lang].login.login }}') {
205
+ if (document.querySelector('.title').innerText == 'Login') {
207
206
  AV.User.logIn(username, password).then(function (user) {
208
207
  if (user.get("emailVerified")) {
209
208
  /* 登录成功 */
210
- console.log('Successfully logged in');
209
+ console.log('登录成功');
211
210
  console.log(AV.User.emailVerified);
212
211
  /* document.getElementById('username').value = '';
213
212
  document.getElementById('password').value = ''; */
@@ -217,23 +216,23 @@ layout: compress
217
216
  window.location.href = redirectUrl;
218
217
  /* window.location.href = '{{ site.baseurl }}'; */
219
218
  } else {
220
- alert('{{ site.data.locales[lang].login.email_not_verified }}');
219
+ alert('当前用户邮箱未通过验证,暂时无法登录');
221
220
  }
222
221
  }).catch(function (error) {
223
222
  /* 登录失败,处理错误信息 */
224
- console.log('Login failed:', error);
225
- alert('{{ site.data.locales[lang].login.login_fail }}');
223
+ console.log('登录失败:', error);
224
+ alert('登录失败!');
226
225
  });
227
226
  } else {
228
227
  var email = document.getElementById('email').value;
229
228
  if (!validateEmail(email)) {
230
- alert('{{ site.data.locales[lang].login.enter_vaild_email }}');
229
+ alert('请输入有效的电子邮件地址!');
231
230
  return;
232
231
  } else if (username == '') {
233
- alert('{{ site.data.locales[lang].login.enter_username }}');
232
+ alert('请输入用户名');
234
233
  return;
235
234
  } else if (password == '') {
236
- alert('{{ site.data.locales[lang].login.enter_password }}');
235
+ alert('请输入密码');
237
236
  return;
238
237
  } else {
239
238
  const user = new AV.User();
@@ -244,13 +243,13 @@ layout: compress
244
243
 
245
244
  user.signUp().then(function (user) {
246
245
  /* 注册成功 */
247
- alert('{{ site.data.locales[lang].login.waiting_for_verification }}');
246
+ alert('注册成功,等待验证邮箱。邮件已发送!');
248
247
  console.log('注册成功,等待验证邮箱');
249
248
  window.location.reload();
250
249
  }).catch(function (error) {
251
250
  /* 注册失败,处理错误信息 */
252
251
  console.log('注册失败:', error);
253
- alert('{{ site.data.locales[lang].login.register_fail }}');
252
+ alert('注册失败!');
254
253
  });
255
254
  }
256
255
  };
data/_layouts/post.html CHANGED
@@ -137,15 +137,3 @@ tail_includes:
137
137
  </div>
138
138
  <!-- div.post-tail-wrapper -->
139
139
  </article>
140
-
141
- {% if site.valine_comment.enable and page.comments %}
142
- <div class="row">
143
- <div class="col-12">
144
- <div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
145
-
146
- {% include valine.html %}
147
-
148
- </div> <!-- .pl-1 pr-1 -->
149
- </div> <!-- .col-12 -->
150
- </div> <!-- .row -->
151
- {% endif %}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-chirpy-customized-upe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Cruise