[FIX] extensions: icon_role fa icons
closes odoo/documentation#9383
X-original-commit: d71c19b7be
Signed-off-by: Samuel Lieber (sali) <sali@odoo.com>
This commit is contained in:
parent
04b8762b51
commit
f0b25461c7
@ -121,6 +121,11 @@ def icon_role(name, rawtext, text, lineno, inliner, options=None, content=None):
|
||||
)
|
||||
error_node = inliner.problematic(rawtext, rawtext, 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')
|
||||
return [node], []
|
||||
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
/* FONT PATH
|
||||
* -------------------------- */
|
||||
[class*="fa-"] {
|
||||
.fa {
|
||||
display: inline-block;
|
||||
font: normal normal normal 14px/1 FontAwesome;
|
||||
font-size: inherit;
|
||||
|
Loading…
Reference in New Issue
Block a user