Skip to content

chat list navbar

Solved Customisation
30 2 6.4k 1
  • Hi @phenomlab

    After upgrade of nodebb 3.2.1, I have small bugs that I can’t solve

    1 & 2
    7b4b59be-44e6-4624-b29c-a14b72c9a5fd-image.png

    Can you help me with that ?

    3
    I search css class and css class hover for new button “Mark all as read” and “All Chats” on chat navbar:

    236e383d-0bd4-4d27-acde-37118d13f567-image.png

    Thanks in advance

  • Hi @phenomlab

    After upgrade of nodebb 3.2.1, I have small bugs that I can’t solve

    1 & 2
    7b4b59be-44e6-4624-b29c-a14b72c9a5fd-image.png

    Can you help me with that ?

    3
    I search css class and css class hover for new button “Mark all as read” and “All Chats” on chat navbar:

    236e383d-0bd4-4d27-acde-37118d13f567-image.png

    Thanks in advance

    @DownPW said in chat list navbar:

    Can you help me with that ?

    Looks like you want to get rid of the border in the highlighted area on the right image, and show the border on the left image ?

    @DownPW said in chat list navbar:

    I search css class and css class hover for new button “Mark all as read” and “All Chats” on chat navbar:

    For “Mark all as read” you should be able to target

    btn btn-secondary mark-all-read and btn btn-secondary mark-all-read:hover respectively

    Targeting “All chats” is much harder, as it shares the btn btn-secondary class which is used in multiple places. For it to work how I wanted it, I needed to be more specific in the target, so had to use

    .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child) {
        /* your CSS here */
    }
    
  • @DownPW said in chat list navbar:

    Can you help me with that ?

    Looks like you want to get rid of the border in the highlighted area on the right image, and show the border on the left image ?

    @DownPW said in chat list navbar:

    I search css class and css class hover for new button “Mark all as read” and “All Chats” on chat navbar:

    For “Mark all as read” you should be able to target

    btn btn-secondary mark-all-read and btn btn-secondary mark-all-read:hover respectively

    Targeting “All chats” is much harder, as it shares the btn btn-secondary class which is used in multiple places. For it to work how I wanted it, I needed to be more specific in the target, so had to use

    .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child) {
        /* your CSS here */
    }
    

    @phenomlab said in chat list navbar:

    @DownPW said in chat list navbar:

    Can you help me with that ?

    Looks like you want to get rid of the border in the highlighted area on the right image

    in fact I would like the menu not to overflow on the navbar because it was not the case before

    @phenomlab said in chat list navbar:

    and show the border on the left image

    Yes exactly 🙂

    @phenomlab said in chat list navbar:

    For “Mark all as read” you should be able to target
    btn btn-secondary mark-all-read and btn btn-secondary mark-all-read:hover respectively
    Targeting “All chats” is much harder, as it shares the btn btn-secondary class which is used in multiple places. For it to work how I wanted it, I needed to be more specific in the target, so had to use

    I wil test that and let you know

  • @phenomlab said in chat list navbar:

    @DownPW said in chat list navbar:

    Can you help me with that ?

    Looks like you want to get rid of the border in the highlighted area on the right image

    in fact I would like the menu not to overflow on the navbar because it was not the case before

    @phenomlab said in chat list navbar:

    and show the border on the left image

    Yes exactly 🙂

    @phenomlab said in chat list navbar:

    For “Mark all as read” you should be able to target
    btn btn-secondary mark-all-read and btn btn-secondary mark-all-read:hover respectively
    Targeting “All chats” is much harder, as it shares the btn btn-secondary class which is used in multiple places. For it to work how I wanted it, I needed to be more specific in the target, so had to use

    I wil test that and let you know

    @DownPW said in chat list navbar:

    in fact I would like the menu not to overflow on the navbar because it was not the case before

    Ah, that makes sense. You can probably do that with a simple margin CSS command. Is your test instance up ?

  • @DownPW said in chat list navbar:

    in fact I would like the menu not to overflow on the navbar because it was not the case before

    Ah, that makes sense. You can probably do that with a simple margin CSS command. Is your test instance up ?

  • @phenomlab said in chat list navbar:

    btn btn-secondary mark-all-read and btn btn-secondary mark-all-read:hover respectively

    Not work with that for example:

    .btn .btn-secondary .mark-all-read {
    	color: red !important;
    }
    
    .btn .btn-secondary .mark-all-read:hover {
      background: #212427;
    	color: #ccc !important;
    }
    

    And .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child):telephone_receiver:

    not too

  • @phenomlab said in chat list navbar:

    @DownPW said in chat list navbar:

    Can you help me with that ?

    Looks like you want to get rid of the border in the highlighted area on the right image

    in fact I would like the menu not to overflow on the navbar because it was not the case before

    @phenomlab said in chat list navbar:

    and show the border on the left image

    Yes exactly 🙂

    @phenomlab said in chat list navbar:

    For “Mark all as read” you should be able to target
    btn btn-secondary mark-all-read and btn btn-secondary mark-all-read:hover respectively
    Targeting “All chats” is much harder, as it shares the btn btn-secondary class which is used in multiple places. For it to work how I wanted it, I needed to be more specific in the target, so had to use

    I wil test that and let you know

    @DownPW said in chat list navbar:

    in fact I would like the menu not to overflow on the navbar because it was not the case before

    That’s being caused by deliberate negative padding. This will fix it

    .chat-list {
        margin-top: 0px;
    }
    
  • @phenomlab said in chat list navbar:

    btn btn-secondary mark-all-read and btn btn-secondary mark-all-read:hover respectively

    Not work with that for example:

    .btn .btn-secondary .mark-all-read {
    	color: red !important;
    }
    
    .btn .btn-secondary .mark-all-read:hover {
      background: #212427;
    	color: #ccc !important;
    }
    

    And .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child):telephone_receiver:

    not too

    @DownPW said in chat list navbar:

    Not work with that for example:

    Seems to work for me on your site, but (sorry), it should be a.btn .btn-secondary .mark-all-read

    e38ef02b-22df-4994-ab1d-ec2060cd9268-image.png

  • yeah great…

    Can you test All chats button hover ?
    Because .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child):hover not work

  • yeah great…

    Can you test All chats button hover ?
    Because .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child):hover not work

    @DownPW Works for me ?

    5f58e3d6-162b-447d-9e78-4e6dc216e088-image.png

  • @DownPW Works for me ?

    5f58e3d6-162b-447d-9e78-4e6dc216e088-image.png

    @phenomlab

    Yeah good for “Mark all as read” but not All chats button:

    6181d418-dc6e-446f-b755-08d031c98cc5-image.png

    @DownPW said in chat list navbar:

    yeah great…

    Can you test All chats button hover ?
    Because .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child):hover not work

  • @phenomlab

    Yeah good for “Mark all as read” but not All chats button:

    6181d418-dc6e-446f-b755-08d031c98cc5-image.png

    @DownPW said in chat list navbar:

    yeah great…

    Can you test All chats button hover ?
    Because .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child):hover not work

    @DownPW said in chat list navbar:

    Yeah good for “Mark all as read” but not All chats button:

    Yes, sadly, that element is in use in several other places. You could target it directly, but it will also mean changing it in multiple places which won’t be the desired effect. The most effective way would be to target a div ID, but you’d need something like jQuery to target that specific element and add an ID to it.

  • @DownPW said in chat list navbar:

    Yeah good for “Mark all as read” but not All chats button:

    Yes, sadly, that element is in use in several other places. You could target it directly, but it will also mean changing it in multiple places which won’t be the desired effect. The most effective way would be to target a div ID, but you’d need something like jQuery to target that specific element and add an ID to it.

    @phenomlab

    hmm hard for just an effect.
    It’s a problem for my dark themes

    In sudonix I see this :

    13e5e457-c920-4cf7-a005-34a1b48a1336-image.png

    and Hover:
    c31a6afc-1152-4330-ae47-f702d1250237-image.png

    I think it’s a better way, how achieve this effect (with different color) ?

  • @phenomlab

    hmm hard for just an effect.
    It’s a problem for my dark themes

    In sudonix I see this :

    13e5e457-c920-4cf7-a005-34a1b48a1336-image.png

    and Hover:
    c31a6afc-1152-4330-ae47-f702d1250237-image.png

    I think it’s a better way, how achieve this effect (with different color) ?

    @DownPW Ah, yes, I remember this one now - it was a nightmare to target, and I landed up using the pseudo class which unfortunately does include the border, but it’s subtle enough to still look good

    Try this

    .btn-group.btn-group-justified:hover {
        /* Your css here */
    }
    
  • I resolve with this

    .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child) {
        color: #ccc;
    }
    
    a.btn.btn-secondary:hover {
      color: #ccc;
      background: #212427;
    }
    
    .caret {
        color: #000;
    }
    
    a.btn.btn-secondary.mark-all-read {
    	color: #ccc !important;
    }
    
    a.btn.btn-secondary.mark-all-read:hover {
      background: #212427;
    	color: #ccc !important;
    }
    
  • DownPWundefined DownPW has marked this topic as solved on
  • @phenomlab

    I have a problem on my themes.

    Example I Have this on my css files :

    .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child) {
        color: var(--first-color) !important;
    }
    

    But this code is not taken into account 😞

    7880cacd-d49c-4fda-99bc-bddc5967b06c-image.png

    if i change in dev console (in live) it’s ok

    Can you help me with that ?

  • Maybe a problem with theme switcher & nodeBB 3.2.1 ?

  • Maybe a problem with theme switcher & nodeBB 3.2.1 ?

    @DownPW no, this works independently of NodeBB as it uses jQuery and CSS. The issue you have is the below

    var(--first-color)
    

    In CSS, var is a variable defined at root level and probably doesn’t exist in your CSS file. Essentially, it’s LESS. If you change the line so it looks (for example) like the below, it will probably then work

    #ffffff;
    

    The newer version of the theme switcher uses LESS variables as it’s more efficient but if these don’t exist then it looks like it’s being ignored when I’m fact it just returns a null value.

  • yes i know for var all the theme is coded with var.

    It’s the same things with #XXXXXX

  • @phenomlab

    I have a problem on my themes.

    Example I Have this on my css files :

    .btn-group>.btn:last-child:not(:first-child), .btn-group>.dropdown-toggle:not(:first-child) {
        color: var(--first-color) !important;
    }
    

    But this code is not taken into account 😞

    7880cacd-d49c-4fda-99bc-bddc5967b06c-image.png

    if i change in dev console (in live) it’s ok

    Can you help me with that ?

    @DownPW this sounds more like a caching issue to me. Do you get the same thing in an incognito session ?


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • 3 Votes
    6 Posts
    2k Views
    @kadir-ay-0 marking as resolved based on https://community.nodebb.org/topic/17109/manual-build-a-night-mode-for-harmony/5 Please do not raise requests in two places - here and the NodeBB forums. All this does is create unnecessary load for both parties.
  • CSS border gradients

    Blog gradient border css
    10
    3
    2 Votes
    10 Posts
    2k Views
    ah f5 need
  • hover link effect

    Solved Customisation css link hover
    18
    1
    6 Votes
    18 Posts
    3k Views
    @DownPW Looking at the underlying code, class start is being added on hover by jQuery in this function document.querySelectorAll(".button-gradient, .button-transparent").forEach((button) => { const style = getComputedStyle(button); const lines = document.createElement("div"); lines.classList.add("lines"); const groupTop = document.createElement("div"); const groupBottom = document.createElement("div"); const svg = createSVG( button.offsetWidth, button.offsetHeight, parseInt(style.borderRadius, 10) ); groupTop.appendChild(svg); groupTop.appendChild(svg.cloneNode(true)); groupTop.appendChild(svg.cloneNode(true)); groupTop.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); lines.appendChild(groupTop); lines.appendChild(groupBottom); button.appendChild(lines); button.addEventListener("pointerenter", () => { button.classList.add("start"); }); svg.addEventListener("animationend", () => { button.classList.remove("start"); }); }); }) The CSS for start is below .button-gradient.start .lines svg, .button-transparent.start .lines svg { animation: stroke 0.3s linear; } And this is the corresponding keyframe @keyframes stroke { 30%, 55% { opacity: 1; } 100% { stroke-dashoffset: 5; opacity: 0; } } It’s using both CSS and SVG, so might not be a simple affair to replicate without the SVG files.
  • Changing the look of recent cards

    Announcements cards css
    1
    1
    2 Votes
    1 Posts
    631 Views
    No one has replied
  • answers appearance css code request

    Solved Customisation css answers
    11
    1
    1 Votes
    11 Posts
    2k Views
    @DownPW yes, because of the modifications that Sudonix uses, you’ll need to tailor to fit your needs.
  • Adjusting the size of boxes in posts-list class

    Solved Customisation nodebb
    3
    3 Votes
    3 Posts
    1k Views
    @phenomlab thanks a lot, this combination works best .posts-list .posts-list-item .content { overflow: auto; max-height: 600px; }
  • [NODEBB] Help for my custom CSS

    Solved Customisation nodebb css bugfix
    237
    49 Votes
    237 Posts
    80k Views
    @baris said: You should change your selectors so it doesn’t look at the entire document. You probably only want to apply fancybox to stuff inside the #content element which is what changes when the user navigates around the page. So use $('#content a').... for your selectors then the forum logo in the header won’t be selected. I modified the JS Fancybox code now and this code and it seem better // --------------------------------------------- // Fancybox Media Reader (Without Website Logo) // --------------------------------------------- if (top.location.pathname !== '/login') { $(window).on('action:posts.loaded', function(data) { console.log("Polling DOM for lazyLoaded images to apply Fancybox"); $(document).ready(function() { $('#content a').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); }); }); }); } if (top.location.pathname !== '/login') { $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { $('#content a').not('.logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); data.preventDefault() // Strip out the images contained inside blockquotes as this looks nasty :) $('#content blockquote img').remove(); }); Fancybox.bind( '#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]', { groupAll: true, } ); }); }); } // Chat fancybox - fires when chat module loaded and AJAX calls new chat $(document).ready(function() { $(window).on('action:chat.loaded', function(data) { // >>> Se limiter au contenu principal uniquement <<< $('#content img').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { var newHref = $(this).attr("src"); $(this).wrap("<a class='fancybox' href='" + newHref + "'/>"); $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); data.preventDefault(); // Strip out the images contained inside blockquotes as this looks nasty :) $('#content blockquote img').remove(); }); Fancybox.bind( '#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]', { groupAll: true, } ); }); }); For the logo, I must use overflow: visible !important; on [component="brand/logo"] /* --- Logo --- */ [component="brand/logo"] { max-height: 50px; width: auto; height: auto; max-width: 100%; display: block; object-fit: contain; object-position: left center; overflow: visible !important; } Better result !!
  • Bug Navbar CSS

    Solved Customisation navbar css
    3
    1 Votes
    3 Posts
    957 Views
    Not better way. Thanks.