Skip to content

Page control arrows for PWA

Solved Customisation
27 2 7.5k 1
  • I have not tested them in details yet, but I will let you know about any bugs for sure 👍🏼

    Additionally, is there any reason that they are in the middle but not close to the bottom? That is usually where the fingers will be

    @crazycells They can be anywhere you’d prefer. You can just change the .arrow.left, .arrow.right class to move to the preferred position. Currently, it’s set at 50%, but can be any value you want to reach the desired position. In this case, it would probably be better to substitute top for bottom and set the position in px to ensure the placement is the same no matter which screen estate you have.

    For example

    .arrow.left, .arrow.right {
        margin-left: 10px;
        margin-right: 10px;
        align-content: center;
        position: fixed;
        bottom: 120px;
    }
    

    That now means the page scroller (the button that appears bottom right) will be in the way, although on thinking about it, we already have a page navigation when you are in the topic, so no point in having another. That would be a minor alteration to the scroll top function to have it not appear on posts.

  • @crazycells They can be anywhere you’d prefer. You can just change the .arrow.left, .arrow.right class to move to the preferred position. Currently, it’s set at 50%, but can be any value you want to reach the desired position. In this case, it would probably be better to substitute top for bottom and set the position in px to ensure the placement is the same no matter which screen estate you have.

    For example

    .arrow.left, .arrow.right {
        margin-left: 10px;
        margin-right: 10px;
        align-content: center;
        position: fixed;
        bottom: 120px;
    }
    

    That now means the page scroller (the button that appears bottom right) will be in the way, although on thinking about it, we already have a page navigation when you are in the topic, so no point in having another. That would be a minor alteration to the scroll top function to have it not appear on posts.

    @phenomlab thanks, yes, I will move them close to the menu bar, but I was asking in case there is a technical detail I was not aware…

  • @phenomlab thanks, yes, I will move them close to the menu bar, but I was asking in case there is a technical detail I was not aware…

    @crazycells No, none that I am aware of - move them to where you’d prefer. In fact, I took your advice and moved them on Sudonix, which uses the CSS class I added in the previous post.

  • @crazycells No, none that I am aware of - move them to where you’d prefer. In fact, I took your advice and moved them on Sudonix, which uses the CSS class I added in the previous post.

    @phenomlab yes, I believe this looks more natural, they are closer to the fingers and on the top of these, it is not blocking any content in the middle of the screen…

  • @phenomlab yes, I believe this looks more natural, they are closer to the fingers and on the top of these, it is not blocking any content in the middle of the screen…

    @crazycells Exactly. i’m going to hire you as a design guru! You have some great ideas on what Sudonix should look like and I’m grateful for any contribution that enhances what I hope is already a good experience.

  • @crazycells Exactly. i’m going to hire you as a design guru! You have some great ideas on what Sudonix should look like and I’m grateful for any contribution that enhances what I hope is already a good experience.

    @phenomlab It is nice to hear that I am able to contribute your website 😄

  • @crazycells They can be anywhere you’d prefer. You can just change the .arrow.left, .arrow.right class to move to the preferred position. Currently, it’s set at 50%, but can be any value you want to reach the desired position. In this case, it would probably be better to substitute top for bottom and set the position in px to ensure the placement is the same no matter which screen estate you have.

    For example

    .arrow.left, .arrow.right {
        margin-left: 10px;
        margin-right: 10px;
        align-content: center;
        position: fixed;
        bottom: 120px;
    }
    

    That now means the page scroller (the button that appears bottom right) will be in the way, although on thinking about it, we already have a page navigation when you are in the topic, so no point in having another. That would be a minor alteration to the scroll top function to have it not appear on posts.

    @phenomlab said in Page control arrows for PWA:

    That now means the page scroller (the button that appears bottom right) will be in the way, although on thinking about it, we already have a page navigation when you are in the topic, so no point in having another.

    Based on the above point made, I have now disabled the scroll to top button inside topics.

  • @phenomlab said in Page control arrows for PWA:

    That now means the page scroller (the button that appears bottom right) will be in the way, although on thinking about it, we already have a page navigation when you are in the topic, so no point in having another.

    Based on the above point made, I have now disabled the scroll to top button inside topics.

    @phenomlab this works great! thanks a lot. And thanks to your JS codes, it is only activated on PWA, not on mobile…

  • @phenomlab this works great! thanks a lot. And thanks to your JS codes, it is only activated on PWA, not on mobile…

    @crazycells Not sure if you are using the scroll-top function, but if you are, I have enhanced the position of the button and re-sized it to match the forward and back arrows as below

    bd290755-5232-4a4c-9801-aa23235c1563-image.png

    The scroll-top button is located on the bottom right.

  • @crazycells Not sure if you are using the scroll-top function, but if you are, I have enhanced the position of the button and re-sized it to match the forward and back arrows as below

    bd290755-5232-4a4c-9801-aa23235c1563-image.png

    The scroll-top button is located on the bottom right.

    @phenomlab yes I used it before but not very frequently… Maybe you should put it above… just because it is more intuitive…
    ^
    < >
    v

  • @phenomlab yes I used it before but not very frequently… Maybe you should put it above… just because it is more intuitive…
    ^
    < >
    v

    @crazycells Ok, but there’s no “scroll-down” 🙂

  • @crazycells Ok, but there’s no “scroll-down” 🙂

    @phenomlab yeah , I know 😄 not necessary, but “up” should be above right/left buttons I guess… that is how people would think…

  • @phenomlab yeah , I know 😄 not necessary, but “up” should be above right/left buttons I guess… that is how people would think…

    @crazycells Good point, thanks.

  • @crazycells Ok, but there’s no “scroll-down” 🙂

    @phenomlab but I guess “up” is on mobile, right? not PWA specific?

  • @phenomlab but I guess “up” is on mobile, right? not PWA specific?

    @crazycells it is, yes - I think I’ll leave it as there is no specific PWA CSS classes I know of. Well, you could use something like the below, but this means multiple CSS files for different operating systems.

    /**
    * Determine the mobile operating system.
    * This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
    *
    * @returns {String}
    */
    
    function getMobileOperatingSystem()
    {
      var userAgent = navigator.userAgent || navigator.vendor || window.opera;
      // Windows Phone must come first because its UA also contains "Android"
      if (/windows phone/i.test(userAgent))
      {
        return  "Windows Phone";
      }
    
      if (/android/i.test(userAgent))
      {
        return  "Android";
      }
    
      if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream)
      {
        return  "iOS";
      }
    
      return  "unknown";
      // return “Android” - one should either handle the unknown or fallback to a specific platform, let’s say Android
    }
    

    Once you’re in that rabbit hole, it’s impossible to get out of it.


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
  • Custom Page - nodebb

    Solved Customisation custom-pages nodebb
    13
    2
    5 Votes
    13 Posts
    132 Views
    I’m happy to see this
  • What plugins are being used here on Sudonix?

    Solved General nodebb plugins development
    6
    5 Votes
    6 Posts
    1k Views
    @Roki-Antic Welcome! This site isn’t running Persona, but Harmony - a very heavily customised version at that. Do you have a URL where your site is currently located that is publicly accessible? Feel free to PM this info if you do not want to disclose here. Happy to help with any customisation needs.
  • Nodebb icon on google page

    Solved Customisation nodebb
    9
    1
    4 Votes
    9 Posts
    2k Views
    @Panda It’s been raised multiple times, but only for the open source version, and not hosted.
  • nodebb-plugin-custom-pages

    Solved Customisation plugin custom-pages
    5
    2
    3 Votes
    5 Posts
    3k Views
    @DownPW it’s possible, yes, but you may inadvertently end up targeting other elements using the same class which of course isn’t desired. Can you provide a link in DM for me to review?
  • Top Ranked Forums

    Chitchat nodebb top ranked
    9
    1
    3 Votes
    9 Posts
    2k Views
    The real issue here is that most people consider forums to be “dead” in the sense that nobody uses them anymore, and social media groups have taken their place. Their once dominant stance in the 90’s and early 00’s will never be experienced again, but having said that, there are a number of forums that did in fact survive the social media onslaught, and still enjoy a large user base. Forums tend to be niche. One that immediately sticks out is Reddit - despite looking like it was designed in the 80s, it still has an enormous user base. Another is Stack Overflow, which needs no introduction. The key to any forum is the content it offers, and the more people whom contribute in terms of posting , the more popular and widely respected it becomes as a reliable source of information. Forums are still intensely popular with gamers, alongside those that offer tips on hacking etc.
  • Blinking text Effect

    Customisation nodebb text effect css
    3
    5 Votes
    3 Posts
    953 Views
    @phenomlab I love it too @phenomlab said in Blinking text Effect: Has that “broken neon light” look that you see in films. It’s exactly that, kind of old neon signs of bar or pubs a bit cyberpunk too
  • what does sound/mute button do?

    Solved Customisation nodebb
    20
    1
    9 Votes
    20 Posts
    3k Views
    @crazycells Yeah, looking at the plugin itself, that’s a hard coded limit [image: 1653494282106-3d6dbc10-185b-4102-9470-0c2731a10750-image.png] I’ll probably remove that… eventually…
  • NodeBB - Created pages not found?

    General
    20
    3 Votes
    20 Posts
    4k Views
    @jac Exactly. Hard point to argue.