Welcome to Admin Junkies, Guest — join our community!

Register or log in to explore all our content and services for free on Admin Junkies.

Need some help with node icons

Al

Get Boosted
Bronze Member
Joined
Jul 15, 2023
Messages
624
Credits
3,030
I was able to change the icons used on the main nodes on my forum by adding some additional code to extra.less

image_2023-09-17_221812186.png


Looks good, right?

The issue I have is that I cannot work out how to change the sub-node icons to be the same. This is the code I used in extra.less

Code:
.node-icon i { display: none; }
.node-icon { background-image: url('styles/omni/xenforo/unreadnode.png'); background-repeat: no-repeat; background-position: center; }
.node--read .node-icon { opacity: 0.5; }

.node-icon-fix i { display: none; }
.node-icon-fix { background-image: url('styles/omni/xenforo/subnode.png'); background-repeat: no-repeat; background-position: center; }
.node--read .node-icon-fix { opacity: 0.5; }

I'm aware of the !important tag which can be added, but when I try to insert it it resets the main nodes too.

Can someone help please?
 
Solution
I was able to change it with this css code:
CSS:
.fa--xf.fal.fa-comments.subNodeLink-icon{
color:transparent;
font-size:15px;
}
.fa-comments:before {
  background-image: url("https://shatteredsunrts.com/data/avatars/s/0/1.jpg?1690990421");
background-repeat: no-repeat;
    background-size: cover;
    text-align: center;

}

change the background-image and font-size to your convenience
Let me know if this fixed the issue :)
Have you thought of using one of my maintained free add-ons ?

Sorry I have just seen this! I'll check it out.
 
First thing that comes to mind.... And I am sure you have done this and it may not be relevant (depending on your usage).... Have you cleared your browser cache if they are not inlined?

Note:
Based on @Cedric reply it appears they are not inlined. So, have you cleared your cache then reloaded the page?
Aye and tried chrome incognito mode too.
 
I was able to change it with this css code:
CSS:
.fa--xf.fal.fa-comments.subNodeLink-icon{
color:transparent;
font-size:15px;
}
.fa-comments:before {
  background-image: url("https://shatteredsunrts.com/data/avatars/s/0/1.jpg?1690990421");
background-repeat: no-repeat;
    background-size: cover;
    text-align: center;

}

change the background-image and font-size to your convenience
Let me know if this fixed the issue :)
 

Attachments

  • Screenshot Capture - 2023-09-24 - 08-53-30.jpg
    Screenshot Capture - 2023-09-24 - 08-53-30.jpg
    15.5 KB · Views: 6
Last edited:
  • Love
Reactions: Al
Solution
“A wild @Russ has entered the server.”
I might change your CSS to something like this:

Code:
.block-body
{
    .node--unread .node-body .node-icon i
    {
        background-position: right center;
    }
    .node-icon
    {
        padding-right: 10px;
        width: 60px;
        i
        {
            background: url("styles/omni/xenforo/unreadnode.png") no-repeat left center;
            width: 45px;
            height: 45px;
            background-size: 45px auto;
            &:before
            {
                opacity: 0 !important;
            }
        }
    }
}
.subNodeLink 
{
    padding: 2px 0;
    display: inline-flex;
    align-items: center;
    i
    {
        display: none !important;    
    }
    &:before
    {
        content: "";
        background: url("styles/omni/xenforo/unreadnode.png") no-repeat left center;
        width: 18px;
        height: 18px;
        background-size: 18px auto;
        opacity: 0.5;
        color: rgba(0, 0, 0, 0);
    }
    &.subNodeLink--unread i
    {
        opacity: 1;
    }
}

It'll reduce the size of the icon a little bit as well which you can change the 45px values, I just think it looks nicer being a tiny bit smaller.
 

Log in or register to unlock full forum benefits!

Log in or register to unlock full forum benefits!

Register

Register on Admin Junkies completely free.

Register now
Log in

If you have an account, please log in

Log in
Activity
So far there's no one here

Users who are viewing this thread

Would You Rather #9

  • Start a forum in a popular but highly competitive niche

    Votes: 5 21.7%
  • Initiate a forum within a limited-known niche with zero competition

    Votes: 18 78.3%
Win this space by entering the Website of The Month Contest

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds