Plugin: add a menu icon (next to search)


(Bas van Leeuwen) #1

If you’ve always wanted to add an extra icon, next to the search, here’s your chance! :slight_smile:

Installation as usual, link:
https://github.com/VonLion/discourse-menu-icon.git


Add new link on header beside search icon
#4

This is great ! Thanks!

If someone has a site using this, please tell me.

I’m translating this. :+1:


:sparkles: An idea @Bas, maybe besides “title”, you can add alt title to image too?
Same setting for menu_icon_title, I think it’s here: initializers/menu-icon.js.es6#L16


(Bas van Leeuwen) #5

Hey @SidV,

Just merged the pull requests, thanks!

Alt text isn’t necessary I think; it’s a font icon and the link already has an aria-label which is enough for screenreaders :slight_smile:


#6

You’re right, I was confused!
Sorry for the idea, alt would not serve here. I agree with you.


(Tom Newsom) #7

Excellent :slight_smile:

Feature Request: Multiple buttons!


(Bas van Leeuwen) #8

Yeah, figured it wouldn’t take long before that was requested, haha.

Thing is, I don’t know how to do this :smiley: The current plugin is a pretty straightforward modification of the excellent plugin tutorial by @eviltrout

I don’t know how to create an “add icon” button that spawns multiple fields; I know it can be done, since the navigation plugin does so, but I’m pretty new at this and I just created this one out of a personal need and to learn.

I might take a crack at this during a weekend somewhere, until then… PRs are welcomed :slight_smile:


#9

For multiple buttons are some ideas here: Add new link on header beside search icon by @techAPJ :clap:


(Bas van Leeuwen) #10

Heh, that thread is actually the other part of the code I stole :sushing_face: