Merge pull request #1118 from placeAtlas/feature/passive_scroll

PR PWA
This commit is contained in:
Stefano 2022-04-08 23:34:33 +02:00 committed by GitHub
commit 81f9bc43a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 8 deletions

View file

@ -69,7 +69,7 @@ #wrapper {
}
a {
color: #FFAA00;
color: #ffcf6f;
text-decoration: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

@ -325,7 +325,7 @@ async function init(){
applyZoom(x, y, zoom);
e.preventDefault();
});
}, {passive: true});
/*function setDesiredZoom(x, y, target){
zoom = (zoom*2 + target)/3;
@ -354,7 +354,7 @@ async function init(){
touchstart(e);
});
}, {passive: true});
function mousedown(x, y){
lastPosition = [x, y];

View file

@ -766,7 +766,7 @@ function initView(){
,e.touches[0].clientY
];
}
});
},{passive: true} );
container.addEventListener("mouseup", function(e){
if(Math.abs(lastPos[0] - e.clientX) + Math.abs(lastPos[1] - e.clientY) <= 4){

View file

@ -21,7 +21,7 @@
-->
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The 2022 /r/place Atlas</title>
@ -33,7 +33,7 @@
<!-- <meta name="google-site-verification" content="gZGHpBSMzffAbIn0qB8b00We6EwSGkDTfDoQVv-NWss"/> -->
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, shrink-to-fit=no"> <!-- user-scalable=no -->
<meta name="mobile-web-app-capable" content="yes">
<link href="./_css/style.css?version=1.0.33" rel="stylesheet" type="text/css" media="all">
@ -137,7 +137,7 @@ <h1 id="title">The 2022 /r/place Atlas</h1>
</div>
<div id="entriesListBackground"></div>
<button id="hideListButton"></button>
<button id="hideListButton" aria-label:="Show List Button"></button>
<div id="coordsWrapper" class="collapsed">
@ -152,7 +152,7 @@ <h1 id="title">The 2022 /r/place Atlas</h1>
<button title="Reset View" id="zoomResetButton"></button>
<button title="Zoom Out" id="zoomOutButton"></button>
</div>
<div id="timeControls">
<div id="timeControls">
<input type="range" min="1" max="1" value="1" class="slider" id="timeControlsSlider">
</div>

32
web/manifest.webmanifest Normal file
View file

@ -0,0 +1,32 @@
{
"theme_color": "#f69435",
"background_color": "#f69435",
"display": "minimal-ui",
"scope": "/",
"start_url": "https://place-atlas.stefanocoding.me/",
"name": "r/place atlas",
"short_name": "r/placeAtlas2",
"description": "The atlas for the r/place event from 2022",
"icons": [
{
"src": "_img/pwa/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "_img/pwa/icon-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "_img/pwa/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "_img/pwa/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}