added PWA manifest,

added deploy script for Windows
This commit is contained in:
2026-02-15 17:28:16 +01:00
parent 69e5f4e320
commit 6ff28dae13
11 changed files with 107 additions and 1 deletions

9
deploy.bat Normal file
View File

@ -0,0 +1,9 @@
@echo off
call php d:\www\von\sftp\sftpsync2.php --host nutrio.tpsoft.org --user igor ^
--delete-dir /storage/tpsoft.org/nutrio/public ^
--sync d:/www/Nutrio/dist /storage/tpsoft.org/nutrio ^
--skip .git ^
--print-relative
echo ✔️ Done.

View File

@ -163,3 +163,76 @@ Požiadavky na build.bat:
- na konci vypíš, že DocumentRoot má byť nastavený na dist/public a frontend je v dist/public
Dodaj kompletný obsah súboru build.bat.
----- 2026-02-15 17:05:23 -----------------------------------------------------
Úloha:
V projekte vytvor plne funkčnú konfiguráciu PWA.
1⃣ Manifest
Vytvor súbor: frontend/public/manifest.json
Obsah musí:
- byť validný JSON
obsahovať:
- name
- short_name
- start_url
- display = "standalone"
- background_color
- theme_color
- icons pole
Použi tieto hodnoty:
{
"name": "Nutrio",
"short_name": "Nutrio",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#22c55e"
}
2⃣ Ikony
Zdrojový obrázok:
frontend/public/Nutrio.600.png
Z neho vytvor PNG ikony do adresára:
frontend/public/icons/
Vygeneruj tieto veľkosti:
16x16
32x32
48x48
180x180 (apple touch icon)
192x192 (PWA required)
512x512 (PWA required)
Požiadavky:
zachovať pomer strán
zachovať priehľadnosť
nepoužívať žiadne orezávanie
výstupné názvy:
icon-16.png
icon-32.png
icon-48.png
icon-180.png
icon-192.png
icon-512.png
3⃣ Manifest icons sekcia
Pole icons musí obsahovať iba:
[
{
"src": "/icons/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
"src": "/icons/icon-512.png",
"sizes": "512x512",
}
]
4⃣ Úprava index.html
Do frontend/index.html pridaj do <head>:
<link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/png" sizes="32x32" href="/icons/icon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/icons/icon-16.png">
<link rel="apple-touch-icon" href="/icons/icon-180.png">
<meta name="theme-color" content="#22c55e">
5⃣ Výstup
nevysvetľuj
nevypisuj komentáre
vytvor alebo uprav iba potrebné súbory
ak adresár icons neexistuje, vytvor ho

View File

@ -2,7 +2,11 @@
<html lang="">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/png" sizes="32x32" href="/icons/icon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/icons/icon-16.png">
<link rel="apple-touch-icon" href="/icons/icon-180.png">
<meta name="theme-color" content="#22c55e">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nutrio</title>
</head>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -0,0 +1,20 @@
{
"name": "Nutrio",
"short_name": "Nutrio",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#22c55e",
"icons": [
{
"src": "/icons/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}