update at 2025-10-16 14:24:10

This commit is contained in:
douboer
2025-10-16 14:24:10 +08:00
parent 5e1351408e
commit 9f3a4e8812
41 changed files with 2377 additions and 2363 deletions

View File

@@ -152,14 +152,14 @@ export class ArticleRender implements MDRendererCallback {
isOldTheme() {
const theme = this.assetsManager.getTheme(this.currentTheme);
if (theme) {
return theme.css.indexOf('.note-to-mp') < 0;
return theme.css.indexOf('.note2any') < 0;
}
return false;
}
setArticle(article: string) {
this.articleDiv.empty();
let className = 'note-to-mp';
let className = 'note2any';
// 兼容旧版本样式
if (this.isOldTheme()) {
className = this.currentTheme;
@@ -289,7 +289,7 @@ export class ArticleRender implements MDRendererCallback {
const theme = this.assetsManager.getTheme(this.currentTheme);
const highlight = this.assetsManager.getHighlight(this.currentHighlight);
const customCSS = this.settings.customCSSNote.length > 0 || this.settings.useCustomCss ? this.assetsManager.customCSS : '';
const baseCSS = this.settings.baseCSS ? `.note-to-mp {${this.settings.baseCSS}}` : '';
const baseCSS = this.settings.baseCSS ? `.note2any {${this.settings.baseCSS}}` : '';
return `${InlineCSS}\n\n${highlight!.css}\n\n${theme!.css}\n\n${baseCSS}\n\n${customCSS}`;
} catch (error) {
console.error(error);