Code:
Where to add:
Appearance → Styles → Your style → EXTRA.less
Less:
/* XF 2.3 Nav icon helper */
.m-xfNavIcon(@icon) {
&:before {
.m-faContent(@icon);
margin-right: 6px;
font-size: 1em;
vertical-align: middle;
opacity: .85;
}
}
XF 2.3 uses .
Code:
.p-navEl-link
Code:
.menu-link
Less:
.p-navEl-link,
.menu-link {
position: relative;
}
Less:
/* Public navigation */
.p-navEl-link {
&[data-nav-id='home'] {.m-xfNavIcon(@fa-var-house);}
&[data-nav-id='forums'] {.m-xfNavIcon(@fa-var-comments);}
&[data-nav-id='whatsNew'] {.m-xfNavIcon(@fa-var-newspaper);}
&[data-nav-id='members'] {.m-xfNavIcon(@fa-var-user);}
&[data-nav-id='xfrm'] {.m-xfNavIcon(@fa-var-download);}
&[data-nav-id='dbtechCredits'] {.m-xfNavIcon(@fa-var-coins);}
&[data-nav-id='dbtechShop'] {.m-xfNavIcon(@fa-var-cart-shopping);}
}
Less:
.menu-link {
&[data-nav-id='newPosts'] {.m-xfNavIcon(@fa-var-magnifying-glass-plus);}
&[data-nav-id='findThreads'] {.m-xfNavIcon(@fa-var-magnifying-glass);}
&[data-nav-id='yourThreads'] {.m-xfNavIcon(@fa-var-user);}
&[data-nav-id='contributedThreads'] {.m-xfNavIcon(@fa-var-comments);}
&[data-nav-id='unansweredThreads'] {.m-xfNavIcon(@fa-var-comment-slash);}
&[data-nav-id='watched'] {.m-xfNavIcon(@fa-var-eye);}
&[data-nav-id='watchedThreads'] {.m-xfNavIcon(@fa-var-comments);}
&[data-nav-id='watchedForums'] {.m-xfNavIcon(@fa-var-layer-group);}
&[data-nav-id='searchForums'] {.m-xfNavIcon(@fa-var-magnifying-glass);}
&[data-nav-id='markForumsRead'] {.m-xfNavIcon(@fa-var-eye-slash);}
}
Less:
.menu-link {
&[data-nav-id='featured'] {.m-xfNavIcon(@fa-var-star);}
&[data-nav-id='whatsNewPosts'] {.m-xfNavIcon(@fa-var-pen);}
&[data-nav-id='whatsNewProfilePosts'] {.m-xfNavIcon(@fa-var-rss);}
&[data-nav-id='whatsNewNewsFeed'] {.m-xfNavIcon(@fa-var-fire);}
&[data-nav-id='latestActivity'] {.m-xfNavIcon(@fa-var-trophy);}
}
Less:
.menu-link {
&[data-nav-id='xfrmLatestReviews'] {.m-xfNavIcon(@fa-var-scale-balanced);}
&[data-nav-id='xfrmYourResources'] {.m-xfNavIcon(@fa-var-user);}
&[data-nav-id='xfrmWatched'] {.m-xfNavIcon(@fa-var-eye);}
&[data-nav-id='xfrmWatchedResources'] {.m-xfNavIcon(@fa-var-download);}
&[data-nav-id='xfrmWatchedCategories'] {.m-xfNavIcon(@fa-var-table-cells);}
&[data-nav-id='xfrmSearchResources'] {.m-xfNavIcon(@fa-var-magnifying-glass);}
/* XFA RM Marketplace */
&[data-nav-id='xfa_rmmp_purchases'] {.m-xfNavIcon(@fa-var-credit-card);}
&[data-nav-id='xfa_rmmp_licenses'] {.m-xfNavIcon(@fa-var-key);}
&[data-nav-id='xfa_rmmp_dashboard'] {.m-xfNavIcon(@fa-var-gauge);}
&[data-nav-id='xfa_rmmp_invoices'] {.m-xfNavIcon(@fa-var-receipt);}
}
Less:
.menu-link {
/* Members */
&[data-nav-id='registeredMembers'] {.m-xfNavIcon(@fa-var-user-group);}
&[data-nav-id='currentVisitors'] {.m-xfNavIcon(@fa-var-user-plus);}
&[data-nav-id='newProfilePosts'] {.m-xfNavIcon(@fa-var-pen);}
/* DragonByte Shop */
&[data-nav-id='dbtechShopInventory'] {.m-xfNavIcon(@fa-var-backpack);}
&[data-nav-id='dbtechShopBank'] {.m-xfNavIcon(@fa-var-building-columns);}
&[data-nav-id='dbtechShopLottery'] {.m-xfNavIcon(@fa-var-ticket);}
&[data-nav-id='dbtechShopTrade'] {.m-xfNavIcon(@fa-var-handshake);}
/* DragonByte Credits */
&[data-nav-id='dbtechCreditsTransactions'] {.m-xfNavIcon(@fa-var-money-bill-wave);}
}
✔ Uses FA6 icon names
✔ Uses XF .m-faContent()
✔ Correct selectors (.p-navEl-link, .menu-link)
✔ No duplication
✔ Mobile + desktop safe