Discourse Nav Item Icon / Emoji

Install this theme component

Hello :wave:

With this theme component you can add icon or emoji before nav items. The theme component based on Discourse Easy 'SVG Icon' and 'Emoji' in CSS.

It contains two settings where you can:

  1. Add the nav item prefix
  2. Change the navigation bar on mobile. mobile navigation toggle enabled

nav item prefix

This setting can handle the icons and emojis too.

The rule you have to follow is:

Icon

If you want to add icon before a nav item:
icon:nav-item:icon-set:icon-name:icon-color

First you have to define the type which is icon if you want to add icon before the nav item.

  • nav-item: latest, hot, new, unread, categories etc…
  • icon-set: brands, regular, solid
  • icon-color: currentColor, HEX or color variable

For example:
icon:latest:solid:rocket:currentColor
icon:top:regular:star:var(--gold)
icon:unseen:solid:compass:#228C22

icon


Emoji

If you want to add emoji before a nav item:
emoji:nav-item:emoji-set:emoji-name:filter

First you have to define the type which is emoji if you want to add emoji before the nav item.

  • nav-item: latest, hot, new, unread, categories etc…
  • emoji-set: apple, google, twitter, win10, google_classic, facebook_messenger
  • filter: It makes the emoji color black in light mode and white in dark mode. If the emoji hovered or active it will be reveal with a transition. (optional)
    emoji-filter

For example:
emoji:latest:twitter:rocket:filter
emoji:top:google:star
emoji:new:facebook_messenger:bell

emoji


mobile navigation toggle enabled

Screenshot 2024-03-27 at 6.15.57

By default it will use the dropdown on mobile but you can change it to use the desktop version of navigation bar.

Default navigation bar

default-nav1 default-nav1

Desktop navigation bar

desktop-nav1 desktop-nav2

4 Likes