v1.8 — 细节优化
- 首页文案更新为'自白者的栖息地' - 近笺 12 条 + 查看全部链接 - 笺文详情页加浏览量 - 登录弹窗替代 alert - 评论区修复双重 border-top - 退出登录带回跳 - 时间格式统一到秒 - 文案优化
This commit is contained in:
+12
-3
@@ -68,10 +68,19 @@ if (post_password_required()) return;
|
||||
<script>
|
||||
document.getElementById('commentform-guest').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
if (confirm('请先登录')) {
|
||||
window.location.href = '/wp-login.php';
|
||||
}
|
||||
showLoginModal();
|
||||
});
|
||||
function showLoginModal() {
|
||||
var m = document.getElementById('login-modal');
|
||||
if (m) m.classList.add('active');
|
||||
}
|
||||
function closeLoginModal() {
|
||||
var m = document.getElementById('login-modal');
|
||||
if (m) m.classList.remove('active');
|
||||
}
|
||||
function goLogin() {
|
||||
window.location.href = '/wp-login.php?redirect_to=' + encodeURIComponent(window.location.href);
|
||||
}
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user