Skip to content

Reading Meter Progress bar

Locked Solved Customisation
15 3 6.5k 1
  • Hello @phenomlab

    How do you do this reading-meter-progress bar ?

    e2756c2e-4771-46d4-a337-10bbe9c98b0a-image.png

    Thanks

    😉

    wrote on last edited by phenomlab
    #2

    @downpw Add this to your custom JS

    $(window).on('action:ajaxify.end', function (data) {
        // Main progressbar function
        window.onscroll = function () { myFunction() };
        function myFunction() {
            var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
            var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
            var scrolled = (winScroll / height) * 100;
            document.getElementById("myBar").style.width = scrolled + "%";
        }
    });
    

    Add this into Custom Header

    <div class="reading-meter">
      <div class="reading-meter-progress">
        <div class="reading-meter-progress-bar" id="myBar"></div>
      </div> 
    </div>
    

    Sample CSS

    .reading-meter {
      position: fixed;
      top: 0px !important;
      z-index: 1111;
      width: 100%;
      background-color: #000000;
    }
    
    .reading-meter-progress {
    width: 100%;
    height: 3px;  z-index: 1111;
    background: #ffffff;
    }
    
    .reading-meter-progress-bar {
    height: 3px;
    background-color:#dddddd;
    width: 0%;
    }
    
  • phenomlab phenomlab has marked this topic as solved on
  • wrote on last edited by phenomlab
    #3

    @phenomlab said in Reading Meter Progress bar:

    Add this into Custom Header
    <div class=“reading-meter”>
    <div class=“reading-meter-progress”>
    <div class=“reading-meter-progress-bar” id=“myBar”></div>
    </div>

    Sample CSS
    .reading-meter {
    position: fixed;
    top: 0px !important;
    z-index: 1111;
    width: 100%;
    background-color: #000000;
    }

    .reading-meter-progress {
    width: 100%;
    height: 3px; z-index: 1111;
    background: #ffffff;
    }

    .reading-meter-progress-bar {
    height: 3px;
    background-color:#dddddd;
    width: 0%;
    }

    .reading-meter {
    visibility: hidden;
    }

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

    I allow myself a correction:

    Add this into Custom Header

    <div class="reading-meter">
      <div class="reading-meter-progress">
        <div class="reading-meter-progress-bar" id="myBar"></div>
      </div> 
    </div>
    

    Sample CSS

    .reading-meter {
      position: fixed;
      top: 0px !important;
      z-index: 1111;
      width: 100%;
      background-color: #000000;
    }
    
    .reading-meter-progress {
    width: 100%;
    height: 3px;  z-index: 1111;
    background: #ffffff;
    }
    
    .reading-meter-progress-bar {
    height: 3px;
    background-color:#dddddd;
    width: 0%;
    }
    
  • @phenomlab said in Reading Meter Progress bar:

    Add this into Custom Header
    <div class=“reading-meter”>
    <div class=“reading-meter-progress”>
    <div class=“reading-meter-progress-bar” id=“myBar”></div>
    </div>

    Sample CSS
    .reading-meter {
    position: fixed;
    top: 0px !important;
    z-index: 1111;
    width: 100%;
    background-color: #000000;
    }

    .reading-meter-progress {
    width: 100%;
    height: 3px; z-index: 1111;
    background: #ffffff;
    }

    .reading-meter-progress-bar {
    height: 3px;
    background-color:#dddddd;
    width: 0%;
    }

    .reading-meter {
    visibility: hidden;
    }

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

    I allow myself a correction:

    Add this into Custom Header

    <div class="reading-meter">
      <div class="reading-meter-progress">
        <div class="reading-meter-progress-bar" id="myBar"></div>
      </div> 
    </div>
    

    Sample CSS

    .reading-meter {
      position: fixed;
      top: 0px !important;
      z-index: 1111;
      width: 100%;
      background-color: #000000;
    }
    
    .reading-meter-progress {
    width: 100%;
    height: 3px;  z-index: 1111;
    background: #ffffff;
    }
    
    .reading-meter-progress-bar {
    height: 3px;
    background-color:#dddddd;
    width: 0%;
    }
    
    wrote on last edited by
    #4

    @downpw good spot. Thanks. Amended original post

  • Hello @phenomlab

    How do you do this reading-meter-progress bar ?

    e2756c2e-4771-46d4-a337-10bbe9c98b0a-image.png

    Thanks

    😉

    wrote on last edited by
    #5

    @downpw said in Reading Meter Progress bar:

    Hello @phenomlab

    How do you do this reading-meter-progress bar ?

    e2756c2e-4771-46d4-a337-10bbe9c98b0a-image.png

    Thanks

    😉

    I do like the look of this 👍🏻🤝

  • JAC JAC

    @downpw said in Reading Meter Progress bar:

    Hello @phenomlab

    How do you do this reading-meter-progress bar ?

    e2756c2e-4771-46d4-a337-10bbe9c98b0a-image.png

    Thanks

    😉

    I do like the look of this 👍🏻🤝

    wrote on last edited by
    #6

    @jac thanks !

  • wrote on last edited by
    #7

    @phenomlab

    it’s very great for continuous reading without pagination

  • @phenomlab

    it’s very great for continuous reading without pagination

    wrote on last edited by
    #8

    @downpw yes, it should auto update the progress based on the page length.

  • @downpw yes, it should auto update the progress based on the page length.

    wrote on last edited by
    #9

    @phenomlab liking the look of this although unsure if it was in blue if it would clash with the nav bar, although may fit in well on top of the yellow title block.

  • JAC JAC

    @phenomlab liking the look of this although unsure if it was in blue if it would clash with the nav bar, although may fit in well on top of the yellow title block.

    wrote on last edited by
    #10

    @jac you could use the yellow I suppose ?

  • @jac you could use the yellow I suppose ?

    wrote on last edited by
    #11

    @phenomlab very true, I don’t suppose white would really work out so yellow could be used yes 😁.

  • JAC JAC

    @phenomlab very true, I don’t suppose white would really work out so yellow could be used yes 😁.

    wrote on last edited by
    #12

    @jac said in Reading Meter Progress bar:

    @phenomlab very true, I don’t suppose white would really work out so yellow could be used yes 😁.

    I’m still not at home to do this, I wouldn’t even know the steps to do it I’m afraid 😆.

  • JAC JAC

    @jac said in Reading Meter Progress bar:

    @phenomlab very true, I don’t suppose white would really work out so yellow could be used yes 😁.

    I’m still not at home to do this, I wouldn’t even know the steps to do it I’m afraid 😆.

    wrote on last edited by
    #13

    @jac Steps are here 🙂

  • @jac Steps are here 🙂

    wrote on last edited by
    #14

    @phenomlab said in Reading Meter Progress bar:

    @jac Steps are here 🙂

    Many thanks will hopefully be able to achieve this once home tomorrow!

  • phenomlab phenomlab referenced this topic on
  • phenomlab phenomlab forked this topic on
  • wrote on last edited by
    #15

    For anyone else following this thread, please see
    https://sudonix.com/topic/467/issues-with-progress-bar-on-v3

  • phenomlab phenomlab has marked this topic as solved on
  • phenomlab phenomlab locked this topic on
  • phenomlab phenomlab referenced this topic on

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