[cXF] Coloured Node Icons

[cXF] Coloured Node Icons

BassMan

Well-known member
I can't get the subforum icon changes with a new FA icon, i tried many times but fail.
This is my last code...

Less:
.node.node--id66 {
    
    &.node--forum {

        .node-icon i:before {
            .m-faBase();
            .m-faContent(@fa-var-bug);
        }
        
        .node-icon i:before, .subNodeLink.subNodeLink--forum .subNodeLink-icon:before {
            .m-faBase();
            .m-faContent(@fa-var-bug);
        }
        
    }
    
}

This code works for the forum displayed in its parent forum view but not on homepage...
 
I can't get the subforum icon changes with a new FA icon, i tried many times but fail.
This is my last code...

Less:
.node.node--id66 {
   
    &.node--forum {

        .node-icon i:before {
            .m-faBase();
            .m-faContent(@fa-var-bug);
        }
       
        .node-icon i:before, .subNodeLink.subNodeLink--forum .subNodeLink-icon:before {
            .m-faBase();
            .m-faContent(@fa-var-bug);
        }
       
    }
   
}

This code works for the forum displayed in its parent forum view but not on homepage...
Check here: https://xenforo.com/community/threads/cxf-change-default-fa-node-icon.172082/#post-1542955
 
Hello,

You mean here?
Screenshot 2023-02-27 at 08.35.10.png

Add this code:
Less:
/* for read node */
[data-container-key="node-212"] .node.node--depth2.node--forum.node--read .node-icon i:before {
    color: #9E5596;
}
/*for unread node */
[data-container-key="node-212"] .node.node--depth2.node--forum.node--unread .node-icon i:before {
    color: #9E5596;
}
 
Last edited:
Yep those ones, but weirdly your code doesn't work.
Less:
/* forum suggestion */
[data-container-key="node-57"] .node.node--depth2.node--suggestion.node--read .node-icon i:before {
    color: #F2930D;
    opacity: 30%;
}
[data-container-key="node-57"] .node.node--depth2.node--suggestion.node--unread .node-icon i:before {
    color: #F2930D;
}


/* forum general */
[data-container-key="node-48"] .node.node--depth2.node--forum.node--read .node-icon i:before {
    color: #F2930D;
    opacity: 30%;
}
[data-container-key="node-48"] .node.node--depth2.node--forum.node--unread .node-icon i:before {
    color: #F2930D;
}
 
The data-container-key for your Suggestions node is node-39. Inspect the page where that subforum is.

In other words, the node ID is from the parent node.
 
Top Bottom