More iOS web app tweaks

* add apple-mobile-web-app-capable meta tag for home screen web app
* set viewport to device-width
This commit is contained in:
Donald Burr 2015-10-20 15:37:59 -07:00
parent 9575411593
commit 86a051b290
3 changed files with 6 additions and 3 deletions

View file

@ -5,6 +5,7 @@ body {
margin: 0px; margin: 0px;
background-color: #000000; background-color: #000000;
color: #ffffff; color: #ffffff;
min-height: 480px;
} }
p { p {

View file

@ -48,8 +48,8 @@ function LOG(level, msg)
$(document).ready(function(){ $(document).ready(function(){
// Hide the address bar on mobile browsers // Hide the address bar on mobile browsers
setTimeout(function(){ setTimeout(function(){
// some sites suggest 0,0 - not sure which is correct // some sites suggest 0,0 and others 0,1 - not sure which is correct
window.scrollTo(0, 1); window.scrollTo(0, 0);
}, 0); }, 0);
// set up UI (buttons, etc.) // set up UI (buttons, etc.)
setup_ui_elements(); setup_ui_elements();

View file

@ -2,7 +2,9 @@
<html lang="en"> <html lang="en">
<head> <head>
<link rel="apple-touch-icon" href="apple-touch-icon.png" /> <link rel="apple-touch-icon" href="apple-touch-icon.png" />
<meta name="viewport" content="width=320, initial-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes" />
<!-- width=320 -->
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta charset="utf-8"> <meta charset="utf-8">
<title>SIF Tools</title> <title>SIF Tools</title>
<link href="css/external/jquery-ui.css" rel="stylesheet"> <link href="css/external/jquery-ui.css" rel="stylesheet">