Skip to content

Commit 944fa13

Browse files
committed
Add polymath_css template tag
1 parent 3326314 commit 944fa13

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/wagtail_polymath/templatetags/wagtail_polymath.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,20 @@ def polymath_js():
2222
for js in get_polymath_config("js")
2323
],
2424
)
25+
26+
27+
@register.simple_tag
28+
def polymath_css():
29+
return format_html_join(
30+
"\n",
31+
"{0}",
32+
[
33+
(
34+
format_html(
35+
'<link rel="stylesheet" href="{}">',
36+
css,
37+
),
38+
)
39+
for css in get_polymath_config("css")
40+
],
41+
)

0 commit comments

Comments
 (0)