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 @@ - +
Skip to content 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 }}:These are pre-release builds and may be unstable. They are intended for testing and advanced users. Use at your own risk.
+ +