diff --git a/src/dragonglass/mparse.py b/src/dragonglass/mparse.py index b6177f8..eb07e86 100644 --- a/src/dragonglass/mparse.py +++ b/src/dragonglass/mparse.py @@ -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: diff --git a/src/dragonglass/style.py b/src/dragonglass/style.py index 30e42d6..d7dac41 100644 --- a/src/dragonglass/style.py +++ b/src/dragonglass/style.py @@ -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;