mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 00:35:50 +00:00
UX: Add subcategory class to hamburger menu items that are subcategories
UX: Add data-category-url to make targetting a category li element in the hamburger menu easier
This commit is contained in:
parent
068ce19ae2
commit
15f7fff561
@ -6,6 +6,12 @@ createWidget('hamburger-category', {
|
||||
tagName: 'li.category-link',
|
||||
|
||||
html(c) {
|
||||
if (c.parent_category_id) {
|
||||
this.tagName += '.subcategory';
|
||||
}
|
||||
|
||||
this.tagName += '.category-' + Discourse.Category.slugFor(c, '-');
|
||||
|
||||
const results = [ this.attach('category-link', { category: c, allowUncategorized: true }) ];
|
||||
|
||||
const unreadTotal = parseInt(c.get('unreadTopics'), 10) + parseInt(c.get('newTopics'), 10);
|
||||
|
Loading…
x
Reference in New Issue
Block a user