<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Page control arrows for PWA]]></title><description><![CDATA[<p dir="auto">hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> , when the forum is used as PWA, there is no easy way to navigate between pages…</p>
<p dir="auto">Several days ago, I was reading a post on a forum that mentioned another topic, I have encountered an issue when attempting to return to the original post. So, after reading the linked topic, I had to go to categories page and retrace my steps to locate the topic I was reading initially…</p>
<p dir="auto">Although this can be achieved by page control arrows on destop and mobile browsers, there is no easy way to achieve this on PWA… so I wonder if you can help me adding some page control buttons that appear at the bottom of the page when scrolled up. (maybe it can be integrated to post navigation bar but I believe those buttons should appear in all pages, not only in topics)</p>
<p dir="auto">Here is just some suggestions to distinguish them from other arrows…</p>
<p dir="auto"><img src="https://community.nodebb.org/assets/uploads/files/1711642302236-img_0029-copy.jpeg" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">alternatively the arrows or rewind icons that YouTube uses can be used:</p>
<p dir="auto"><img src="https://community.nodebb.org/assets/uploads/files/1711642378948-img_0030.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://sudonix.org/topic/622/page-control-arrows-for-pwa</link><generator>RSS for Node</generator><lastBuildDate>Thu, 20 Aug 2026 00:32:15 GMT</lastBuildDate><atom:link href="https://sudonix.org/topic/622.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Mar 2024 21:14:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 11:03:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> Right - I’ve put together a base design on this site which will only fire when PWA mode is detected. It looks like the below - note the left and right arrows. They are “basic” but functional <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto"><img src="/assets/uploads/files/1712166816420-ba4e6203-55d8-4462-82d7-cba35ad530da-image.png" alt="ba4e6203-55d8-4462-82d7-cba35ad530da-image.png" class=" img-fluid img-markdown" /></p>
<h4><span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span></h4>
<pre><code>/* START - <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> settings for PWA navigation */
    
.arrow {
  width: 40px;
  height: 40px;
  background-color: var(--bs-body-bg);
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  font-size: 30px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}
.arrow.left, .arrow.right {
    margin-left: 10px;
    margin-right: 10px;
    align-content: center;
    position: fixed;
    top: 50%;
}
.arrow.right {
    position: fixed;
    right: 0;
}

/* END - <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> settings for PWA navigation */
</code></pre>
<h4>JS</h4>
<p dir="auto">The below code does rely on <code>serviceWorker</code> but that’s typically present in all “modern” browsers</p>
<pre><code>$(document).ready(function() {
  // Check if serviceWorker <span class="glossary-wrapper" title="application programming interface" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">API</span></span> is available
  if ('serviceWorker' in navigator) {
    // The browser supports service workers
    console.log('This web app supports service workers.');

    // Check if the app is installed (as PWA)
    if (window.matchMedia('(display-mode: standalone)').matches) {
      console.log('This web app is running as a Progressive Web App.');
      
      // Add HTML for navigation arrows
      $('body').append('&lt;div class="navigation"&gt;&lt;div class="arrow left"&gt;&amp;lt;&lt;/div&gt;&lt;div class="arrow right"&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;');

      // Handle click on left arrow
      $('.arrow.left').click(function() {
        history.back(); // Go back in history
      });

      // Handle click on right arrow
      $('.arrow.right').click(function() {
        history.forward(); // Go forward in history
      });
    } else {
      console.log('This web app is not running as a Progressive Web App.');
    }
  } else {
    console.log('This web browser does not support service workers.');
  }
});
</code></pre>
<p dir="auto">Again, this is basic and more of a POC. Other functionality can be added in a similar way if you’d like it.</p>
]]></description><link>https://sudonix.org/post/8700</link><guid isPermaLink="true">https://sudonix.org/post/8700</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 11:03:49 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Mon, 08 Apr 2024 18:00:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> it is, yes - I think I’ll leave it as there is no specific PWA <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> classes I know of. Well, you could use something like the below, but this means multiple <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> files for different operating systems.</p>
<pre><code>/**
* 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) &amp;&amp; !window.MSStream)
  {
    return  "iOS";
  }

  return  "unknown";
  // return “Android” - one should either handle the unknown or fallback to a specific platform, let’s say Android
}
</code></pre>
<p dir="auto">Once you’re in that rabbit hole, it’s impossible to get out of it.</p>
]]></description><link>https://sudonix.org/post/8724</link><guid isPermaLink="true">https://sudonix.org/post/8724</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Mon, 08 Apr 2024 18:00:28 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Mon, 08 Apr 2024 17:54:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> but I guess “up” is on mobile, right? not PWA specific?</p>
]]></description><link>https://sudonix.org/post/8723</link><guid isPermaLink="true">https://sudonix.org/post/8723</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Mon, 08 Apr 2024 17:54:27 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Mon, 08 Apr 2024 17:54:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> Good point, thanks.</p>
]]></description><link>https://sudonix.org/post/8722</link><guid isPermaLink="true">https://sudonix.org/post/8722</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Mon, 08 Apr 2024 17:54:23 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Mon, 08 Apr 2024 17:53:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> yeah , I know <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":D" alt="😄" /> not necessary, but “up” should be above right/left buttons I guess… that is how people would think…</p>
]]></description><link>https://sudonix.org/post/8721</link><guid isPermaLink="true">https://sudonix.org/post/8721</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Mon, 08 Apr 2024 17:53:57 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Mon, 08 Apr 2024 17:51:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> Ok, but there’s no “scroll-down” <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://sudonix.org/post/8720</link><guid isPermaLink="true">https://sudonix.org/post/8720</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Mon, 08 Apr 2024 17:51:32 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Mon, 08 Apr 2024 17:50:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> yes I used it before but not very frequently… Maybe you should put it above… just because it is more intuitive…<br />
^<br />
&lt;     &gt;<br />
v</p>
]]></description><link>https://sudonix.org/post/8719</link><guid isPermaLink="true">https://sudonix.org/post/8719</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Mon, 08 Apr 2024 17:50:44 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Mon, 08 Apr 2024 17:48:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> 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</p>
<p dir="auto"><img src="/assets/uploads/files/1712598480664-bd290755-5232-4a4c-9801-aa23235c1563-image.png" alt="bd290755-5232-4a4c-9801-aa23235c1563-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The scroll-top button is located on the bottom right.</p>
]]></description><link>https://sudonix.org/post/8718</link><guid isPermaLink="true">https://sudonix.org/post/8718</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Mon, 08 Apr 2024 17:48:17 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Sat, 06 Apr 2024 19:31:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> this works great! thanks a lot. And thanks to your JS codes, it is only activated on PWA, not on mobile…</p>
]]></description><link>https://sudonix.org/post/8717</link><guid isPermaLink="true">https://sudonix.org/post/8717</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Sat, 06 Apr 2024 19:31:19 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 17:44:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> said in <a href="/post/8709">Page control arrows for PWA</a>:</p>
<blockquote>
<p dir="auto">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.</p>
</blockquote>
<p dir="auto">Based on the above point made, I have now disabled the scroll to top button inside topics.</p>
]]></description><link>https://sudonix.org/post/8716</link><guid isPermaLink="true">https://sudonix.org/post/8716</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 17:44:52 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 12:26:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> It is nice to hear that I am able to contribute your website <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
]]></description><link>https://sudonix.org/post/8715</link><guid isPermaLink="true">https://sudonix.org/post/8715</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Thu, 04 Apr 2024 12:26:24 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 12:18:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> 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.</p>
]]></description><link>https://sudonix.org/post/8714</link><guid isPermaLink="true">https://sudonix.org/post/8714</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 12:18:42 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 12:17:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> 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…</p>
]]></description><link>https://sudonix.org/post/8713</link><guid isPermaLink="true">https://sudonix.org/post/8713</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Thu, 04 Apr 2024 12:17:55 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 12:15:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> 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 <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> class I added in the previous post.</p>
]]></description><link>https://sudonix.org/post/8712</link><guid isPermaLink="true">https://sudonix.org/post/8712</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 12:15:17 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 12:14:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> 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…</p>
]]></description><link>https://sudonix.org/post/8711</link><guid isPermaLink="true">https://sudonix.org/post/8711</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Thu, 04 Apr 2024 12:14:37 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 11:46:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> They can be anywhere you’d prefer. You can just change the <code>.arrow.left, .arrow.right</code> 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 <code>top</code> for <code>bottom</code> and set the position in <code>px</code> to ensure the placement is the same no matter which screen estate you have.</p>
<p dir="auto">For example</p>
<pre><code>.arrow.left, .arrow.right {
    margin-left: 10px;
    margin-right: 10px;
    align-content: center;
    position: fixed;
    bottom: 120px;
}
</code></pre>
<p dir="auto">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.</p>
]]></description><link>https://sudonix.org/post/8709</link><guid isPermaLink="true">https://sudonix.org/post/8709</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 11:46:37 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 11:35:28 GMT]]></title><description><![CDATA[<p dir="auto">I have not tested them in details yet, but I will let you know about any bugs for sure <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f44d.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--+1" style="height:23px;width:auto;vertical-align:middle" title="👍" alt="👍" /><img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f3fc.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--skin-tone-3" style="height:23px;width:auto;vertical-align:middle" title="🏼" alt="🏼" /></p>
<p dir="auto">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</p>
]]></description><link>https://sudonix.org/post/8708</link><guid isPermaLink="true">https://sudonix.org/post/8708</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Thu, 04 Apr 2024 11:35:28 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 11:02:32 GMT]]></title><description><![CDATA[<p dir="auto">Fixed. Change the <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> block (original post is also updated) to the below</p>
<pre><code>/* START - <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> settings for PWA navigation */
    
.arrow {
  width: 40px;
  height: 40px;
  background-color: var(--bs-body-bg);
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  font-size: 30px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}
.arrow.left, .arrow.right {
    margin-left: 10px;
    margin-right: 10px;
    align-content: center;
    position: fixed;
    top: 50%;
}
.arrow.right {
    position: fixed;
    right: 0;
}

/* END - <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> settings for PWA navigation */
</code></pre>
]]></description><link>https://sudonix.org/post/8707</link><guid isPermaLink="true">https://sudonix.org/post/8707</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 11:02:32 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 10:42:05 GMT]]></title><description><![CDATA[<p dir="auto">A better explanation of that is below</p>
<p dir="auto"><img src="/assets/uploads/files/1712227248833-5b8a129f-0c22-4165-9b58-29f90c830f19-image.png" alt="image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">As you can see from the developer view, the <code>width: 100%;</code> sits over the top of the topic meaning it cannot be clicked or tapped. A workaround here should be to set <code>z-index: -1;</code> on the <code>navigation</code> class, but whilst that resolves the ordering issue, it means the navigation buttons no longer work as they sit under the content.</p>
]]></description><link>https://sudonix.org/post/8706</link><guid isPermaLink="true">https://sudonix.org/post/8706</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 10:42:05 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 10:24:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> I think I found a bug. If you position a topic between the two navigation arrows on a mobile device, you cannot click that topic until you scroll up or down past the arrows. I noticed this last night and will address it.</p>
]]></description><link>https://sudonix.org/post/8705</link><guid isPermaLink="true">https://sudonix.org/post/8705</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 10:24:06 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Wed, 03 Apr 2024 19:21:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> yeah, I set that quite high at <code>9999</code> which is complete overkill! Try lowering that value to something more sane like <code>1500</code></p>
]]></description><link>https://sudonix.org/post/8704</link><guid isPermaLink="true">https://sudonix.org/post/8704</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Wed, 03 Apr 2024 19:21:53 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Wed, 03 Apr 2024 18:54:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> what would be the <code>z-index</code> value to hide it when the navigation menu options appear?  I believe they should be invisible when those options panels are opened…</p>
]]></description><link>https://sudonix.org/post/8703</link><guid isPermaLink="true">https://sudonix.org/post/8703</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Wed, 03 Apr 2024 18:54:14 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Wed, 03 Apr 2024 18:29:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> thank you very much <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f64f.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--pray" style="height:23px;width:auto;vertical-align:middle" title=":pray:" alt="🙏" /></p>
]]></description><link>https://sudonix.org/post/8702</link><guid isPermaLink="true">https://sudonix.org/post/8702</guid><dc:creator><![CDATA[crazycells]]></dc:creator><pubDate>Wed, 03 Apr 2024 18:29:45 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Thu, 04 Apr 2024 11:03:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> Right - I’ve put together a base design on this site which will only fire when PWA mode is detected. It looks like the below - note the left and right arrows. They are “basic” but functional <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto"><img src="/assets/uploads/files/1712166816420-ba4e6203-55d8-4462-82d7-cba35ad530da-image.png" alt="ba4e6203-55d8-4462-82d7-cba35ad530da-image.png" class=" img-fluid img-markdown" /></p>
<h4><span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span></h4>
<pre><code>/* START - <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> settings for PWA navigation */
    
.arrow {
  width: 40px;
  height: 40px;
  background-color: var(--bs-body-bg);
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  font-size: 30px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}
.arrow.left, .arrow.right {
    margin-left: 10px;
    margin-right: 10px;
    align-content: center;
    position: fixed;
    top: 50%;
}
.arrow.right {
    position: fixed;
    right: 0;
}

/* END - <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> settings for PWA navigation */
</code></pre>
<h4>JS</h4>
<p dir="auto">The below code does rely on <code>serviceWorker</code> but that’s typically present in all “modern” browsers</p>
<pre><code>$(document).ready(function() {
  // Check if serviceWorker <span class="glossary-wrapper" title="application programming interface" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">API</span></span> is available
  if ('serviceWorker' in navigator) {
    // The browser supports service workers
    console.log('This web app supports service workers.');

    // Check if the app is installed (as PWA)
    if (window.matchMedia('(display-mode: standalone)').matches) {
      console.log('This web app is running as a Progressive Web App.');
      
      // Add HTML for navigation arrows
      $('body').append('&lt;div class="navigation"&gt;&lt;div class="arrow left"&gt;&amp;lt;&lt;/div&gt;&lt;div class="arrow right"&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;');

      // Handle click on left arrow
      $('.arrow.left').click(function() {
        history.back(); // Go back in history
      });

      // Handle click on right arrow
      $('.arrow.right').click(function() {
        history.forward(); // Go forward in history
      });
    } else {
      console.log('This web app is not running as a Progressive Web App.');
    }
  } else {
    console.log('This web browser does not support service workers.');
  }
});
</code></pre>
<p dir="auto">Again, this is basic and more of a POC. Other functionality can be added in a similar way if you’d like it.</p>
]]></description><link>https://sudonix.org/post/8700</link><guid isPermaLink="true">https://sudonix.org/post/8700</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Thu, 04 Apr 2024 11:03:49 GMT</pubDate></item><item><title><![CDATA[Reply to Page control arrows for PWA on Wed, 03 Apr 2024 16:18:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/crazycells" aria-label="Profile: crazycells">@<bdi>crazycells</bdi></a> Thanks</p>
]]></description><link>https://sudonix.org/post/8691</link><guid isPermaLink="true">https://sudonix.org/post/8691</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Wed, 03 Apr 2024 16:18:13 GMT</pubDate></item></channel></rss>