Skip to content

Forum customisation

Customisation
  • Hi Mark,

    I’d like some help customising two forums running NodeBB please if possible.

    I wish to change the colours of the buttons below.

    1000005618.png

    And how can I change the board stats widget to look similar to this…

    1000005620.png

    As always, thank you! 🤝.

  • phenomlabundefined phenomlab marked this topic as a regular topic
  • @JAC said in Forum customisation:

    I wish to change the colours of the buttons below.

    .link-primary, .text-primary {
        color: var(--bs-link-color) !important;
    }
    

    @JAC said in Forum customisation:

    And how can I change the board stats widget to look similar to this…

    .border-secondary {
        --bs-border-opacity: 1;
        border-color: var(--bs-border-color) !important;
        border-radius: 10px !important;
    }
    
    [component="widget/board-stats"] .text-bg-secondary:first-child {
        color: var(--bs-link-color) !important;
        background-color: var(--bs-node-card-cap-bg) !important;
        border-top-left-radius: 10px !important;
        border-top-right-radius: 10px !important;
    }
    
    [component="widget/board-stats"] .text-bg-secondary {
        color: var(--bs-link-color) !important;
        background-color: var(--bs-node-card-cap-bg) !important;
        border-top-left-radius: 0px !important;
        border-top-right-radius: 0px !important;
    }
    
  • Perfect @DownPW, thank you very much!

    I’ll try these on the laptop later.

  • @JAC Worth noting that @DownPW (like myself) uses CSS variables, so if you copy this like for like, it won’t work. You’d need to use actual HEX values for colours etc.

  • @JAC said in Forum customisation:

    I wish to change the colours of the buttons below.

    I’d do this a bit different to @DownPW and be more specific with the target. Obviously, change #ffffff to whatever value you require

    [component="post/actions"] a i, [component="post/actions"] span i {
        color: #ffffff !important;
    }
    

    This should produce something like the below (obviously not the dark background), and not white, but you get the idea.

    65c886f4-27b2-4d0f-a57c-a34a547eb8b1-image.png

    The below CSS should not be used in this instance because it will target several other elements on the site and produce undesirable results

    .link-primary, .text-primary {
        color: var(--bs-link-color) !important;
    }
    

    @JAC said in Forum customisation:

    And how can I change the board stats widget to look similar to this…

    I’d use something like this, which will target the widget background and the colour of the text in use

    [component="widget/board-stats"] {
        background: #000000;
        color: #ffffff;
    }
    

    And the below, which will target the background and text colour of the header

    [component="widget/board-stats"] h3 {
        background: red !important;
        color: yellow !important;
    }
    

    So the actual CSS you need is

    [component="widget/board-stats"] {
        background: #194F90;
        color: #ffffff;
    }
    [component="widget/board-stats"] h3 {
        background: #000000 !important;
    }
    .widget-board-stats.border.border-secondary a {
        color: #FFC557;
    }
    

    This should produce

    bc4fd490-b000-4052-a929-35b6a8be4ba8-image.png

  • Thanks very much for all the guidance, I’m currently away and don’t have the laptop on me so I’ll get to these changes next week.


Related Topics
  • 6 Votes
    15 Posts
    1k Views

    No no, I said that in the sense that he told me it was simple ^^
    I was able to see that this was not the case by targeting the elements he had advised me.

  • NodeBB: The global Search option

    Solved Configure
    5
    0 Votes
    5 Posts
    286 Views

    @mventures Yes, exactly. The other icon will restart NodeBB whilst the first icon I referenced will rebuild (recompile) it.

    The huge strength of NodeBB over Flarum (for example) is that the code is precompiled, and called once at boot. PHP’s code has to repeatedly reload code from source making it much slower.

  • Forum Icons NodeBB

    Solved Customisation
    13
    0 Votes
    13 Posts
    1k Views

    @cagatay That matches what I see

    4f0f858d-9812-42b1-9f61-ffb13d31dccd-image.png

  • Rotating homepage icons, gifs?

    Solved Configure
    2
    3 Votes
    2 Posts
    232 Views

    @eveh It’s not a GIF, no. It’s actually a webp file so made much smaller, and uses keyframes to control the rotation on hover. You can easily make your own though 🙂

    The CSS for that is as below

    @keyframes rotate180 { from { transform: rotate(0deg); } to { transform: rotate(180deg); } } @keyframes rotate0 { from { transform: rotate(180deg); } to { transform: rotate(0deg); } }

    Your milage may vary on the CSS below, as it’s custom for Sudonix, but this is the class that is used to control the rotate

    .header .forum-logo, img.forum-logo.head { max-height: 50px; width: auto; height: 30px; margin-top: 9px; max-width: 150px; min-width: 32px; display: inline-block; animation-name: rotate180, rotate0; animation-duration: 1000ms; animation-delay: 0s, 1000ms; animation-iteration-count: 1; animation-timing-function: linear; transition: transform 1000ms ease-in-out; }
  • Forum Statistics Box

    Solved Customisation
    5
    4 Votes
    5 Posts
    462 Views

    @Sampo2910 said in Forum Statistics Box:

    Say i wanted new theme for example or again something like this?

    Yes, exactly the same process.

  • NodeBB Discord Plugins

    Unsolved Customisation
    7
    0 Votes
    7 Posts
    938 Views

    @RiekMedia hi. Just following up on this thread (I know it’s old) but was curious to understand if it’s still an issue or not ?

  • nodebb-plugin-customize error

    Solved Customisation
    25
    2 Votes
    25 Posts
    2k Views

    @phenomlab it work, thanks 🙂

  • Customising NodeBB

    Locked Customisation
    3
    0 Votes
    3 Posts
    737 Views

    Closing this thread as a duplicate of https://sudonix.com/topic/12/nodebb-customisation