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 +4 -4
- data/README.md +59 -57
- data/_includes/login-check.html +0 -54
- data/_includes/sidebar.html +12 -13
- data/_includes/valine.html +15 -15
- data/_layouts/categories.html +1 -1
- data/_layouts/category.html +1 -1
- data/_layouts/default.html +0 -2
- data/_layouts/forgot.html +6 -8
- data/_layouts/login.html +28 -29
- data/_layouts/post.html +0 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d11cfa94e88b60b009f85a8c72729e9f007ab43ff6349913697f8586d735e17
|
4
|
+
data.tar.gz: 2debc999f79e8595f13ab21be3947c1ecbdd9aa61a54ca96e3b7400291e14912
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afba89fcd48cefcb313d9eff2acf89149846235bdd15ef69741956eb411a12dc8531de3aeb79208dea7e2fe1697506b2deb3e37299b0bc6641788c1b7eae0ae4
|
7
|
+
data.tar.gz: 6021389bae4fcbfe3d2c8248fe00dac0e582b7ebc06796349f3604d5cb48deec8bd679c39ded6b7544475c2a6efcc4c8c04fe8af691bc0e7d651dd6e840687bc
|
data/README.md
CHANGED
@@ -1,81 +1,83 @@
|
|
1
|
-
|
1
|
+
# Unpublished Posts Enhancement for Chirpy Theme
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy)][gem]
|
4
|
+
[![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit]
|
4
5
|
|
5
|
-
|
6
|
+
*Derived from Chirpy theme*
|
6
7
|
|
7
|
-
|
8
|
-
[![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg?branch=master&event=push)][ci]
|
9
|
-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)][codacy]
|
10
|
-
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)][license]
|
11
|
-
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
|
8
|
+
## Installation
|
12
9
|
|
13
|
-
|
10
|
+
### Creating a New URL
|
14
11
|
|
15
|
-
|
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
|
-
|
14
|
+
### Installing Dependencies
|
18
15
|
|
19
|
-
|
16
|
+
Before running local server for the first time, go to the root directory of your site and run:
|
20
17
|
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
##
|
22
|
+
## Usage
|
41
23
|
|
42
|
-
|
24
|
+
You may want to preview the site contents before publishing, so just run it by:
|
43
25
|
|
44
|
-
|
26
|
+
```console
|
27
|
+
$ bundle exec jekyll s
|
28
|
+
```
|
45
29
|
|
46
|
-
|
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
|
-
##
|
32
|
+
## Deployment
|
51
33
|
|
52
|
-
|
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
|
-
|
36
|
+
Now you can choose _ONE_ of the following methods to deploy your Jekyll site.
|
55
37
|
|
56
|
-
|
57
|
-
<sub> —— Made with [contrib.rocks](https://contrib.rocks)</sub>
|
38
|
+
### Deploy by Using GitHub Actions
|
58
39
|
|
59
|
-
|
40
|
+
There are a few things to get ready for.
|
60
41
|
|
61
|
-
|
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
|
76
|
+
This work is published under [MIT][mit] License.
|
68
77
|
|
69
78
|
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
|
70
|
-
[
|
71
|
-
[
|
72
|
-
[
|
73
|
-
[
|
74
|
-
[
|
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
|
data/_includes/login-check.html
CHANGED
@@ -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>
|
data/_includes/sidebar.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
display: none;
|
5
5
|
justify-content: center;
|
6
6
|
align-items: center;
|
7
|
-
position:
|
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"
|
78
|
-
<input type="url" name="avatar" placeholder="
|
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"
|
83
|
-
<input type="text" name="nickname" maxlength="15" placeholder="
|
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="
|
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="
|
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-
|
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)"
|
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>
|
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("
|
248
|
+
alert("Save Successfully!");
|
250
249
|
window.location.reload();
|
251
250
|
}
|
252
251
|
}).catch((error) => {
|
data/_includes/valine.html
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{% if site.valine_comment.enable %}
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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 %}
|
data/_layouts/categories.html
CHANGED
data/_layouts/category.html
CHANGED
data/_layouts/default.html
CHANGED
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">
|
131
|
-
<input type="email" id="email" placeholder="
|
132
|
-
<input type="submit" value="
|
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('
|
151
|
+
alert('The email is missing, please enter your email address.');
|
154
152
|
}
|
155
153
|
else if (error.code == '205') {
|
156
|
-
alert('
|
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">
|
139
|
-
<input type="text" id="username" placeholder="
|
140
|
-
<input type="password" id="password" placeholder="
|
141
|
-
<input type="email" id="email" placeholder="
|
142
|
-
<input type="submit" value="
|
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
|
-
|
144
|
+
<button id="signUp">Go to Register</button>
|
146
145
|
{% endif %}
|
147
|
-
<button id="forgotPassword">
|
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 == '
|
158
|
-
title.innerText = '
|
159
|
-
loginBtn.value = '
|
160
|
-
signUpBtn.innerText = '
|
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 = '
|
164
|
-
document.getElementById('password').placeholder = '
|
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 = '
|
169
|
-
loginBtn.value = '
|
170
|
-
signUpBtn.innerText = '
|
171
|
-
document.getElementById('username').placeholder = '
|
172
|
-
document.getElementById('password').placeholder = '
|
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 == '
|
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('
|
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('
|
219
|
+
alert('当前用户邮箱未通过验证,暂时无法登录');
|
221
220
|
}
|
222
221
|
}).catch(function (error) {
|
223
222
|
/* 登录失败,处理错误信息 */
|
224
|
-
console.log('
|
225
|
-
alert('
|
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('
|
229
|
+
alert('请输入有效的电子邮件地址!');
|
231
230
|
return;
|
232
231
|
} else if (username == '') {
|
233
|
-
alert('
|
232
|
+
alert('请输入用户名');
|
234
233
|
return;
|
235
234
|
} else if (password == '') {
|
236
|
-
alert('
|
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('
|
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('
|
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 %}
|