feat(artalk): 增强评论系统功能与多语言支持

- 引入 Artalk 多语言包支持中英文切换
- 配置评论区域支持多语言提示与界面文本
- 优化编辑器功能,启用 Markdown、表情、@提醒等
- 改进评论时间显示逻辑,支持相对时间与本地化格式
- 添加管理员评论徽章标识
- 增强暗色模式与移动端适配样式
- 优化 CSS 样式,包括链接、输入框、工具栏等视觉效果
- 完善 Artalk 实例销毁逻辑,提升稳定性
- 移除旧版语言更新方法,统一通过配置管理
- 删除冗余 Avatar 样式以简化维护
This commit is contained in:
hehh
2025-11-25 13:21:48 +08:00
parent 24e0aae3f3
commit f2644b4fe6
3 changed files with 124 additions and 59 deletions

View File

@@ -124,7 +124,6 @@
transform: translateY(0) !important;
}
/* 修改发送按钮默认显示为"发送" */
.atk-send-btn:before {
content: "发送" !important;
}
@@ -173,12 +172,6 @@
border-bottom: 1px solid rgba(108, 92, 231, 0.2) !important;
}
.atk-avatar {
border-radius: 50% !important;
box-shadow: 0 0 10px rgba(108, 92, 231, 0.2) !important;
transition: all 0.3s ease;
object-fit: cover; /* 修复头像拉伸问题 */
}
.atk-comment .atk-header {
padding: 0 !important;
@@ -336,11 +329,6 @@
color: #00cec9 !important;
}
[data-theme="night"] .atk-avatar {
border: 2px solid #00cec9 !important;
box-shadow: 0 0 10px rgba(0, 206, 201, 0.3) !important;
}
/* Mobile specific styles */
.atk-mobile .atk-main-editor {
border-radius: 16px !important;
@@ -514,6 +502,33 @@
color: #ef4444 !important;
}
/* 评论内容链接样式 */
.atk-comment-content a {
color: #3498db;
text-decoration: underline;
}
.atk-comment-content a:hover {
color: #2980b9;
}
/* 更圆润的输入框 */
.atk-editor-wrap .atk-editor-textarea {
border-radius: 12px !important;
padding: 12px !important;
}
/* 工具栏图标间距优化 */
.atk-editor-toolbar .atk-btn {
margin: 2px !important;
}
/* 暗色模式下聚焦边框 */
.atk-dark .atk-editor-textarea:focus {
box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5) !important;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.atk-header {