Added manifest

Signed-off-by: Keith Irwin <mail@keithirwin.us>
master
Keith Irwin 2016-12-13 21:18:12 -05:00
parent 8eab89e5eb
commit 44a3a0f85c
3 changed files with 104 additions and 4 deletions

87
manifest.webmanifest Normal file
View File

@ -0,0 +1,87 @@
{
"name": "Compass",
"short_name": "Compass",
"author": "Keith Irwin",
"description": "Compass and GPS web app",
"homepage_url": "https://github.com/keith24/Compass",
"background_color": "black",
"display": "standalone",
"icons": [{
"src": "icons/apple-touch-icon-114x114.png",
"sizes": "114x114",
"type": "image/png"
}, {
"src": "icons/apple-touch-icon-120x120.png",
"sizes": "120x120",
"type": "image/png"
}, {
"src": "icons/apple-touch-icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "icons/apple-touch-icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
}, {
"src": "icons/apple-touch-icon-57x57.png",
"sizes": "57x57",
"type": "image/png"
}, {
"src": "icons/apple-touch-icon-60x60.png",
"sizes": "60x60",
"type": "image/png"
}, {
"src": "icons/apple-touch-icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
}, {
"src": "icons/apple-touch-icon-76x76.png",
"sizes": "76x76",
"type": "image/png"
}, {
"src": "icons/favicon-128.png",
"sizes": "128x128",
"type": "image/png"
}, {
"src": "icons/favicon-16x16.png",
"sizes": "16x16",
"type": "image/png"
}, {
"src": "icons/favicon-196x196.png",
"sizes": "196x196",
"type": "image/png"
}, {
"src": "icons/favicon-32x32.png",
"sizes": "32x32",
"type": "image/png"
}, {
"src": "icons/favicon-96x96.png",
"sizes": "96x96",
"type": "image/png"
}, {
"src": "icons/favicon.ico",
"sizes": "16x16 24x24 32x32 48x48 64x64",
"type": "image/ico"
}, {
"src": "icons/mstile-144x144.png",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "icons/mstile-150x150.png",
"sizes": "150x150",
"type": "image/png"
}, {
"src": "icons/mstile-310x150.png",
"sizes": "310x150",
"type": "image/png"
}, {
"src": "icons/mstile-310x310.png",
"sizes": "310x310",
"type": "image/png"
}, {
"src": "icons/mstile-70x70.png",
"sizes": "70x70",
"type": "image/png"
}]
}

View File

@ -4,9 +4,13 @@ if (!navigator.geolocation){ $('#no-gps').show(); }
else {
navigator.geolocation.watchPosition(
// success
function(e) {
$('#lat').text(e.coords.latitude);
$('#lon').text(e.coords.longitude);
function(pos) {
var lat = pos.coords.latitude.toFixed(5);
var lon = pos.coords.longitude.toFixed(5);
lat = (lat.substring(0,1)=='-')? lat.substring(1)+' S' : lat+' N';
lon = (lon.substring(0,1)=='-')? lon.substring(1)+' E' : lon+' W';
$('#lat').text(lat);
$('#lon').text(lon);
},
// error
function() {

View File

@ -11,14 +11,23 @@ body {
font-size: 22px;
text-align: center;
padding: 4vw;
background-color: #111;
background-color: #000;
background-color: rgba(0,0,0,.85);
} .error {
display: none;
}
.coord {
height: 50%;
text-align: center;
font-size: 44px;
font-family: monospace;
}
#rose {
width: 100%;
-webkit-transition-duration: 2s;
transition-duration: .2s;
}
@media (orientation:portrait) {