mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 01:56:58 +08:00
REFACTOR: Replace some fa-*
uses with helpers
This commit is contained in:
@ -42,10 +42,11 @@ registerIconRenderer({
|
||||
name: 'font-awesome',
|
||||
|
||||
string(id, params) {
|
||||
let html = `<i class='${faClasses(id, params)}'`;
|
||||
let tagName = params.tagName || 'i';
|
||||
let html = `<${tagName} class='${faClasses(id, params)}'`;
|
||||
if (params.title) { html += ` title='${I18n.t(params.title)}'`; }
|
||||
if (params.label) { html += " aria-hidden='true'"; }
|
||||
html += "></i>";
|
||||
html += `></${tagName}>`;
|
||||
if (params.label) {
|
||||
html += "<span class='sr-only'>" + I18n.t(params.label) + "</span>";
|
||||
}
|
||||
|
Reference in New Issue
Block a user