[cXF] Node icons with image

[cXF] Node icons with image

@BassMan - i adjusted te settings for office forum, but to no avail!

CSS:
.node.node--id140 {
        .node-icon i { display: none; }

    &.node--forum {
        .node-body {
        .node.node--id31.node--depth2.node--forum {
         padding-left: 12px;
}
        }
        .node-icon {
            background-image: url('/styles/enhance/node icon/office.webp');
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
            width: 34px;
        }
        &.node--read .node-icon {
            opacity: 0.4;
        }
    }
}
 
I've used this code (I've changed the node to yours, so try with this one):

Less:
.node.node--id31 {
        .node-icon i { display: none; }

    &.node--forum {
        .node-body {
            padding-left: 12px;
        }
        .node-icon {
            background-image: url('/styles/enhance/node icon/techniews.webp');
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
            width: 34px;
        }
        &.node--read .node-icon {
            opacity: 0.4;
        }
    }
}


And this is what I get:

Screenshot 2021-08-07 at 22.26.45.webp


It's the same code as in the tutorial.
 
If for some reason it's not working on your site, use this code:

Less:
.node.node--id31 {
        .node-icon i { display: none; }

    &.node--forum {
        padding-left: 12px;
        .node-icon {
            background-image: url('https://piepcomp.nl/styles/enhance/node icon/techniews.webp');
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
            width: 34px;
        }
        &.node--read .node-icon {
            opacity: 0.4;
        }
    }
}
 
Back
Top Bottom