Skip to content

[NODEBB] CSS Style Sheets SelectBox

Locked Solved Customisation
  • @phenomlab

    @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    Looks like it’s already fixed ?

    05664f98-b661-47d2-a40d-e6b9b86a1a49-image.png

    Yes, I have fixed with this :

    .notifications.dropdown.xs {
        margin-left: -18px;
        margin-right: -18px;
        margin-top: 6.2px;
        list-style: none;
    }
    

    @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    When I select a theme, I have this, how to fix these :

    This also seems to be fixed ?

    856c76e2-103b-43ca-ad7c-1b7800edb18c-image.png

    No, not fixed 😞
    I have test several things with no success:

    b494fd05-5e77-485c-818a-cd2e7ae56342-image.png


    @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    On mobile again, my wallpaper doesn’t apply (It was the case before, like default theme on ACP/custom CSS , the css code is the same)

    I noticed this also, but now note that the wallpaper seems to be the same even on desktop despite the color being switched. Is this intended, as this was not the case yesterday ?

    No change, It’s because I have Custom Header code on ACP (Your Reading Meter Bar) and he bug the css code of others theme except default theme.

    Any code adding on ACP/Custom Header like a div for example crashes CSS themes :

    ba5d1ca8-70ab-4789-aa02-2637fbbfbef1-image.png

    If i disable code in ACP/Custom Header. The CSS custom themes is OK except wallpaper on Mobile


    @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    I have this on console, normal ?

    Sorry - I can’t see any screenshot ?

    Sorry, I can’t edit the post yesterday:

    e1e13fb0-88ec-4df4-9699-893715f91160-image.png


    @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    I have not mouse over color on theme switcher icon like other icons on navbar?

    You can instate that using class .dropdown-toggle:hover

    I have test with that on ACP = doesn’t work :

    .dropdown-toggle:hover {
        background: #3C3C3C;
    }
    

    But Ok with this code but the background doesn’t occupy the entire height of the navbar like other navbar icons :

    .notifications.dropdown.xs .dropdown-toggle:hover {
        background: #3C3C3C;
    }
    

    1df7a050-f698-416f-8d07-c30ffe297e85-image.png

    Here, this is OK. Iwould like this result:
    254f27dd-d8cd-4ee2-aeef-16ac19488539-image.png

  • @downpw Ok. Let me have a look

  • @DownPW I’ve set this custom CSS in your ACP

    // PLEASE DO NOT DELETE THIS
    
    .header #theme_dropdown {
        padding: 9px 15px;
    }
    .header #theme_dropdown {
        padding: 9px 15px;
            padding-top: 9px;
            padding-bottom: 9px;
        margin-top: -6px;
        padding-top: 14px;
        padding-bottom: 13px;
    }
    

    This is the basis which should make it work, but you’ll need to “fiddle” with it to get it how you need.

    I also changed the jQuery code slightly, as I realized there was a conflict with another ID, which I’ve fixed.

    EDIT: It’s this line

    <label for="user-control-list-check" class="dropdown-toggle" data-toggle="dropdown" id="***theme***_dropdown" title="" role="button" data-original-title="Theme" aria-expanded="false"> \
    
  • OK Thanks.
    You have change id="user_dropdown with id=“theme_dropdown”

    Can you will see for others problem after?

  • @downpw I’m running low on free time now sadly, but more then happy to get this resolved for you tomorrow or later in the week of that works for you.

    The issue here is that I’ve reused some of the existing code from NodeBB and that may be causing some issues. Don’t worry. We’ll get there 👍

  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    @downpw I’m running low on free time now sadly, but more then happy to get this resolved for you tomorrow or later in the week of that works for you.
    The issue here is that I’ve reused some of the existing code from NodeBB and that may be causing some issues. Don’t worry. We’ll get there

    OK Thanks sir 🙂
    I really hope ! You are a super hero !

    I also hope that when done this will work on future nodeBB updates/upgrade.
    PM me when you have the time for that I turn on the VM

  • @downpw no issues. It’ll work across upgrades as it’s a standard function and doesn’t rely on any NodeBB components. If you can just ensure that the VM is available around the same time each day, that would also help.

  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    If you can just ensure that the VM is available around the same time each day, that would also help.

    Ok no problem Sir 😉

  • @downpw Right. I think I have this working the way you’d like

    9178fb7a-04b8-4b34-95cd-6bf47d8b368a-image.png

    This uses the below CSS I have placed into your ACP. It should not be deleted

    // PLEASE DO NOT DELETE THIS
    
    .header #theme_dropdown {
        padding: 9px 15px;
        padding-top: 9px;
        padding-bottom: 9px;
        margin-top: -4px;
        padding-top: 14px;
        padding-bottom: 16px;
    }
    #switcher{
        position: absolute;
        right: 33%;
    }
    

    The :hover class is always going to look like the below

    07a054c4-57bd-4817-8823-785116ed97b6-image.png

    The reason for this is because you have it hard coded in the ACP CSS as below

    /*VIOLENCE: Couleur du background au survol souris */
    .navbar-default .navbar-nav>li>label:hover {
        background: #555555;
    }
    

    You should remove this, and set it based on the color you want in each external CSS file. This way, it will display correctly.

    The slight caveat with this is that it has to use absolute positioning meaning that if you resize the browser, the theme switcher icon will use a percentage to work out where it needs to be, and won’t be governed by the <ul><li> it sits inside. This is the only way to get the effect you are looking for.

  • @phenomlab said in [NODEBB] CSS Style Sheets SelectBox:

    @downpw Right. I think I have this working the way you’d like

    9178fb7a-04b8-4b34-95cd-6bf47d8b368a-image.png

    This uses the below CSS I have placed into your ACP. It should not be deleted

    // PLEASE DO NOT DELETE THIS
    
    .header #theme_dropdown {
        padding: 9px 15px;
        padding-top: 9px;
        padding-bottom: 9px;
        margin-top: -4px;
        padding-top: 14px;
        padding-bottom: 16px;
    }
    #switcher{
        position: absolute;
        right: 33%;
    }
    

    The :hover class is always going to look like the below

    07a054c4-57bd-4817-8823-785116ed97b6-image.png

    The reason for this is because you have it hard coded in the ACP CSS as below

    /*VIOLENCE: Couleur du background au survol souris */
    .navbar-default .navbar-nav>li>label:hover {
        background: #555555;
    }
    

    You should remove this, and set it based on the color you want in each external CSS file. This way, it will display correctly.

    The slight caveat with this is that it has to use absolute positioning meaning that if you resize the browser, the theme switcher icon will use a percentage to work out where it needs to be, and won’t be governed by the <ul><li> it sits inside. This is the only way to get the effect you are looking for.

    Hmmm, it’s problematic. It’s not very aesthetic.
    I am amazed because it works very well on your site or with night mode.
    7b6a5a8e-ed62-4396-9872-1f183153bf10-image.png

    I see red background too on fa -faw ???
    94c88d8c-1cc2-4e49-9f3f-024b2aec1898-image.png

  • @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    Hmmm, it’s problematic. It’s not very aesthetic.
    I am amazed because it works very well on your site or with night mode.

    The theme switcher you have doesn’t work the same way as the night mode plugin. What you have is a dropdown which is not the same as the toggle selection hence it will behave differently.

    What isn’t aesthetic exactly ?

    @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    I see red background too on fa -faw ???

    Yes, that comes from the below class on line 415 of your CSS in the ACP

    /*VIOLENCE: Couleur du background de l'icone de recherche au survol souris */  
    .navbar-default .btn-link:hover {
        background: red;
    }
    
  • @DownPW another way…

    Remove

    #switcher{
        position: absolute;
        right: 33%;
    }
    

    Add

    .navbar-default {
        height: 50px;
    }
    

    This way, it’s aesthetic…I just set the changes. Let me know what you think.

  • @phenomlab

    It’s better.

    I have just to set space between icon

    For the red, i have disable CSS on line number 415, it’s not that

  • @downpw said in [NODEBB] CSS Style Sheets SelectBox:

    For the red, i have disable CSS on line number 415, it’s not that

    Odd. This will stop it

    #switcher .btn-link:hover {
        background: none !important;
    }
    
  • Yeah It’s good

  • @downpw Great. I think we’re done, yes ?

  • Hmm I search to reducs space between Icon search bar and notification icon

  • @downpw Can you provide a screenshot to explain what you are looking for ?

  • off course @phenomlab
    I search to reducs space between Icon search bar and notification icon

    4c1df3fb-ffe3-4097-b058-f6fd7011f679-image.png

  • @downpw Try

    #switcher {
        margin-right: -15px;
        margin-left: -15px;
    }

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

Related Topics
  • Whitespace fixes in Nodebb

    Solved Customisation
    18
    7 Votes
    18 Posts
    1k Views

    @Panda Just circling back here with something of an update (which I think you’ll like). I’ve completely restructured the ranking system. There are now less ranks, with a higher point threshold to reach them.

    More importantly, if you reload the site, you’ll notice that the ranks are now icons.

    I also removed the “Author” badge, and made this a single icon, which (to me) looks much better.

  • 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

  • Changing Background on NodeBB

    Solved Customisation
    4
    0 Votes
    4 Posts
    635 Views

    @cagatay You’d target the body tag and use the below line of CSS

    background: url(/assets/customcss/backgrounds/default/default.png) no-repeat center center fixed;

    Obviously, you need to change the path to suit where your image is being stored.

    More info around the background property can be found here

    https://www.w3schools.com/cssref/css3_pr_background.php

  • tag icon in front of tags

    Solved Customisation
    5
    3 Votes
    5 Posts
    482 Views

    @phenomlab said in tag icon in front of tags:

    @crazycells Are you using Font Awesome Free ? If so, try this

    span.tag:before { content: "\f02b"; font-family: "Font Awesome 5 Free"; margin-right: 5px; margin-left: 5px; font-weight: 900; }

    yeap, this worked 👍 thanks a lot.

  • [NodeBB] Import custom Font

    Solved Customisation
    12
    3 Votes
    12 Posts
    1k Views

    @cagatay you’ll need to define this in the body tag (or another element if you want greater or more granular targets) - for example

    body { font-family: "Poppins"; font-size: 16px; }

    Essentially, you use the font-size CSS directive.

  • Social icon (Nodebb)

    Solved Customisation
    7
    0 Votes
    7 Posts
    1k Views

    @phenomlab said in Social icon (Nodebb):

    @jac I just tested my theory around using the OG image, and according to the Twitter card validator, it works fine

    73e805e1-997b-41bf-9259-51c5052ca8fc-image.png

    fixed 🙂

  • NodeBB Design help

    Solved Customisation
    8
    2 Votes
    8 Posts
    965 Views

    @riekmedia I’ve applied some new CSS to your site. Can you reload the page and try again ?

    For the record, this is what I added

    #footer { background: #2d343e; border-top: 4px solid #2d343e; font-size: 0.9em; margin-top: 70px; padding: 80px 0 0; position: relative; clear: both; bottom: 0; left: 0; right: 0; z-index: 1000; margin-left: -15px; margin-right: -338px; }

    The /categories page seems a bit messed up, so looking at that currently

    EDIT - issued some override CSS in the CATEGORIES widget

    <!--- CSS fix for overspill on /categories page - DO NOT DELETE --> <style> #footer { margin-right: -45px; } </style>

    That should resolve the /categories issue.

  • NodeBB customisation

    Locked Customisation
    332
    27 Votes
    332 Posts
    78k Views

    @jac Given your departure away from your previous project, I’m going to close this thread… 🙂