Skip to content

What is this bar called?

Solved Customisation
  • @phenomlab

    It seems that code who caused problem :

    /* Menu Brand Header */
    @media (max-width: 767px)  {
      .socialicons {
        display: none !important;
      }
      [data-widget-area=brand-header] .d-none {
        display: inherit !important;
      }
      /* Button topic navbar header color */
      .sticky-tools .btn-ghost-sm i {
        color: var(--bs-alert-info-color) !important;
      }
    }
    

    If i delete :

    [data-widget-area=brand-header] .d-none {
      display: inherit !important;
    }
    

    Reading progress bar is good now but my icons (menu and theme swatch applet) dissapear ๐Ÿ˜ž

    ae3e4cca-116b-4515-acff-ddcc71bc980f-image.png

  • @phenomlab

    It seems that code who caused problem :

    /* Menu Brand Header */
    @media (max-width: 767px)  {
      .socialicons {
        display: none !important;
      }
      [data-widget-area=brand-header] .d-none {
        display: inherit !important;
      }
      /* Button topic navbar header color */
      .sticky-tools .btn-ghost-sm i {
        color: var(--bs-alert-info-color) !important;
      }
    }
    

    If i delete :

    [data-widget-area=brand-header] .d-none {
      display: inherit !important;
    }
    

    Reading progress bar is good now but my icons (menu and theme swatch applet) dissapear ๐Ÿ˜ž

    ae3e4cca-116b-4515-acff-ddcc71bc980f-image.png

    @DownPW Iโ€™d put that CSS back. Itโ€™s set like that for a reason, so youโ€™ll need to be more specific with the target so you can unset.

  • Sorry but I do not understand too much @phenomlab because if I keep this code, the reading bar does not work on smartphone

  • Sorry but I do not understand too much @phenomlab because if I keep this code, the reading bar does not work on smartphone

    @DownPW what I mean is target from higher above so the CSS you apply to the end target is not the same as an existing element.

  • for brand header or for progress bar ?

  • for brand header or for progress bar ?

    @DownPW progress bar.

  • @phenomlab

    I just tested by deleting all the custom CSS code and keeping only the following CSS code

    #pageUp {
      display: inline-block;
      background: var(--bs-body-component-active);
      width: 50px;
      height: 50px;
      text-align: center;
      border-radius: 0.375rem;
      position: fixed;
      bottom: 70px;
      right: 80px;
      transition: background-color .3s, opacity .5s, visibility .5s;
      opacity: 0;
      visibility: hidden;
    }
    #pageUp.show {
      opacity: 1;
      visibility: visible;
      z-index: 10000;
      color: var(--bs-body-navbar-color) !important;
    }
    a#pageUp.show:hover {
      background: var(--bs-dropdown-link-hover-bg);
      border: 1px solid var(--bs-border-color);
    }
    a#pageUp i {
        position: absolute;
        top: 32%;
        left: 35%;
    }
    .reading-meter {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        right: 0;
        height: 2px !important;
    }
     
    div#readingposition {
        background-color: var(--bs-body-navbar) !important;
        color: var(--bs-body-color) !important;
        height: 2px;
        z-index: 1000;
    }
     
    .reading-meter-progress {
        border: 1px solid var(--bs-border-color);
        width: 100%;
    }
     
    .reading-meter-background {
        background: var(--bs-body-bg);
    }
     
    .reading-meter-progress-bar {
        background: var(--bs-progress-bg-bar);
        height: 2px;
    }
    input#percentage {
        display: none;
    }
     
    @media (max-width: 767px) {
        #pageUp {
            bottom: 60px;
            right: 30px;
          }
        }
     
     
     
     /* Menu Brand Header */
    @media (max-width: 767px)  {
      .socialicons {
        display: none !important;
      }
      [data-widget-area=brand-header] .d-none {
        display: inherit !important;
      }
      /* Button topic navbar header color */
      .sticky-tools .btn-ghost-sm i {
        color: var(--bs-alert-info-color) !important;
      }
    }
    

    There is clearly a conflict between his 2 codes.

  • What I donโ€™t understand is that we have the same code and you donโ€™t have this problem.

  • What I donโ€™t understand is that we have the same code and you donโ€™t have this problem.

    @DownPW this is the point I was trying to make about custom CSS.

  • @phenomlab

    I have find, itโ€™s a zoom problem :

    If we zoom in on a page like the home page, even a tiny zoom invisible to the naked eye (which was my case), we end up with the bug described above.

    Solution: zoomed out to maximum

  • @phenomlab

    When I refresh the page or first visit, the Reading bar appear when she shouldnโ€™t appear.
    An idea?

    Same things when I disable all the other custom CSS

    image.png

  • @phenomlab

    When I refresh the page or first visit, the Reading bar appear when she shouldnโ€™t appear.
    An idea?

    Same things when I disable all the other custom CSS

    image.png

    @DownPW Let me have a look.

  • Itโ€™s weird @phenomlab because I tested by removing all the custom css except the reading bar and itโ€™s the same.

    Have you testing without custom css for see that ?

    On custom JS maybe ?

  • Itโ€™s weird @phenomlab because I tested by removing all the custom css except the reading bar and itโ€™s the same.

    Have you testing without custom css for see that ?

    On custom JS maybe ?

    @DownPW I am able to reproduce this, yes. There are some CSS classes missing

    .reading-meter {
        visibility: hidden;
    }
    .reading-meter.show {
        visibility: visible;
    }
    

    Iโ€™ve added these on your DEV server and updated the original post. Sorry ๐Ÿ˜•

  • No problem my friend, I wonโ€™t complain ๐Ÿ˜‰

  • I saw another bug.

    This bug occurs on the home page. No problem on recent page for example

    When you scroll down (to go to the bottom of the page) and then click on the button at the bottom right, it goes up automatically but the reading bar in the header does not disappear

    here a video :

    blink.gif

  • I saw another bug.

    This bug occurs on the home page. No problem on recent page for example

    When you scroll down (to go to the bottom of the page) and then click on the button at the bottom right, it goes up automatically but the reading bar in the header does not disappear

    here a video :

    blink.gif

    @DownPW thanks. Not sure why that happens - Iโ€™ve not noticed it before! Will check.

  • @phenomlab

    just for info, same bug on tags page and groups page

  • @phenomlab

    just for info, same bug on tags page and groups page

    @DownPW Can you test this revised code for me please

    // Scroll to top function
    $(window).on('action:ajaxify.end', function(data) {
        var matched = false;
        $(document).ready(function() {
            var pageUp = $('#pageUp');
            var bar = $('.reading-meter');
            var perWidth = $('.reading-meter').width();
            
            // Main progressbar function
            function pageScroller() {
            var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
            var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
            var scrolled = (winScroll / height) * 100;
    
            document.getElementById("progress-bar").style.width = parseFloat(scrolled).toFixed(0) + "%";
            $('#percentage').val(parseFloat(scrolled).toFixed(0) + "%");
    
            // Prevent the mouse scroll wheel from scrolling down after the pageUp button is clicked
            if ($('#pageUp').is(':focus')) {
            event.preventDefault();
            }
        }
    
            // Bind the pageScroller function to the window's scroll event
            $(window).scroll(function() {
                pageScroller();
            });
    
            // Check the URL and composer visibility separately from the scroll event
            $(window).scroll(function() {
                var thisURL = window.location.href;
                var checkURL = ["topic", "notifications", "user"];
                var isFound = false;
                for (var i = 0, len = checkURL.length; i < len; i++) {
                    if (thisURL.indexOf(checkURL[i]) > -1) {
                        isFound = true;
                        break;
                    }
                }
                if (isFound) {
                    bar.removeClass('show');
                    pageUp.removeClass('show');
                } else {
                    // Exception here is that we don't want the scroll bar to show when the composer is active
                    if ($(window).scrollTop() > 0 && (!$('[component="composer"]').is(":visible"))) {
                        bar.addClass('show');
                        pageUp.addClass('show');
                    } else {
                        bar.removeClass('show');
                        pageUp.removeClass('show');
                    }
                }
            });
    
            // Scroll to top when #pageUp is clicked
            $(document).on("click", "#pageUp", function(e) {
                const firstTopic = $('[component="category/topic"][data-index="0"]');
                if (firstTopic.length) {
                    $("html").animate({
                        scrollTop: 0
                    }, '300');
                    return false;
                } else {
                    ajaxify.refresh();
                }
                $('#progress-bar').width(0);
                pageUp.removeClass('show');
            });
        });
    });
    
  • @DownPW Can you test this revised code for me please

    // Scroll to top function
    $(window).on('action:ajaxify.end', function(data) {
        var matched = false;
        $(document).ready(function() {
            var pageUp = $('#pageUp');
            var bar = $('.reading-meter');
            var perWidth = $('.reading-meter').width();
            
            // Main progressbar function
            function pageScroller() {
            var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
            var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
            var scrolled = (winScroll / height) * 100;
    
            document.getElementById("progress-bar").style.width = parseFloat(scrolled).toFixed(0) + "%";
            $('#percentage').val(parseFloat(scrolled).toFixed(0) + "%");
    
            // Prevent the mouse scroll wheel from scrolling down after the pageUp button is clicked
            if ($('#pageUp').is(':focus')) {
            event.preventDefault();
            }
        }
    
            // Bind the pageScroller function to the window's scroll event
            $(window).scroll(function() {
                pageScroller();
            });
    
            // Check the URL and composer visibility separately from the scroll event
            $(window).scroll(function() {
                var thisURL = window.location.href;
                var checkURL = ["topic", "notifications", "user"];
                var isFound = false;
                for (var i = 0, len = checkURL.length; i < len; i++) {
                    if (thisURL.indexOf(checkURL[i]) > -1) {
                        isFound = true;
                        break;
                    }
                }
                if (isFound) {
                    bar.removeClass('show');
                    pageUp.removeClass('show');
                } else {
                    // Exception here is that we don't want the scroll bar to show when the composer is active
                    if ($(window).scrollTop() > 0 && (!$('[component="composer"]').is(":visible"))) {
                        bar.addClass('show');
                        pageUp.addClass('show');
                    } else {
                        bar.removeClass('show');
                        pageUp.removeClass('show');
                    }
                }
            });
    
            // Scroll to top when #pageUp is clicked
            $(document).on("click", "#pageUp", function(e) {
                const firstTopic = $('[component="category/topic"][data-index="0"]');
                if (firstTopic.length) {
                    $("html").animate({
                        scrollTop: 0
                    }, '300');
                    return false;
                } else {
                    ajaxify.refresh();
                }
                $('#progress-bar').width(0);
                pageUp.removeClass('show');
            });
        });
    });
    

    @phenomlab said in What is this bar called?:

    @DownPW Can you test this revised code for me please

    Yep !
    Done

    Seem to be good for me ๐Ÿ™‚


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
  • NodeBB recent cards customisation

    Solved Customisation
    3
    1
    2 Votes
    3 Posts
    140 Views
    @phenomlab thank you very much for the assistance Mark, massively appreciated as always. The great thing about this is itโ€™s all documented for other NodeBB users that come looking for solutions . Looks far better .
  • Custom html in nodebb to prevent cache

    Unsolved Configure
    18
    2 Votes
    18 Posts
    803 Views
    @Panda Youโ€™ll need to do that with js. With some quick CSS changes, it looks like this [image: 1690796279348-d619844f-fbfe-4cf1-a283-6b7364f6bf18-image.png] The colour choice is still really hard on the eye, but at least you can now read the text
  • Issues with Progress Bar on v3

    Solved Customisation
    48
    1
    14 Votes
    48 Posts
    3k Views
    @Panda You could use the below .page-topic .pagination-block.ready { display: none; }
  • NodeBB v3 Chat Very Slow

    Moved Performance
    47
    11 Votes
    47 Posts
    4k Views
    @DownPW Seems fine.
  • NodeBB: updating Admin details not working

    Solved Configure
    17
    3 Votes
    17 Posts
    745 Views
    @mventures Ok. No issues
  • restarting nodebb on boot

    Unsolved Configure
    3
    1 Votes
    3 Posts
    342 Views
    @eeeee said in restarting nodebb on boot: can I just run nodebb under nodemon for auto restarts? Itโ€™s a better method. Nodemon just looks for file system changes and would effectively die if the server was rebooted meaning youโ€™d have to start it again anyway. Systemd is the defacto standard which is how the operating system interacts in terms of services, scheduled tasks etc.
  • NodeBB v3 and Harmony Theme

    Discussion
    22
    13 Votes
    22 Posts
    2k Views
    Been playing with the user profile page this afternoon. Thought Iโ€™d post a video as Iโ€™m really pleased with how this came out profile-screen-capture.webm
  • NodeBB Design help

    Solved Customisation
    8
    3
    2 Votes
    8 Posts
    983 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.