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
  • 2 Votes
    1 Posts
    639 Views
    No one has replied
  • Footer bar add center text

    Solved Customisation css
    41
    1
    8 Votes
    41 Posts
    19k Views
    DownPW
    @phenomlab said in Footer bar add center text: div#console-nav-tab Ah ok test with bottom: 0px !important; idem
  • 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
  • answers appearance css code request

    Solved Customisation css answers
    11
    1
    1 Votes
    11 Posts
    4k Views
    phenomlab
    @DownPW yes, because of the modifications that Sudonix uses, you’ll need to tailor to fit your needs.
  • [NodeBB] Import custom Font

    Solved Customisation custom fonts nodebb css
    12
    3 Votes
    12 Posts
    5k Views
    phenomlab
    @cagatay you’ll need to define this in the body tag (or another element if you want greater or more granular targets) - for example body { font-family: "Poppins"; font-size: 16px; } Essentially, you use the font-size CSS directive.
  • Avatar on Topic Header

    Solved Customisation css avatar header
    9
    1
    0 Votes
    9 Posts
    3k Views
    JAC
    @jac said in Avatar on Topic Header: @downpw said in Avatar on Topic Header: Great Plugin I make it a bit cleaner via this CSS code: /*------------------------------------------------------------------*/ /*---------------- nodebb-plugin-browsing-users -----------------*/ /*------------------------------------------------------------------*/ /*Space between the avatar and the RSS icon */ .topic [component="topic/browsing-users"] { margin-bottom: -5px; padding-left: 10px; } /*Space between avatars*/ .pull-left { float: left!important; padding-right: 5px; } Do you have a screenshot of how this looks with the CSS change? Just added this change, thanks @DownPW
  • CSS Help on my Flarum

    Solved Customisation
    5
    2
    2 Votes
    5 Posts
    3k Views
    phenomlab
    @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.