jekyll-theme-chirpy-customized-upe 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/locales/en.yml +1 -1
- data/_includes/sidebar.html +18 -19
- data/_layouts/login.html +31 -29
- data/assets/.DS_Store +0 -0
- 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: 1e0dc23b2fe524a2db5922ee4869869114ec124aa177e27ab12c0c804f6f4c52
|
4
|
+
data.tar.gz: 331ea998bb79689549b6ac877b1d6eefc92c5bd96f1b999e961ed574dabc94ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54aaa1e057fd8873f22bafcedcdf08924749fb9e12df1138cad56098115acea3ed318461701366b783fca2dd032a3cbdca749b9bf5d90a89e54428961a465330
|
7
|
+
data.tar.gz: 6ae90ec23d6f2b6e20ce84daba5d92a85e57c293825c2a49196b3b6c3e3211b987d3c998e15fefbba7cc219060c7e13651693e59b06873899a483d5a1b9d40f0
|
data/_data/locales/en.yml
CHANGED
@@ -89,7 +89,7 @@ login:
|
|
89
89
|
waiting_for_verification: Registration successful, waiting for email verification. Message has been sent!
|
90
90
|
register: Register
|
91
91
|
register_fail: Register failed!
|
92
|
-
email_not_verified: The current user's email has not been verified and cannot be logged in temporarily.
|
92
|
+
email_not_verified: The current user\'s email has not been verified and cannot be logged in temporarily.
|
93
93
|
logout: Logout
|
94
94
|
forgot: Forgot
|
95
95
|
forgot_prompt: Enter your registered email address
|
data/_includes/sidebar.html
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
display: none;
|
5
5
|
justify-content: center;
|
6
6
|
align-items: center;
|
7
|
-
position:
|
7
|
+
position: fixed;
|
8
|
+
max-width: 400px;
|
8
9
|
top: 50%;
|
9
10
|
left: 50%;
|
10
11
|
transform: translate(-50%, -50%);
|
@@ -23,7 +24,7 @@
|
|
23
24
|
transform: translate(-50%, -50%);
|
24
25
|
}
|
25
26
|
}
|
26
|
-
|
27
|
+
|
27
28
|
.form-changeInfo input[type="text"],
|
28
29
|
input[type="url"]
|
29
30
|
{
|
@@ -45,10 +46,8 @@
|
|
45
46
|
}
|
46
47
|
.form-buttons {
|
47
48
|
display: flex;
|
48
|
-
justify-content: space-
|
49
|
-
|
50
|
-
.form-submit {
|
51
|
-
margin: 0 20px;
|
49
|
+
justify-content: space-between;
|
50
|
+
gap: 40px;
|
52
51
|
}
|
53
52
|
.submitChange
|
54
53
|
{
|
@@ -56,9 +55,7 @@
|
|
56
55
|
color: #fff;
|
57
56
|
border-radius: 5px;
|
58
57
|
border: transparent;
|
59
|
-
|
60
|
-
.form-cancel {
|
61
|
-
margin: 0 20px;
|
58
|
+
width: 80px;
|
62
59
|
}
|
63
60
|
.cancelChange
|
64
61
|
{
|
@@ -66,28 +63,30 @@
|
|
66
63
|
color: #fff;
|
67
64
|
border-radius: 5px;
|
68
65
|
border: transparent;
|
66
|
+
width: 80px;
|
69
67
|
}
|
70
68
|
</style>
|
71
69
|
|
70
|
+
{% include lang.html %}
|
72
71
|
<div id = "InfoForm">
|
73
72
|
<div class = "info">
|
74
73
|
<form target="_self" class="form-changeInfo">
|
75
74
|
<div class="form-avatar">
|
76
|
-
<label for="avatar"
|
77
|
-
<input type="url" name="avatar" placeholder="
|
75
|
+
<label for="avatar">{{ site.data.locales[lang].sidebar.new_avatar }}</label>
|
76
|
+
<input type="url" name="avatar" placeholder="{{ site.data.locales[lang].sidebar.optional }}" id="newAvatar" onblur="formValidate.checkAvatar()"/>
|
78
77
|
<span class="validatemsg" id="isAvatarValid"></span>
|
79
78
|
</div>
|
80
79
|
<div class="form-nickname">
|
81
|
-
<label for="nickname"
|
82
|
-
<input type="text" name="nickname" maxlength="15" placeholder="
|
80
|
+
<label for="nickname">{{ site.data.locales[lang].sidebar.new_nickname }}</label>
|
81
|
+
<input type="text" name="nickname" maxlength="15" placeholder="{{ site.data.locales[lang].sidebar.optional }}" id="newNickname" onblur="formValidate.checkNickname()"/>
|
83
82
|
<span class="validatemsg" id="isNicknameValid"></span>
|
84
83
|
</div>
|
85
84
|
<div class="form-buttons">
|
86
85
|
<div class="form-submit">
|
87
|
-
<input type="button" class="submitChange" value="
|
86
|
+
<input type="button" class="submitChange" value="{{ site.data.locales[lang].sidebar.submit }}" onclick="updateUserInfo()"/>
|
88
87
|
</div>
|
89
88
|
<div class="form-cancel">
|
90
|
-
<input type="button" class="cancelChange" value="
|
89
|
+
<input type="button" class="cancelChange" value="{{ site.data.locales[lang].sidebar.cancel }}"/>
|
91
90
|
</div>
|
92
91
|
</div>
|
93
92
|
</form>
|
@@ -120,7 +119,7 @@
|
|
120
119
|
<!-- home -->
|
121
120
|
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
|
122
121
|
<a href="{{ '/' | relative_url }}" class="nav-link">
|
123
|
-
<i class="fa-fw fas fa-
|
122
|
+
<i class="fa-fw fas fa-eye-slash"></i>
|
124
123
|
<span>{{ site.data.locales[include.lang].tabs.home | upcase }}</span>
|
125
124
|
</a>
|
126
125
|
</li>
|
@@ -190,7 +189,7 @@
|
|
190
189
|
</a>
|
191
190
|
{% endif %}
|
192
191
|
{% endfor %}
|
193
|
-
<a href="javascript:void(0);" onclick="AV.User.logOut();setTimeout(function() { window.location.reload(); }, 1000)">
|
192
|
+
<a href="javascript:void(0);" onclick="AV.User.logOut();setTimeout(function() { window.location.reload(); }, 1000)" title="{{ site.data.locales[lang].login.logout }}">
|
194
193
|
<i class="fas fa-right-from-bracket" style="color: rgb(181, 27, 27);"></i>
|
195
194
|
</a>
|
196
195
|
</div>
|
@@ -221,7 +220,7 @@
|
|
221
220
|
document.getElementById('isAvatarValid').style.color = 'green';
|
222
221
|
return true;
|
223
222
|
} else if (document.getElementById('newAvatar').value.trim() !='') {
|
224
|
-
document.getElementById('isAvatarValid').innerHTML = '<i class="fa-fw fas fa-xmark"></i>
|
223
|
+
document.getElementById('isAvatarValid').innerHTML = '<i class="fa-fw fas fa-xmark"></i>{{ site.data.locales[lang].sidebar.invalid_url }}';
|
225
224
|
document.getElementById('isAvatarValid').style.color = 'red';
|
226
225
|
} else {
|
227
226
|
document.getElementById('isAvatarValid').innerHTML = '';
|
@@ -245,7 +244,7 @@
|
|
245
244
|
currentUser.save().then((user) => {
|
246
245
|
console.log('保存成功!');
|
247
246
|
if (newAvatar != '' || newNickname != '') {
|
248
|
-
alert("
|
247
|
+
alert("{{ site.data.locales[lang].sidebar.save_success }}");
|
249
248
|
window.location.reload();
|
250
249
|
}
|
251
250
|
}).catch((error) => {
|
data/_layouts/login.html
CHANGED
@@ -133,17 +133,18 @@ layout: compress
|
|
133
133
|
</head>
|
134
134
|
|
135
135
|
<body>
|
136
|
+
{% include lang.html %}
|
136
137
|
<div class="shell">
|
137
|
-
<h2 class="title">
|
138
|
-
<input type="text" id="username" placeholder="
|
139
|
-
<input type="password" id="password" placeholder="
|
140
|
-
<input type="email" id="email" placeholder="
|
141
|
-
<input type="submit" value="
|
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">
|
142
143
|
<div class="footer">
|
143
144
|
{% if site.Leancloud.allowRegister %}
|
144
|
-
|
145
|
+
<button id="signUp">{{ site.data.locales[lang].login.go_to_register }}</button>
|
145
146
|
{% endif %}
|
146
|
-
<button id="forgotPassword">
|
147
|
+
<button id="forgotPassword">{{ site.data.locales[lang].login.forgot_password }}</button>
|
147
148
|
</div>
|
148
149
|
</div>
|
149
150
|
|
@@ -153,22 +154,22 @@ layout: compress
|
|
153
154
|
var title = document.querySelector('.title');
|
154
155
|
var loginBtn = document.getElementById('loginBtn');
|
155
156
|
var signUpBtn = document.getElementById('signUp');
|
156
|
-
if (title.innerText == '
|
157
|
-
title.innerText = '
|
158
|
-
loginBtn.value = '
|
159
|
-
signUpBtn.innerText = '
|
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 }}';
|
160
161
|
document.getElementById('username').value = '';
|
161
162
|
document.getElementById('password').value = '';
|
162
|
-
document.getElementById('username').placeholder = '
|
163
|
-
document.getElementById('password').placeholder = '
|
163
|
+
document.getElementById('username').placeholder = '{{ site.data.locales[lang].login.new_username }}';
|
164
|
+
document.getElementById('password').placeholder = '{{ site.data.locales[lang].login.new_password }}';
|
164
165
|
document.getElementById('password').type = 'password';
|
165
166
|
document.getElementById('email').style.display = 'block';
|
166
167
|
} else {
|
167
|
-
title.innerText = '
|
168
|
-
loginBtn.value = '
|
169
|
-
signUpBtn.innerText = '
|
170
|
-
document.getElementById('username').placeholder = '
|
171
|
-
document.getElementById('password').placeholder = '
|
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 }}';
|
172
173
|
document.getElementById('password').type = 'password';
|
173
174
|
document.getElementById('email').style.display = 'none';
|
174
175
|
}
|
@@ -202,11 +203,11 @@ layout: compress
|
|
202
203
|
document.getElementById('loginBtn').addEventListener("click", function () {
|
203
204
|
var username = document.getElementById('username').value.trim();
|
204
205
|
var password = document.getElementById('password').value.trim();
|
205
|
-
if (document.querySelector('.title').innerText == '
|
206
|
+
if (document.querySelector('.title').innerText == '{{ site.data.locales[lang].login.login }}') {
|
206
207
|
AV.User.logIn(username, password).then(function (user) {
|
207
208
|
if (user.get("emailVerified")) {
|
208
209
|
/* 登录成功 */
|
209
|
-
console.log('
|
210
|
+
console.log('Successfully logged in');
|
210
211
|
console.log(AV.User.emailVerified);
|
211
212
|
/* document.getElementById('username').value = '';
|
212
213
|
document.getElementById('password').value = ''; */
|
@@ -217,26 +218,27 @@ layout: compress
|
|
217
218
|
window.location.href = redirectUrl;
|
218
219
|
}
|
219
220
|
else {
|
220
|
-
window.location.href = '{{ site.
|
221
|
+
window.location.href = '{{ site.baseurl }}';
|
221
222
|
}
|
223
|
+
|
222
224
|
} else {
|
223
|
-
alert('
|
225
|
+
alert('{{ site.data.locales[lang].login.email_not_verified }}');
|
224
226
|
}
|
225
227
|
}).catch(function (error) {
|
226
228
|
/* 登录失败,处理错误信息 */
|
227
|
-
console.log('
|
228
|
-
alert('
|
229
|
+
console.log('Login failed:', error);
|
230
|
+
alert('{{ site.data.locales[lang].login.login_fail }}');
|
229
231
|
});
|
230
232
|
} else {
|
231
233
|
var email = document.getElementById('email').value;
|
232
234
|
if (!validateEmail(email)) {
|
233
|
-
alert('
|
235
|
+
alert('{{ site.data.locales[lang].login.enter_vaild_email }}');
|
234
236
|
return;
|
235
237
|
} else if (username == '') {
|
236
|
-
alert('
|
238
|
+
alert('{{ site.data.locales[lang].login.enter_username }}');
|
237
239
|
return;
|
238
240
|
} else if (password == '') {
|
239
|
-
alert('
|
241
|
+
alert('{{ site.data.locales[lang].login.enter_password }}');
|
240
242
|
return;
|
241
243
|
} else {
|
242
244
|
const user = new AV.User();
|
@@ -247,13 +249,13 @@ layout: compress
|
|
247
249
|
|
248
250
|
user.signUp().then(function (user) {
|
249
251
|
/* 注册成功 */
|
250
|
-
alert('
|
252
|
+
alert('{{ site.data.locales[lang].login.waiting_for_verification }}');
|
251
253
|
console.log('注册成功,等待验证邮箱');
|
252
254
|
window.location.reload();
|
253
255
|
}).catch(function (error) {
|
254
256
|
/* 注册失败,处理错误信息 */
|
255
257
|
console.log('注册失败:', error);
|
256
|
-
alert('
|
258
|
+
alert('{{ site.data.locales[lang].login.register_fail }}');
|
257
259
|
});
|
258
260
|
}
|
259
261
|
};
|
data/assets/.DS_Store
CHANGED
Binary file
|