Skip to content

[NODEBB] Help for my custom CSS

Solved Customisation
  • @phenomlab

    I see how to change background color, text color, border color but not the progress bar with transition value.

    It’s too fast to see the code on console

    I see this in “element style” :

    transition: width 5450ms linear 0s, background-color 5450ms ease-in 0s;
    

    But I don’t no what to do with this

  • @downpw Seems like it’s contained in this block

    62ca02ad-f55a-42bb-84b5-0d38b3d765a8-image.png

    <div id="alert_button_1643376464937" class="alert alert-dismissable alert-success clearfix animate" component="toaster/toast" timeoutid="172" style="transition: width 5450ms linear 0s, background-color 5450ms ease-in 0s;">
    	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
    	<strong>Welcome Back  phenomlab!</strong>
    	<p>You have successfully logged in</p>	
    </div>
    

    For info, you can actually pause the execution of Javascript as follows

    1. Open Developer tools, Go to Sources tab and keep it ready

    2. Now, go back and perform the actions on the App to get it to the state where it needs to be frozen.

    3. Click on the ‘Pause Script Execution’ button (first button in the list of buttons on the right corner of Sources tab) to pause the page.

    This will force the debugger to pause the execution, meaning you’ll see the below

    41402efc-4993-401d-af1a-9f5a21d06057-image.png

    This will then allow you to expose the elements you need 🙂

  • @phenomlab

    Yeah I test that and I find and modify these code :

    .alert-window .alert {
    
        background-color: black;
        color: aqua;
    }
    
    .alert-window .alert.alert-success {
        color: aqua;
        border-color: aqua;
    }
    
    .alert-window .alert.animate.alert-success::before {
        background-color: red !important;
    }
    
    .alert-window .alert.animate::before {
        width: calc(100% + 50px);
    }
    

    For example, what i want here are just have animate progress bar on red but doesn’t work, she’s black.

    I close the topic on nodebb communauty. no one respond

  • @downpw said in [NODEBB] Help for my custom CSS:

    no one respond
    Only me 😄

    I’ll have a look this weekend to see if I can identify the js class but I do think this is based off another CSS value and an alpha rgba used as an overlay.

  • @phenomlab

    .alert-window .alert.animate.alert-success::before {
        background-color: red !important;
    }
    

    I have test with white background and It seems to work.
    But the red come at the middle/end (maybe a settings CSS transition) :

    alt text

    But with black background, the red is here (we see it at the end) we see nothing at all.

    Seems the background overall the animate effect :

    alt text

  • @downpw I’ve a feeling this night be related to z-index. Try setting with a high value, as this will force the animation to the front.

  • possible to delete border radius at the bottom left and right ?

    9355af8d-d9bf-40d6-abeb-84bc4e95387e-image.png

    Just border radius at the top of the first div and at the last Div bottom ?
    I would like a entirely bloc with four border radius

    Possible ?
    I play with .categories>li, .category>ul>li but it’s not what I want

    I would like to move chat bubbles and WYSIWYG at the left bottom if it’s possible, I tetst with this bit it’s not perfect :

    .taskbar .navbar-nav {
        padding-right: 1840px;
        padding-bottom: 15px;
        position: relative;
        bottom: 25px !important;
    }
    

    Thanks for your help in advance Mark 🙂

  • @DownPW Definitely possible, yes. This will work

    .categories>li, .category>ul>li {
        border-radius: 0px;
    }
    .categories>li:first-of-type {
        border-top-left-radius: 4px;
        border-top-right-radius: 4px;
    }
    .categories>li:last-of-type {
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
    }
    

    Looks like this

    80e68c63-7289-4153-aac8-52a92816074a-image.png

    You could then close the gaps between if you really wanted it as one block

    .categories>li, .category>ul>li {
        border: none;
        margin-top: 0px;
        background: #F5F5F5;
    }
    

    That gives you

    bdb893e3-0a37-44f9-9715-0c26b5ca2146-image.png

  • @phenomlab Great !! Thanks you very much:)

    @phenomlab

    EDIT: Possible to do the same thing on Unread page and Recent page ?

  • Other two things 🙂

    ONE

    I would like to move chat bubbles and WYSIWYG at the left bottom if it’s possible, I test with this bit it’s not perfect :

    .taskbar .navbar-nav {
    padding-right: 1840px;
    padding-bottom: 15px;
    position: relative;
    bottom: 25px !important;
    }
    Thanks for your help in advance Mark 🙂

    TWO

    I have this problem :
    alt text

    The chat windows stays in the background even when I click on it.

    I have zindex on composer and footbar

  • @DownPW said in [NODEBB] Help for my custom CSS:

    @phenomlab Great !! Thanks you very much:)

    @phenomlab

    EDIT: Possible to do the same thing on Unread page and Recent page ?

    This should work

    .category-item:first-of-type {
        border-top-left-radius: 4px;
        border-top-right-radius: 4px;
    }
    .category-item:last-of-type {
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
    }
    
  • @DownPW

    The chat windows stays in the background even when I click on it.

    I have zindex on composer and footbar

    This should fix that

    .chat-modal {
        z-index: 5000;
    }
    
  • @DownPW said in [NODEBB] Help for my custom CSS:

    I would like to move chat bubbles and WYSIWYG at the left bottom if it’s possible, I test with this bit it’s not perfect :

    Can you elaborate a bit more on this in terms of what you are looking to do ?

  • @phenomlab

    chat-modal zindex and border for Unread & recent works !!!
    Thanks Mark 😉

    @phenomlab said in [NODEBB] Help for my custom CSS:

    @DownPW said in [NODEBB] Help for my custom CSS:

    I would like to move chat bubbles and WYSIWYG at the left bottom if it’s possible, I test with this bit it’s not perfect :

    Can you elaborate a bit more on this in terms of what you are looking to do ?

    Just these icons to put on the bottom left:

    f8974ecd-b25c-469e-a7ec-12477a99ad00-image.png

  • @DownPW Try this

    .taskbar.navbar-fixed-bottom {
        right: auto;
        left: 0;
    }
    
  • @phenomlab said in [NODEBB] Help for my custom CSS:

    @DownPW Try this

    .taskbar.navbar-fixed-bottom {
        right: auto;
        left: 0;
    }
    

    Much cleaner than what I had found:

    .taskbar .navbar-nav {
        padding-right: 1840px;
        padding-bottom: 15px;
        position: relative;
        bottom: 25px !important;
    }
    

    I had not found this property by inspecting the code!! I wonder where you found that one 🙂

    I just added left and bottom space :

    .taskbar.navbar-fixed-bottom {
        right: auto;
        left: 10px;
        bottom: 25px;
    }
    

    RESULT:
    111bb445-d4ca-401e-a620-692b23e37f62-image.png

    Much better with footbar !
    This also allows you to leave the right side quiet already occupied by the paging block !

    Thanks my friend 😉

  • How to add icon on categories span time ?

    I will test this code for add Paragraph FA icon for example :

    [component="topic/header"] span.timeago:before {
        content: "\f1dd";
        margin-right: 5px;
        margin-left: 5px;
    }
    

    Result 😞

    311ca192-524a-4c10-bcb6-02e0381b6900-image.png

  • @DownPW that won’t work unless you add a font family to go with it - any Unicode characters typically require an associated font family. Try adding

    font-family: "font awesome 5 free"; to the CSS you already have.

  • @phenomlab

    I have test this :

    [component="topic/header"] span.timeago:before {
        content: "\f1c0";
        font-family: "font awesome 5 free";
        margin-right: 5px;
        margin-left: 5px;
        color: black;
    }
    

    But doesn’t work

    8ed44f06-ca16-4a7c-9a7b-e46a9b6fa339-image.png

  • @DownPW does it work if you change it to
    Font Awesome 5 Free ? Might need to access your site directly to test this as it works for mine and should also work for you.

    One last thing you can try is adding the below into the CSS class - sometimes needed as the FA5 free icons are solid only, therefore may require

    font-weight: 900;

    Let me know how you get on


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 💗

  • MogoDB v6 to v7 upgrade

    Solved Configure
    5
    1 Votes
    5 Posts
    74 Views

    @Panda if you used the Ubuntu PPA, I think this only goes as far as 6.x if I recall correctly.

  • 0 Votes
    5 Posts
    200 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.

  • 0 Votes
    6 Posts
    538 Views

    @cagatay You should ask in the NodeBB forums. Perhaps reference this post

    https://discuss.flarum.org/d/23066-who-read

  • 5 Votes
    9 Posts
    2k Views

    @phenomlab

    Very very great Mark 😉
    Thanks again, It’s perfect now !

    –> I share my code that I modified.

    I’ve added French and English comments.
    If you see things to change Mark, don’t hesitate.

    As usual, all the access paths (FA icons, logo) will have to be modified according to your architecture.

    You can also very well add/remove time slots and change welcome messages to suit your needs.

    Widgets ACP/HTML Widget Footer Logo <center> <br><br> <img id="thislogo" src="path/to/my/image"> </center> Widget Welcome Message <!-- IF loggedIn --> <div class="getUsername">, <a href="/me"><span class="username"></span></a></div> <!-- ENDIF loggedIn --> CSS

    – I added the size font-weight: 900; in the CSS because otherwise some FA icon wasn’t displayed correctly and reduce margin :

    i#thisicon { font-family: "Font Awesome 5 Free"; font-style: normal; margin-right: 8px; font-weight: 900; } .getUsername { padding-top: 20px; text-align: right; } /*Smartphone*/ /*On désactive le message de bienvenue"*/ /*We disable the welcome message"*/ @media all and (max-width: 1024px) { .getUsername { display: none; } } JAVASCRIPT // ------------------------------------------ // Welcome Message avec icône et Footer logo // Welcome Message with icon and Footer logo // ------------------------------------------ $(window).on('action:ajaxify.end', function (data) { //On récupère le username dans le DOM et on l'affiche //We retrieve the username from the DOM and display it function updateUsername() { $('.getUsername .username').text(app.user.username); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', updateUsername); } else { updateUsername(); } //On déclare les variables principales (themessage & thehours) ainsi que les variables secondaires correspondants aux plages horaires //We declare the main variables (themessage & thehours) as well as the secondary variables corresponding to the time slots var thehours = new Date().getHours(); var themessage; var wakeup = ('Good day'); var morning = ('Good morning'); var lunch = ('Bon appétit'); var afternoon = ('Good afternoon'); var drink = ('Cheers'); var evening = ('Good evening'); var night = ('Good night'); var welcome = ('Welcome'); var matched = false; //On peux ici tester le résultat du code en spécifiant une heure (!!!IMPORTANT: Commenter une fois le script testé!!!) //Here we can test the result of the code by specifying a time (!!!IMPORTANT: Comment once the script has been tested!!!) //thehours = 20 //On déclare les plages horaires avec les icones FA et les logos //We declare the time slots with FA icons and logos path if (thehours >= 0 && thehours < 6) { themessage = night; theicon = "fa-solid fa-moon"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 6 && thehours < 8) { themessage = wakeup; theicon = "fa-solid fa-mug-hot"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 8 && thehours < 12) { themessage = morning; theicon = "fa-solid fa-sun"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 12 && thehours < 13) { themessage = lunch; theicon = "fas fa-hamburger"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 13 && thehours < 16) { themessage = afternoon; theicon = "fa-solid fa-sun"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 16 && thehours < 18) { themessage = welcome; theicon = "fa-solid fa-rocket"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 18 && thehours < 19) { themessage = drink; theicon = "fa-solid fa-wine-glass"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 19 && thehours < 20) { themessage = lunch; theicon = "fas fa-pizza-slice"; thelogo = "/assets/customlogo/XXX.png"; } else if (thehours >= 20 && thehours < 24) { themessage = evening; theicon = "fa-solid fa-tv"; thelogo = "/assets/customlogo/XXX.png"; } // Si la page active est un topic, on désactive/cache le message de bienvenue // If the active page is a topic, we deactivate/hide the welcome message if (window.location.href.indexOf("topic") > -1) { console.log("This is a topic, so hide the user welcome message"); $('#thisuser').hide(); } // Sinon, on affiche le message en fonction, l'icone FA et son emplacement (prepend) // Otherwise, we display the message in function, the FA icon and its location (prepend) else { $('.getUsername').prepend("<i id='thisicon' class='" + theicon + "'></i>" + themessage); $("#thislogo").attr("src", thelogo); //$('.getUsername').prepend("<img id='thisicon' src='" + thelogo + "'></>" + themessage); } });
  • CSS codes for fa-info icon

    Solved Customisation
    9
    6 Votes
    9 Posts
    497 Views

    I have just figured it out…

    it can be targeted with text-decoration-color:

    I was mistakenly using color

  • Social icon (Nodebb)

    Solved Customisation
    7
    0 Votes
    7 Posts
    919 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 🙂

  • CSS Help on my Flarum

    Solved Customisation
    5
    2 Votes
    5 Posts
    435 Views

    @mike-jones Yes, you’ll typically see this type of behaviour if there is another style that has higher priority in the sense that yours will be overridden. Using !important will override the higher preference, but should be used sparingly rather than everywhere.

  • 0 Votes
    3 Posts
    689 Views

    @phenomlab many thanks Mark 😁.