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
@@ -41,12 +41,12 @@
|
||||
'#flSubmit:hover{filter:brightness(1.06)}' +
|
||||
'#flSubmit:disabled{opacity:.6;cursor:default}' +
|
||||
/* 弹窗滚动条:细一点、跟随主题,别用系统那根粗滚动条 */
|
||||
'#flApplyBox{overflow-x:hidden;scrollbar-width:thin;scrollbar-color:rgba(140,150,160,.45) transparent}' +
|
||||
'#flApplyBox::-webkit-scrollbar{width:6px;height:6px}' +
|
||||
/* 完全隐藏滚动条(内容仍可滚):细滚动条在内层圆角 + 毛玻璃上很割裂。
|
||||
三条都写:Firefox(scrollbar-width)、IE/Edge(-ms-)、Webkit(伪元素)。 */
|
||||
'#flApplyBox{overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}' +
|
||||
'#flApplyBox::-webkit-scrollbar{width:0;height:0;display:none}' +
|
||||
'#flApplyBox::-webkit-scrollbar-track{background:transparent}' +
|
||||
'#flApplyBox::-webkit-scrollbar-thumb{background:rgba(140,150,160,.45);border-radius:3px}' +
|
||||
'[data-theme="dark"] #flApplyBox{scrollbar-color:rgba(200,205,212,.35) transparent}' +
|
||||
'[data-theme="dark"] #flApplyBox::-webkit-scrollbar-thumb{background:rgba(200,205,212,.35)}';
|
||||
'#flApplyBox::-webkit-scrollbar-thumb{background:transparent}';
|
||||
document.head.appendChild(style);
|
||||
|
||||
mask = document.createElement('div');
|
||||
|
||||
Reference in new issue
Block a user