Skip to content

Reading Meter Progress bar

Locked Solved Customisation
15 3 6.5k 1
  • wrote on last edited by
    #1

    Hello @phenomlab

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

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

    Thanks

    😉

  • 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
  • Rotating Star Effect

    Solved Let's Build It wordpress css
    17
    12 Votes
    17 Posts
    5k Views
    Hari
    @phenomlab thanks a lot for these, both of the below are awesome! https://codepen.io/bennettfeely/pen/vYLmYJz https://codepen.io/C-L-the-selector/pen/MWZbWBo
  • What is this bar called?

    Solved Customisation nodebb
    92
    1
    36 Votes
    92 Posts
    41k Views
    DownPW
    This is good
  • Issues with Progress Bar on v3

    Solved Customisation
    48
    1
    14 Votes
    48 Posts
    20k Views
    phenomlab
    @Panda You could use the below .page-topic .pagination-block.ready { display: none; }
  • The best css to customize our logo?

    Solved Customisation css
    2
    1 Votes
    2 Posts
    3k Views
    phenomlab
    @Sala This should look better .sidenav .navbar-brand { padding-top: 0.5rem; padding-bottom: 0.5rem; } [image: e5cec20e-be36-4ee8-9129-fd11ad4656ac-image.png] You can increase the top and bottom padding by increasing the values above.
  • who is read NodeBB

    Customisation read post nodebb
    6
    0 Votes
    6 Posts
    3k Views
    phenomlab
    @cagatay You should ask in the NodeBB forums. Perhaps reference this post https://discuss.flarum.org/d/23066-who-read
  • Fontawesome 5

    Unsolved Customisation fonts css nodebb
    14
    1 Votes
    14 Posts
    6k Views
    phenomlab
    @pwsincd hi. Just following up on this thread (I know it’s old) but was curious to understand if it’s still an issue or not ?
  • Bug Navbar CSS

    Solved Customisation navbar css
    3
    1 Votes
    3 Posts
    2k Views
    DownPW
    Not better way. Thanks.
  • [NODEBB] CSS Style Sheets SelectBox

    Locked Solved Customisation css
    112
    24 Votes
    112 Posts
    63k Views
    phenomlab
    @DownPW as discussed in PM Seems to have been solved with the new JS code that you added allowing the version CSS file change!! Cache problem therefore with the JS of the Switcher theme Based on this, I will close this thread and reference https://sudonix.com/topic/207/nodebb-help-for-my-custom-css/27