Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request / allow fontawsome icons as menu items #5205

Open
moreamazingnick opened this issue Apr 2, 2024 · 0 comments
Open

Feature Request / allow fontawsome icons as menu items #5205

moreamazingnick opened this issue Apr 2, 2024 · 0 comments

Comments

@moreamazingnick
Copy link
Contributor

moreamazingnick commented Apr 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant