Using inline SVG on MeModule
I'm experimenting developing a theme for Vanilla (you can see my actual progress on GitHub, it still has my site-specific code that I should clean up by the time I will release it here in the addons directory), and i'm trying to use inline SVG when possible, to a better control of its styles via CSS, but I am actually having some problems altering the views, as
me.php and such, to add an include or something like that to “embed” the contents of an SVG file as I can when I'm editing a Smarty file. Can someone help me?
In the case of MeModule specifically, I see where I need to edit it:
echo '<span class="ToggleFlyout" rel="/profile/notificationspopin">'; echo anchor(sprite('SpNotifications', 'Sprite Sprite16').wrap(t('Notifications'), 'em').$CNotifications, userUrl($User), 'MeButton FlyoutButton js-clear-notifications', ['title' => t('Notifications')]); echo sprite('SpFlyoutHandle', 'Arrow'); echo '<div class="Flyout FlyoutMenu"></div></span>';
But I'm having problems to replace the
sprite function to something that I can actually use to put an SVG icon instead.
Thanks in advance for your help!