Vanessa 2025-12-10 12:14:34 +08:00
parent 77aff4b1d0
commit 01c2476537
6 changed files with 21 additions and 15 deletions

View file

@ -185,6 +185,9 @@
--b3-pdf-dark: #212224;
/* callout */
--b3-callout-note: var(--b3-theme-primary);
--b3-callout-tip: var(--b3-theme-success);
--b3-callout-caution: var(--b3-theme-error);
--b3-callout-important: var(--b3-protyle-inline-blockref-color);
--b3-callout-warning: var(--b3-protyle-inline-mark-background);

View file

@ -184,6 +184,9 @@
--b3-pdf-dark: #212224;
/* callout */
--b3-callout-note: var(--b3-theme-primary);
--b3-callout-tip: var(--b3-theme-success);
--b3-callout-caution: var(--b3-theme-error);
--b3-callout-important: var(--b3-protyle-inline-blockref-color);
--b3-callout-warning: var(--b3-protyle-inline-mark-background);

View file

@ -163,11 +163,11 @@
// NOTE
&::before {
background-color: var(--b3-theme-primary);
background-color: var(--b3-callout-note);
}
.callout-info {
color: var(--b3-theme-primary);
color: var(--b3-callout-note);
}
&[data-subtype="WARNING"] {
@ -182,11 +182,11 @@
&[data-subtype="TIP"] {
&::before {
background-color: var(--b3-theme-success);
background-color: var(--b3-callout-tip);
}
.callout-info {
color: var(--b3-theme-success);
color: var(--b3-callout-tip);
}
}
@ -202,11 +202,11 @@
&[data-subtype="CAUTION"] {
&::before {
background-color: var(--b3-theme-error);
background-color: var(--b3-callout-caution);
}
.callout-info {
color: var(--b3-theme-error);
color: var(--b3-callout-caution);
}
}

View file

@ -250,11 +250,11 @@ const renderSlashMenu = (protyle: IProtyle, toolbarElement: Element) => {
${getSlashItem("1. " + Lute.Caret, "iconOrderedList", window.siyuan.languages["ordered-list"], "true")}
${getSlashItem("- [ ] " + Lute.Caret, "iconCheck", window.siyuan.languages.check, "true")}
${getSlashItem("> " + Lute.Caret, "iconQuote", window.siyuan.languages.quote, "true")}
${getSlashItem(`> [!NOTE]\n> ${Lute.Caret}`, '<span class="keyboard__slash-icon">✏️</span>', `${window.siyuan.languages.callout} - <span style="color: var(--b3-theme-primary)">Note</span>`, "true")}
${getSlashItem(`> [!TIP]\n> ${Lute.Caret}`, '<span class="keyboard__slash-icon">💡</span>', `${window.siyuan.languages.callout} - <span style="color: var(--b3-theme-success)">Tip</span>`, "true")}
${getSlashItem(`> [!NOTE]\n> ${Lute.Caret}`, '<span class="keyboard__slash-icon">✏️</span>', `${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-note)">Note</span>`, "true")}
${getSlashItem(`> [!TIP]\n> ${Lute.Caret}`, '<span class="keyboard__slash-icon">💡</span>', `${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-tip)">Tip</span>`, "true")}
${getSlashItem(`> [!IMPORTANT]\n> ${Lute.Caret}`, '<span class="keyboard__slash-icon">❗</span>', `${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-important)">Important</span>`, "true")}
${getSlashItem(`> [!WARNING]\n> ${Lute.Caret}`, '<span class="keyboard__slash-icon">⚠️</span>', `${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-warning)">Warning</span>`, "true")}
${getSlashItem(`> [!CAUTION]\n> ${Lute.Caret}`, '<span class="keyboard__slash-icon">🚨</span>', `${window.siyuan.languages.callout} - <span style="color: var(--b3-theme-error)">Caution</span>`, "true")}
${getSlashItem(`> [!CAUTION]\n> ${Lute.Caret}`, '<span class="keyboard__slash-icon">🚨</span>', `${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-caution)">Caution</span>`, "true")}
${getSlashItem("```", "iconCode", window.siyuan.languages.code, "true")}
${getSlashItem(`| ${Lute.Caret} | | |\n| --- | --- | --- |\n| | | |\n| | | |`, "iconTable", window.siyuan.languages.table, "true")}
${getSlashItem("---", "iconLine", window.siyuan.languages.line, "true")}

View file

@ -134,12 +134,12 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
filter: [window.siyuan.languages.callout, "callout", "ts", "提示", "tishi", "note"],
id: "calloutNote",
value: `> [!NOTE]\n> ${Lute.Caret}`,
html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">✏️</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-theme-primary)">Note</span></span></div>`,
html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">✏️</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-note)">Note</span></span></div>`,
},{
filter: [window.siyuan.languages.callout, "callout", "ts", "提示", "tishi", "tip"],
id: "calloutTip",
value: `> [!TIP]\n> ${Lute.Caret}`,
html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">💡</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-theme-success)">Tip</span></span></div>`,
html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">💡</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-tip)">Tip</span></span></div>`,
},{
filter: [window.siyuan.languages.callout, "callout", "ts", "提示", "tishi", "important"],
id: "calloutImportant",
@ -154,7 +154,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
filter: [window.siyuan.languages.callout, "callout", "ts", "提示", "tishi", "caution"],
id: "calloutCaution",
value: `> [!CAUTION]\n> ${Lute.Caret}`,
html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">🚨</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-theme-error)">Caution</span></span></div>`,
html: `<div class="b3-list-item__first"><span class="b3-list-item__graphic">🚨</span><span class="b3-list-item__text">${window.siyuan.languages.callout} - <span style="color: var(--b3-callout-caution)">Caution</span></span></div>`,
}, {
filter: [window.siyuan.languages.code, "code block", "代码块", "daimakuai", "dmk"],
id: "code",

View file

@ -85,15 +85,15 @@ export const updateCalloutType = (titleElement: HTMLElement, protyle: IProtyle)
return;
}
[{
icon: "✏️", type: "Note", color: "var(--b3-theme-primary)"
icon: "✏️", type: "Note", color: "var(--b3-callout-note)"
}, {
icon: "💡", type: "Tip", color: "var(--b3-theme-success)"
icon: "💡", type: "Tip", color: "var(--b3-callout-tip)"
}, {
icon: "❗", type: "Important", color: "var(--b3-callout-important)"
}, {
icon: "⚠️", type: "Warning", color: "var(--b3-callout-warning)"
}, {
icon: "🚨", type: "Caution", color: "var(--b3-theme-error)"
icon: "🚨", type: "Caution", color: "var(--b3-callout-caution)"
}].forEach((item) => {
menu.addItem({
iconHTML: `<span class="b3-menu__icon">${item.icon.toUpperCase()}</span>`,