Icinga/icingaweb2

Feature Request / allow fontawsome icons as menu items

Opened this issue · 0 comments

I would like to use fontawsome icons as menu items.

My first idea would be patching url.php
https://github.com/Icinga/icingaweb2/blob/main/library/Icinga/Web/View/helpers/url.php

and do something like this:
if the icon name starts with 'fa-' it has to be a fontawsome name and the class will be provides differently.

...
    if(strpos($img,"fa-") === 0){
        if (isset($properties['class'])) {
            $properties['class'] .= ' icon ' . $img . " fa";
        } else {
            $properties['class'] = 'icon ' . $img. " fa";;
        }
    }else{
        if (isset($properties['class'])) {
            $properties['class'] .= ' icon-' . $img;
        } else {
            $properties['class'] = 'icon-' . $img;
        }
    }
...

I am happy to provide a pull request...

Thanks in advance and
best Regards
Nicolas