[FIX] extensions: icon_role fa icons
closes odoo/documentation#9380
X-original-commit: d71c19b7be
Signed-off-by: Samuel Lieber (sali) <sali@odoo.com>
This commit is contained in:
parent
50d983d48d
commit
a7ef06c1e5
@ -121,6 +121,11 @@ def icon_role(name, rawtext, text, lineno, inliner, options=None, content=None):
|
|||||||
)
|
)
|
||||||
error_node = inliner.problematic(rawtext, rawtext, report_error)
|
error_node = inliner.problematic(rawtext, rawtext, report_error)
|
||||||
return [error_node], [report_error]
|
return [error_node], [report_error]
|
||||||
icon_html = f'<i class="oi {text}"></i>' if text.startswith('oi-') else f'<i class="{text}"></i>'
|
if text.startswith('oi-'):
|
||||||
|
icon_html = f'<i class="oi {text}"></i>'
|
||||||
|
elif text.startswith('fa-'):
|
||||||
|
icon_html = f'<i class="fa {text}"></i>'
|
||||||
|
else:
|
||||||
|
icon_html = f'<i class="{text}"></i>'
|
||||||
node = nodes.raw('', icon_html, format='html')
|
node = nodes.raw('', icon_html, format='html')
|
||||||
return [node], []
|
return [node], []
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
/* FONT PATH
|
/* FONT PATH
|
||||||
* -------------------------- */
|
* -------------------------- */
|
||||||
[class*="fa-"] {
|
.fa {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font: normal normal normal 14px/1 FontAwesome;
|
font: normal normal normal 14px/1 FontAwesome;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
|
Loading…
Reference in New Issue
Block a user