support title-only callouts correctly and add more styles for content
This commit is contained in:
parent
743896b4b2
commit
1a92e7aa97
|
@ -892,8 +892,9 @@ class ObsidianStyleBlockquotes(Extension):
|
||||||
# TODO: add title icon here
|
# TODO: add title icon here
|
||||||
inner_title_div = etree.SubElement(title_div, 'div', {'class': 'callout-title-inner'})
|
inner_title_div = etree.SubElement(title_div, 'div', {'class': 'callout-title-inner'})
|
||||||
inner_title_div.text = title
|
inner_title_div.text = title
|
||||||
content_div = etree.SubElement(base_div, 'div', {'class': 'callout-content'})
|
|
||||||
lines.pop(0)
|
lines.pop(0)
|
||||||
|
if len(lines) > 0:
|
||||||
|
content_div = etree.SubElement(base_div, 'div', {'class': 'callout-content'})
|
||||||
first = True
|
first = True
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if first:
|
if first:
|
||||||
|
|
|
@ -80,12 +80,17 @@ th {
|
||||||
color: rgb(var(--callout-color));
|
color: rgb(var(--callout-color));
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
}
|
||||||
.callout-title-inner {
|
.callout-title-inner {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
.callout-content {
|
||||||
|
margin-top: 1em;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
/* Following are styles generated by Pygments "tango" style */
|
/* Following are styles generated by Pygments "tango" style */
|
||||||
pre { line-height: 125%; }
|
pre { line-height: 125%; }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user