fix(homepage): 修复个人主页样式和功能问题

修复个人主页的响应式布局问题,优化移动端显示效果
调整分类和排序区域的样式,移除不必要的margin-left
更新投票组件的内容显示类名为one-line-display-v2
修复主页加载逻辑,优化数据获取和分页处理
移除未使用的代码和注释,清理CSS样式
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-12-26 18:50:05 +08:00
parent 82e67b2a0b
commit ea6ae8d7fc
17 changed files with 1033 additions and 453 deletions

View File

@@ -279,6 +279,26 @@ const editApp = createApp({
language: LANG === "en" ? "en" : "zh_CN",
language_url: LANG === "en" ? undefined : "/js/tinymce/langs/zh_CN.js",
plugins: "image media table link lists code charmap emoticons wordcount fullscreen preview searchreplace autolink directionality visualblocks visualchars template codesample",
paste_preprocess: (plugin, args) => {
if (!args.content.match(/<\/?(p|div|h[1-6]|ul|ol|table|blockquote|pre)[^>]*>/i)) {
const fragments = args.content.split(/<br\s*\/?>/gi);
const newContent = fragments
.map((frag) => {
// 移除 &nbsp; 和空白后检查是否有内容
// 保留图片等 HTML 标签,只过滤纯空白行
if (frag.replace(/&nbsp;/gi, "").trim().length > 0) {
return "<p>" + frag + "</p>";
}
return null;
})
.filter(Boolean)
.join("");
if (newContent) {
args.content = newContent;
}
}
},
toolbar: "undo redo | blocks | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media | removeformat | emoticons | fullscreen",
menubar: false,
fixed_toolbar_container: "#editor-toolbar",