From d71c19b7be8377deb55dab164f685516530a0c73 Mon Sep 17 00:00:00 2001 From: "Sam Lieber (sali)" Date: Wed, 8 May 2024 14:44:51 +0000 Subject: [PATCH] [FIX] extensions: icon_role fa icons closes odoo/documentation#9375 X-original-commit: 89f61f900e6776b722f529204131c80b38f9cc41 Signed-off-by: Samuel Lieber (sali) --- extensions/odoo_theme/__init__.py | 7 ++++++- extensions/odoo_theme/static/scss/_font_awesome.scss | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/extensions/odoo_theme/__init__.py b/extensions/odoo_theme/__init__.py index 49d40a001..94b102f40 100644 --- a/extensions/odoo_theme/__init__.py +++ b/extensions/odoo_theme/__init__.py @@ -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'' if text.startswith('oi-') else f'' + if text.startswith('oi-'): + icon_html = f'' + elif text.startswith('fa-'): + icon_html = f'' + else: + icon_html = f'' node = nodes.raw('', icon_html, format='html') return [node], [] diff --git a/extensions/odoo_theme/static/scss/_font_awesome.scss b/extensions/odoo_theme/static/scss/_font_awesome.scss index 529e8d999..47a35ed73 100644 --- a/extensions/odoo_theme/static/scss/_font_awesome.scss +++ b/extensions/odoo_theme/static/scss/_font_awesome.scss @@ -4,7 +4,7 @@ */ /* FONT PATH * -------------------------- */ -[class*="fa-"] { +.fa { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit;