feat(comments): 人机验证改点按式 + 分割线可配置 + 投票契约修复
- 人机验证抽成 human.js 模块,改成 Cloudflare Turnstile 风格的「点一下验证」, 控件移到「评论一下」发送按钮左侧(不再用图形验证码那一套) - 留言页 / 文章页两段内联脚本(友链弹窗、人机验证)抽成模块随 page-only.js 加载。 原先内联 <script> 写在 #pjax-container 外,PJAX 只换容器内容不重新执行它, 从首页 PJAX 进留言页会出现「申请友链卡片点了没反应」「没有人机验证控件」 - 友链申请弹窗 #flApplyBox 隐藏滚动条(内容仍可滚,避开细滚动条 + 毛玻璃的割裂感) - 内容分割线抽成 partial divider.html,hugo.toml [params.divider] 可切 icon(原生 uk-divider-icon)/ image(本地图片),当前用 icon - 投票契约修复(后端 blog-admin):Artalk 客户端把方向编在 target_name 后缀 (comment_up / comment_down / page_up / page_down)、路径只有两段, 而原先只注册了三段 :choice 路由 → 点赞/踩一路 404、界面点了没反应。 补 POST /votes/:target_name/:target_id,新增 parseVoteTarget() 同时兼容两套契约 (名字里与路径里方向矛盾时判非法,不静默取其一),错误文案改用实体名 - 无身份点赞不再静默失败:artalk.js 加 __atkVoteGuard, 未填昵称/邮箱时拦截并提示「填写昵称和邮箱后才能点赞」, 同时把光标送到昵称框(多个同名输入框逐个试,以 focus 真生效为判据)
This commit is contained in:
1 parent
50a906e07c
commit
e0c5ac5739
12 files changed
+513
-274
No files matched your search
@@ -172,6 +172,42 @@ hr {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* ── 内容分割线:图片样式(由 hugo.toml 的 [params.divider].style 切换) ── */
|
||||
.post-divider-image {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 1.6rem 0;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.post-divider-image img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
/* --divider-max-h 仅作保护上限:正常内容宽度下高度远达不到,
|
||||
不会触发收缩,图片始终铺满整行 */
|
||||
max-height: var(--divider-max-h, 140px);
|
||||
object-fit: contain;
|
||||
opacity: 0.92;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.post-divider-image img:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
.post-divider-image {
|
||||
margin: 1.2rem 0;
|
||||
}
|
||||
|
||||
.post-divider-image img {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
[data-theme="dark"] hr {
|
||||
border-top-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user