Comment 12 for bug 1416572

Revision history for this message
Bernd Bausch (berndbausch) wrote :

A simpler solution for the Font Awesome icons is three short lines in docs.js. The following seems to work:

    $('div.important > p.admonition-title').addClass('fa fa-info-circle');
    $('div.note > p.admonition-title').addClass('fa fa-check-circle');
    $('div.warning > p.admonition-title').addClass('fa fa-exclamation-triangle');

This way JSQuery adds the appropriate Font Awesome classes to an admonition-title paragraph inside an important, note and warning remark. We would still need a solution to add some space next to the icon; I don't know yet how to do that.

Given two very different solutions, which one is better? Assuming the additional space can be implemented as well, the JSQuery solution is simpler and easier to understand, and I believe that there is less dependency on Sphinx internals than in the case of the Sphinx extension.