feat(comments): 匿名评论 + 表情最近使用;fix: 自动填充聚焦提示 & 邮件模板回退原版 & 返回顶部改 CSS 动画
- 匿名评论:comments.is_anonymous 列;对外昵称/头像/网址/徽标/等级/IP归属全部脱敏, 真实身份留 users 表(回复通知照发、autofill 不受污染);邮件昵称也用「匿名」防泄露 - 表情包最近使用:面板顶部「最近」栏,localStorage 记录 8 个,零侵入复用 Artalk 插入逻辑 - 匿名开关插在 textarea 与底栏之间独立一行,不挤移动端底栏 - 自动填充:提示改 focusin 触发(原 input+sessionStorage 一次性门导致永不触发); 已填昵称/网址时不覆盖并弹提示 - 邮件模板 UI 回退原版深色气泡设计,保留表情内联尺寸/主题文案等逻辑修复 - 返回顶部:rAF 自绘改 CSS scroll-behavior(滚动期临时挂类),修移动端掉帧
This commit is contained in:
1 parent
090262d278
commit
215929a67f
11 files changed
+587
-207
No files matched your search
@@ -4201,6 +4201,100 @@ input[type=submit] {
|
||||
}
|
||||
|
||||
/* Back to Top Button */
|
||||
/* 匿名评论开关:插在 textarea 与底栏之间的独立一行(右对齐),不挤底栏 */
|
||||
.atk-anon-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 5px;
|
||||
padding: 0 10px 6px;
|
||||
font-size: 12px;
|
||||
color: #9b9b9b;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
.atk-anon-toggle input {
|
||||
margin: 0;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
cursor: pointer;
|
||||
accent-color: #373737;
|
||||
}
|
||||
.atk-anon-toggle:hover {
|
||||
color: #555;
|
||||
}
|
||||
[data-theme="dark"] .atk-anon-toggle {
|
||||
color: #8a8f98;
|
||||
}
|
||||
[data-theme="dark"] .atk-anon-toggle:hover {
|
||||
color: #c3c7cd;
|
||||
}
|
||||
[data-theme="dark"] .atk-anon-toggle input {
|
||||
accent-color: #d1d5db;
|
||||
}
|
||||
|
||||
/* 表情面板「最近使用」栏:面板顶部横向一行,移动端可横滑 */
|
||||
.atk-recent-emoticons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 2px;
|
||||
border-bottom: 1px dashed rgba(128, 128, 128, 0.28);
|
||||
overflow-x: auto;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
.atk-recent-emoticons .atk-recent-label {
|
||||
flex: none;
|
||||
font-size: 12px;
|
||||
color: #9b9b9b;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.atk-recent-emoticons ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.atk-recent-emoticons li {
|
||||
flex: none;
|
||||
display: flex;
|
||||
}
|
||||
.atk-recent-emoticons img {
|
||||
max-height: 32px;
|
||||
width: auto;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
padding: 2px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.atk-recent-emoticons img:hover {
|
||||
background: rgba(128, 128, 128, 0.16);
|
||||
}
|
||||
[data-theme="dark"] .atk-recent-emoticons {
|
||||
border-bottom-color: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
[data-theme="dark"] .atk-recent-emoticons .atk-recent-label {
|
||||
color: #8a8f98;
|
||||
}
|
||||
[data-theme="dark"] .atk-recent-emoticons img:hover {
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
/* CSS 平滑滚动:只在程序触发的滚动期间由 JS 挂到 <html> 上,滚完即摘。
|
||||
滚动交给浏览器合成器处理,不占 JS 主线程 —— 移动端不再像 rAF 自绘那样掉帧。 */
|
||||
html.css-smooth-scroll {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
html.css-smooth-scroll {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
}
|
||||
|
||||
#back-to-top {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
|
||||
Reference in new issue
Block a user