mirror of
https://codeberg.org/Freedium-cfd/web.git
synced 2026-03-11 09:04:37 +00:00
feat: add drop cap styling for paragraphs with drop caps
This commit is contained in:
parent
7a43026e27
commit
ef14b587a6
1 changed files with 2 additions and 0 deletions
|
|
@ -405,6 +405,8 @@ class MediumParser:
|
|||
)
|
||||
elif paragraph["type"] == "P":
|
||||
css_class = ["leading-8"]
|
||||
if paragraph.get("hasDropCap", False):
|
||||
css_class.extend(["first-letter:text-7xl", "first-letter:float-left", "first-letter:mr-2", "first-letter:pt-2"])
|
||||
paragraph_template = jinja_env.from_string(
|
||||
'<p class="{{ css_class }}">{{ text }}</p>'
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue