Skip to content

Commit 5cb3032

Browse files
committed
Fix icons in the main menu
MDL-82210 (Add support to Font Awesome families) changed the core/pix_icon template and removed the ‘fa’ class from the <i> element in order to support different Font Awesome families. This class is instead added via \core\output\icon_system_fontawesome::add_family in \core\output\icon_system_fontawesome::get_icon_name_map when no family is set. However, since this theme overrides this method, the ‘fa’ class was never added to the additional icons of this theme. We therefore set the ‘fa-solid’ family for all our additional icons.
1 parent a055e7b commit 5cb3032

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

classes/output/icon_system_fontawesome.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,25 @@ public function get_core_icon_map() {
4545
$iconmap = parent::get_core_icon_map();
4646

4747
$override = [
48-
'core:i/briefcase' => 'fa-briefcase',
49-
'core:i/cogs' => 'fa-cogs',
50-
'core:i/graduation-cap' => 'fa-graduation-cap',
51-
'core:i/navigationbranch' => 'fa-wrench',
52-
'core:i/navigationitem' => 'fa-angle-double-right',
53-
'core:i/book' => 'fa-book',
54-
'core:i/trophy' => 'fa-trophy',
55-
'core:i/key' => 'fa-key',
56-
'core:i/comment' => 'fa-comment',
57-
'core:i/rss-square' => 'fa-rss-square',
58-
'core:i/hidden' => 'fa-eye-slash',
59-
'core:i/list' => 'fa-list',
60-
'core:i/logout' => 'fa-sign-out',
61-
'core:i/help' => 'fa-question-circle',
62-
'core:i/hamburger' => 'fa-bars',
63-
'core:i/sun' => 'fa-sun-o',
64-
'core:i/moon' => 'fa-moon-o',
65-
'core:i/magic' => 'fa-magic',
66-
'core:i/theme' => 'fa-paint-brush',
48+
'core:i/briefcase' => 'fa-solid fa-briefcase',
49+
'core:i/cogs' => 'fa-solid fa-cogs',
50+
'core:i/graduation-cap' => 'fa-solid fa-graduation-cap',
51+
'core:i/navigationbranch' => 'fa-solid fa-wrench',
52+
'core:i/navigationitem' => 'fa-solid fa-angle-double-right',
53+
'core:i/book' => 'fa-solid fa-book',
54+
'core:i/trophy' => 'fa-solid fa-trophy',
55+
'core:i/key' => 'fa-solid fa-key',
56+
'core:i/comment' => 'fa-solid fa-comment',
57+
'core:i/rss-square' => 'fa-solid fa-rss-square',
58+
'core:i/hidden' => 'fa-solid fa-eye-slash',
59+
'core:i/list' => 'fa-solid fa-list',
60+
'core:i/logout' => 'fa-solid fa-sign-out',
61+
'core:i/help' => 'fa-solid fa-question-circle',
62+
'core:i/hamburger' => 'fa-solid fa-bars',
63+
'core:i/sun' => 'fa-solid fa-sun-o',
64+
'core:i/moon' => 'fa-solid fa-moon-o',
65+
'core:i/magic' => 'fa-solid fa-magic',
66+
'core:i/theme' => 'fa-solid fa-paint-brush',
6767
];
6868

6969
return array_merge($iconmap, $override);

0 commit comments

Comments
 (0)