Verze 1.2 FINAL - GUI drobnosti
|
|
@ -10,6 +10,6 @@ final class Konstanty
|
||||||
* Verze aplikace.
|
* Verze aplikace.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const verze = '1.1';
|
public const verze = '1.2';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,6 +3,13 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||||
|
<meta name="theme-color" content="#2652a8">
|
||||||
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Obvody">
|
||||||
|
<link rel="icon" href="{$basePath}/favicon.ico" sizes="any">
|
||||||
|
<link rel="apple-touch-icon" href="{$basePath}/apple-touch-icon.png">
|
||||||
|
<link rel="manifest" href="{$basePath}/manifest.json">
|
||||||
|
|
||||||
{* bootstrap: *}
|
{* bootstrap: *}
|
||||||
<link href="{$basePath}/css/bootstrap.min.css?v={$appVersion ?? '1.0'}" rel="stylesheet">
|
<link href="{$basePath}/css/bootstrap.min.css?v={$appVersion ?? '1.0'}" rel="stylesheet">
|
||||||
|
|
@ -86,6 +93,11 @@
|
||||||
|
|
||||||
{block scripts}
|
{block scripts}
|
||||||
<script src="https://unpkg.com/nette-forms@3"></script>
|
<script src="https://unpkg.com/nette-forms@3"></script>
|
||||||
|
<script>
|
||||||
|
if ('serviceWorker' in navigator) {
|
||||||
|
navigator.serviceWorker.register({$basePath} + '/sw.js');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ Require all granted
|
||||||
RewriteRule . index.php [L]
|
RewriteRule . index.php [L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
AddType application/manifest+json .webmanifest
|
||||||
|
|
||||||
# Enable gzip compression for text files
|
# Enable gzip compression for text files
|
||||||
<IfModule mod_deflate.c>
|
<IfModule mod_deflate.c>
|
||||||
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml application/rss+xml image/svg+xml
|
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml application/rss+xml image/svg+xml
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 30 KiB |
|
|
@ -334,7 +334,7 @@ body:has(#map[data-max]) {
|
||||||
border: 2px solid #1d4f91;
|
border: 2px solid #1d4f91;
|
||||||
background: #2652a8;
|
background: #2652a8;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: clamp(1.2rem, 4.6vw, 1.5rem);
|
font-size: clamp(1.6rem, 6vw, 2rem);
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
@ -400,7 +400,7 @@ body:has(#map[data-max]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-obvod {
|
.home-obvod {
|
||||||
font-size: 1.4rem;
|
font-size: 1.9rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -529,12 +529,12 @@ body:has(#map[data-max]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-znacka {
|
.menu-znacka {
|
||||||
width: 2rem;
|
width: 2.15rem;
|
||||||
height: 2rem;
|
height: 2.15rem;
|
||||||
border-radius: 50%;
|
flex: 0 0 auto;
|
||||||
border: 2px solid #1d4f91;
|
border-radius: 0.55rem;
|
||||||
background: #2652a8;
|
|
||||||
box-shadow: 0 3px 8px rgba(29, 79, 145, 0.28);
|
box-shadow: 0 3px 8px rgba(29, 79, 145, 0.28);
|
||||||
|
background: #2652a8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Crect width='512' height='512' rx='112' fill='%232652a8'/%3E%3Crect x='26' y='26' width='460' height='460' rx='96' fill='none' stroke='%231d4f91' stroke-width='18'/%3E%3Cg transform='translate(128 116) scale(10.7)' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0'/%3E%3Ccircle cx='12' cy='8' r='2'/%3E%3Cpath d='M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu .navbar-nav {
|
#menu .navbar-nav {
|
||||||
|
|
@ -1151,8 +1151,14 @@ body:has(#map[data-max]) {
|
||||||
border-color: #78909c;
|
border-color: #78909c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html:has(.hranice-lista) {
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
body:has(.hranice-lista) {
|
body:has(.hranice-lista) {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
height: 100dvh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
@ -1166,6 +1172,7 @@ body:has(.hranice-lista) #map {
|
||||||
|
|
||||||
.hranice-lista {
|
.hranice-lista {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
@ -1175,6 +1182,15 @@ body:has(.hranice-lista) #map {
|
||||||
border-top: 1px solid #c5ddf6;
|
border-top: 1px solid #c5ddf6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Android často nahlásí safe-area-inset-bottom = 0, dokud se telefon neotočí.
|
||||||
|
Tlačítka pak skončí pod systémovou lištou. Na dotykovém displeji proto
|
||||||
|
necháme dole vždy aspoň místo na tu lištu. */
|
||||||
|
@media (hover: none) and (pointer: coarse) {
|
||||||
|
.hranice-lista {
|
||||||
|
padding-bottom: max(3.5rem, calc(0.75rem + env(safe-area-inset-bottom)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.hranice-napoveda {
|
.hranice-napoveda {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex: 1 1 18rem;
|
flex: 1 1 18rem;
|
||||||
|
|
|
||||||
BIN
www/favicon.ico
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
|
@ -0,0 +1,9 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||||
|
<!-- Symbol: Lucide "map-pinned", ISC License, https://lucide.dev -->
|
||||||
|
<rect width="512" height="512" fill="#2652a8"/>
|
||||||
|
<g transform="translate(148 140) scale(9)" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0"/>
|
||||||
|
<circle cx="12" cy="8" r="2"/>
|
||||||
|
<path d="M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 616 B |
|
|
@ -0,0 +1,10 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||||
|
<!-- Symbol: Lucide "map-pinned", ISC License, https://lucide.dev -->
|
||||||
|
<rect width="512" height="512" rx="112" fill="#2652a8"/>
|
||||||
|
<rect x="26" y="26" width="460" height="460" rx="96" fill="none" stroke="#1d4f91" stroke-width="18"/>
|
||||||
|
<g transform="translate(128 116) scale(10.7)" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0"/>
|
||||||
|
<circle cx="12" cy="8" r="2"/>
|
||||||
|
<path d="M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 732 B |
|
|
@ -12,7 +12,32 @@
|
||||||
var obvodId = mapaEl.getAttribute('data-obvod');
|
var obvodId = mapaEl.getAttribute('data-obvod');
|
||||||
var geojsonUrl = mapaEl.getAttribute('data-geojson');
|
var geojsonUrl = mapaEl.getAttribute('data-geojson');
|
||||||
var podklady = MapovePodklady.vytvor();
|
var podklady = MapovePodklady.vytvor();
|
||||||
var map = L.map(mapaEl, {
|
var map = null;
|
||||||
|
|
||||||
|
// Na mobilu je 100vh vyšší než viditelná plocha, dokud se nezmění orientace.
|
||||||
|
function srovnejObrazovku() {
|
||||||
|
var vv = window.visualViewport;
|
||||||
|
var vyska = (vv && vv.height) ? vv.height : window.innerHeight;
|
||||||
|
var px = Math.round(vyska) + 'px';
|
||||||
|
document.documentElement.style.height = px;
|
||||||
|
document.body.style.height = px;
|
||||||
|
if (map) {
|
||||||
|
map.invalidateSize({ pan: false });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
srovnejObrazovku();
|
||||||
|
window.addEventListener('resize', srovnejObrazovku);
|
||||||
|
window.addEventListener('orientationchange', function () {
|
||||||
|
window.setTimeout(srovnejObrazovku, 150);
|
||||||
|
});
|
||||||
|
window.addEventListener('pageshow', srovnejObrazovku);
|
||||||
|
if (window.visualViewport) {
|
||||||
|
window.visualViewport.addEventListener('resize', srovnejObrazovku);
|
||||||
|
}
|
||||||
|
window.setTimeout(srovnejObrazovku, 300);
|
||||||
|
|
||||||
|
map = L.map(mapaEl, {
|
||||||
center: [50.853501146, 14.8425],
|
center: [50.853501146, 14.8425],
|
||||||
zoom: 14,
|
zoom: 14,
|
||||||
layers: [MapovePodklady.vychozi(podklady)],
|
layers: [MapovePodklady.vychozi(podklady)],
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"short_name": "Obvody",
|
||||||
|
"name": "Obvody",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/icon-192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icon-512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": "/",
|
||||||
|
"background_color": "#e3f2fd",
|
||||||
|
"display": "standalone",
|
||||||
|
"scope": "/",
|
||||||
|
"theme_color": "#2652a8",
|
||||||
|
"lang": "cs"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
self.addEventListener('install', function () {
|
||||||
|
self.skipWaiting();
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener('activate', function (event) {
|
||||||
|
event.waitUntil(self.clients.claim());
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener('fetch', function (event) {
|
||||||
|
event.respondWith(fetch(event.request));
|
||||||
|
});
|
||||||