From 6533c698ef6a4937ebcae069ded0f652c859bfdf Mon Sep 17 00:00:00 2001 From: Nils Schimmelmann Date: Mon, 14 Sep 2026 12:49:18 -0700 Subject: [PATCH] add Web platform landing page and PWA setup instructions - Create docs/web.md as a landing page for MMapper Web matching desktop platforms. - Provide direct link to launch MMapper Web and a collapsible Web Beta section. - Add PWA installation instructions for iOS (Safari) and Android (Chrome). - Update homepage (docs/index.md) Web platform link to point to /web.html. --- docs/_layouts/default.html | 2 +- .../js/{download-highlight.js => site.js} | 26 +++++++++ docs/index.md | 2 +- docs/web.md | 56 +++++++++++++++++++ 4 files changed, 84 insertions(+), 2 deletions(-) rename docs/assets/js/{download-highlight.js => site.js} (66%) create mode 100644 docs/web.md diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 4fdf58702..8eec03b32 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -15,7 +15,7 @@ - + diff --git a/docs/assets/js/download-highlight.js b/docs/assets/js/site.js similarity index 66% rename from docs/assets/js/download-highlight.js rename to docs/assets/js/site.js index a54c19eeb..536fb65c2 100644 --- a/docs/assets/js/download-highlight.js +++ b/docs/assets/js/site.js @@ -64,4 +64,30 @@ document.addEventListener('DOMContentLoaded', function() { addRecommendation(link); } }); + + // --- Touch / Mobile Device Detection for Keyboard Notice --- + const isTouchDevice = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0); + const keyboardNotice = document.getElementById('keyboard-notice'); + if (keyboardNotice && isTouchDevice) { + keyboardNotice.style.border = '2px solid #cc9933'; + } + + // --- PWA Instructions Platform Detection & Focus --- + const ua = navigator.userAgent || ''; + const isIOS = /iPad|iPhone|iPod/.test(ua) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); + const isAndroid = /Android/.test(ua); + + const iosBlock = document.getElementById('pwa-ios'); + const androidBlock = document.getElementById('pwa-android'); + + if (isIOS && iosBlock && androidBlock) { + // Move iOS block above Android block and highlight + iosBlock.parentNode.insertBefore(iosBlock, androidBlock); + iosBlock.style.borderLeft = '3px solid #5cb85c'; + iosBlock.style.paddingLeft = '0.5em'; + } else if (isAndroid && androidBlock && iosBlock) { + // Highlight Android block + androidBlock.style.borderLeft = '3px solid #5cb85c'; + androidBlock.style.paddingLeft = '0.5em'; + } }); diff --git a/docs/index.md b/docs/index.md index 1decde297..43fdfac49 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,7 +14,7 @@ title: Play MUME with MMapper Choose your preferred platform to start using MMapper {{ site.github.latest_release.tag_name }}: