curiousdannii / parchment

The Interactive Fiction web app
https://iplayif.com
MIT License
421 stars 60 forks source link

Configures to enable offline support #137

Open rainbow-bamboo opened 1 year ago

rainbow-bamboo commented 1 year ago

Hey, I made the website installable on both mobile and desktop as a Progressive Web App. It's a more convenient way to get offline support than downloading the html file.

To do this I added:

  1. A web manifest and service worker using PWA Builder as my base.

  2. An install button to index.html with media queries to hide it when appropriate in parchment.css . This install button is optional as browsers that support it will prompt the user when they first load the page.

  3. An icon based on a public domain vector of a sheet of parchment since one is needed for the app draw / task bar.

I hope that this is helpful :)

curiousdannii commented 1 year ago

I am planning to do this, but other things have been priorities first. In the mean time you may be interested in the single file build, which should work fine offline.

rainbow-bamboo commented 1 year ago

I hope that you can use this as a template for when you do :)

When I run my fork locally and click, "Install," it installs it on my devices as an application that launches independently from my browser with offline support.

I think that if it can be bundled with game files directly (like the Inform7 template) it would be a lovely user experience.