added all the default callout types to the stylesheet and icon list

This commit is contained in:
Amy G. Bowersox 2024-08-11 02:41:59 -06:00
parent aa431fe361
commit 375767a93c
2 changed files with 39 additions and 1 deletions

View File

@ -867,13 +867,30 @@ class ObsidianStyleBlockquotes(Extension):
CALLOUT = re.compile(r'^\[!([a-z]+)\]([-+])?(?:[ ]+(.*))?')
CALLOUT_DEFICON = 'pencil'
CALLOUT_ICONS = {
'abstract': 'clipboard-list',
'attention': 'triangle-alert',
'bug': 'bug',
'caution': 'triangle-alert',
'check': 'check',
'cite': 'quote',
'danger': 'zap',
'done': 'check',
'error': 'zap',
'example': 'list',
'fail': 'x',
'failure': 'x',
'faq': 'circle-help',
'help': 'circle-help',
'info': 'info',
'missing': 'x',
'question': 'circle-help',
'quote': 'quote',
'success': 'check',
'summary': 'clipboard-list',
'tip': 'flame',
'todo': 'circle-check'
'tldr': 'clipboard-list',
'todo': 'circle-check',
'warning': 'triangle-alert'
}
def normal_blockquote(self, parent: etree.Element, block: str) -> None:

View File

@ -63,21 +63,42 @@ th {
background-color: rgba(var(--callout-color), 0.1);
padding: 12px 12px 12px 24px;
}
.callout[data-callout="abstract"], .callout[data-callout="summary"], .callout[data-callout="tldr"] {
--callout-color: 0, 191, 188;
}
.callout[data-callout="bug"] {
--callout-color: 233, 49, 71;
}
.callout[data-callout="danger"], .callout[data-callout="error"] {
--callout-color: 233, 49, 71;
}
.callout[data-callout="example"] {
--callout-color: 120, 82, 238;
}
.callout[data-callout="failure"], .callout[data-callout="fail"], .callout[data-callout="missing"] {
--callout-color: 233, 49, 71;
}
.callout[data-callout="question"], .callout[data-callout="help"], .callout[data-callout="faq"] {
--callout-color: 236, 117, 0;
}
.callout[data-callout="info"] {
--callout-color: 8, 109, 221;
}
.callout[data-callout="quote"], .callout[data-callout="cite"] {
--callout-color: 158, 158, 158;
}
.callout[data-callout="success"], .callout[data-callout="check"], .callout[data-callout="done"] {
--callout-color: 8, 185, 78;
}
.callout[data-callout="tip"] {
--callout-color: 0, 191, 188;
}
.callout[data-callout="todo"] {
--callout-color: 8, 109, 221;
}
.callout[data-callout="warning"], .callout[data-callout="caution"], .callout[data-callout="attention"] {
--callout-color: 236, 117, 0;
}
.callout-title {
padding: 0;
display: flex;