Easy
Add to your MediaWiki:vector.js page or add a script JS page to the <head>
Make sure the li id's match the icon you want to prepend to.
$('li#t-specialpages a').prepend('<i class="fa fa-magic fa-fw"></i>')
$('li#t-print a').prepend('<i class="fa fa-print fa-fw"></i>')
$('li#t-permalink a').prepend('<i class="fa fa-dot-circle-o fa-fw"></i>')
Might be better to wrap the icon in a div for more control. Even up left right
padding as an example. Then add the div class to your CSS. Helps with alignment
of icons.
Example
$('li#t-upload a').prepend('<div class="fa-icon"><i class="fa fa-upload
fa-fw"></i></div>')
Make sure you hard reload to flush the cache of page after the additional JS.
Any issues could be a js conflict. Check the console and replace $ with jQuery
in the front.
Tom
> On Apr 17, 2015, at 3:16 PM, Skylear Johnson <[email protected]> wrote:
>
> Alright, the jQuery idea makes sense.
>
> Problem; I’ve never heard of such a method and I’m a failure at Javascript
> (or anything related). Do you know the snippet I’d need for that?
>
>> On Apr 16, 2015, at 11:30 PM, Tom <[email protected]> wrote:
>>
>> Reread your original question, did you add the fontawesome stylesheet? If
>> yes, just use jQuery to add the icons to the sidebar by id.
>>
>> Tom
>>
>>> On Apr 16, 2015, at 10:21 PM, Tom <[email protected]> wrote:
>>>
>>> What version of mw are you using?
>>>
>>> Tom
>>>
>>>> On Apr 16, 2015, at 7:49 PM, Ryan Kaldari <[email protected]> wrote:
>>>>
>>>> BaseTemplate is in /includes/skins/BaseTemplate.php, but you probably don't
>>>> want to edit that file. You probably want to edit VectorTemplate which is
>>>> in /skins/Vector/VectorTemplate.php.
>>>>
>>>> Kaldari
>>>>
>>>> On Thu, Apr 16, 2015 at 4:39 PM, Skylear Johnson <[email protected]>
>>>> wrote:
>>>>
>>>>> No one seems to be able to answer this question; where is the BaseTemplate
>>>>> class located? In my attempt to use Font Awesome in my mercilessly hacked
>>>>> Vector skin, I come across the issue of how the sidebar renders list
>>>>> items.
>>>>>
>>>>> I need to modify makeListItem(), so where would I find the BaseTemplate
>>>>> class so that I can mess with it?
>>>>>
>>>>> Thanks!
>>>>> _______________________________________________
>>>>> MediaWiki-l mailing list
>>>>> To unsubscribe, go to:
>>>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>> _______________________________________________
>>>> MediaWiki-l mailing list
>>>> To unsubscribe, go to:
>>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>>
>>> _______________________________________________
>>> MediaWiki-l mailing list
>>> To unsubscribe, go to:
>>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> To unsubscribe, go to:
>> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l