From fd164b60645e1440a75aab9b8885ad77dca036b5 Mon Sep 17 00:00:00 2001 From: Diamantis Sellis Date: Fri, 14 Mar 2025 09:17:28 +0100 Subject: [PATCH 1/6] Add manifest json for PWA installation Add support for Progressive Web App (PWA) installation. * **manifest.json**: Add `manifest.json` file with PWA settings including name, short_name, start_url, display, background_color, theme_color, and icons. * **base.html**: Add references to `manifest.json` and `service-worker.js` in the `` section. Add script to register service worker. * **service-worker.js**: Add `service-worker.js` file to support PWA installation with basic caching strategies for offline support. * **README.md**: Add instructions for installing the PWA on a phone. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Cosmo-Tech/wall?shareId=XXXX-XXXX-XXXX-XXXX). --- README.md | 8 ++++ manifest.json | 20 +++++++++ wall/badge_generator/templates/base.html | 12 +++++ .../templates/service-worker.js | 45 +++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 manifest.json create mode 100644 wall/badge_generator/templates/service-worker.js diff --git a/README.md b/README.md index fc42a45..2fbecb4 100644 --- a/README.md +++ b/README.md @@ -45,3 +45,11 @@ gh workflow run "Deploy to GitHub Pages" 2. Create a feature branch 3. Make your changes 4. Submit a pull request + +## Installing the PWA on Your Phone + +1. Open the GitHub Workflow Status Wall in your mobile browser. +2. Tap the browser menu (usually three dots or lines in the upper right corner). +3. Select "Add to Home screen" or "Install app". +4. Follow the prompts to add the app to your home screen. +5. The app will now be available on your home screen for quick access. diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..e490d56 --- /dev/null +++ b/manifest.json @@ -0,0 +1,20 @@ +{ + "name": "GitHub Workflow Status Wall", + "short_name": "Badge Wall", + "start_url": "/", + "display": "standalone", + "background_color": "#f6f8fa", + "theme_color": "#24292e", + "icons": [ + { + "src": "icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/wall/badge_generator/templates/base.html b/wall/badge_generator/templates/base.html index 8052912..0e81ec1 100644 --- a/wall/badge_generator/templates/base.html +++ b/wall/badge_generator/templates/base.html @@ -7,6 +7,18 @@ + + GitHub Workflow Status Wall