Hi all,
Like many, I have used icons in my courses but now, developing courses that others are going to maintain, I have to ensure simplicity and that often means not including things that require the teacher to use anything other than the WYSIWYG editor.
We use the amazing theme by Gareth Barnard, Essential site wide. However, there are courses that require an individual look and feel. That is easily done but we also wanted to have the convenience of using the Fontawesome Filter. For those that don't know it, this filter enables the teacher to add icons to their pages by putting the Fontawesome code inside square brackets e.g. [fa-home fa-2x pull-left]. This only works for Fontawesome-enabled themes such as Essential or Shoelace. You can, of course, still use <i>-tags.
After gleaning information from a variety of sources I would like to share how to turn the standard "Clean" theme into a Fontawesome-enabled theme. I am still relatively new to Moodle so I would also appreciate it if someone tells me if I have made any mistakes but so far it seems to be working and also inherits to any child themes created. I assume that the steps would be similar for "More" but that will have to wait until I have some spare time.
#######################################################
1. Download Fontawesome from http://fontawesome.io/ and unzip.
2. Add a new folder "fonts" to the "clean" directory and add the files fontawesome-webfont.svg, fontawesome-webfont.ttf, FontAwesome.otf, fontawesome-webfont.eot, fontawesome-webfont.woff and fontawesome-webfont.woff2.
2. Copy font-awesome.min.css to the "style" folder.
3. In the file "config.php" add fontawesome.min to the sheets e.g. $THEME->sheets = array('custom', 'font-awesome.min');
4. In the "custom.css file, add the following lines:
@font-face {
font-family: 'FontAwesome';
src: url([[font:theme|fontawesome-webfont.eot]]);
src: url([[font:theme|fontawesome-webfont.eot]]) format('embedded-opentype'),
url([[font:theme|fontawesome-webfont.woff]]) format('woff'),
url([[font:theme|fontawesome-webfont.woff2]]) format('woff'),
url([[font:theme|fontawesome-webfont.ttf]]) format('truetype'),
url([[font:theme|fontawesome-webfont.svg]]) format('svg'); font-weight: normal; font-style: normal;
}
#######################################################
That's pretty much it. I hope that this is helpful for someone out there.
Cheers,
Malcolm