added PWA manifest,
added deploy script for Windows
9
deploy.bat
Normal 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.
|
||||||
@ -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
|
- na konci vypíš, že DocumentRoot má byť nastavený na dist/public a frontend je v dist/public
|
||||||
|
|
||||||
Dodaj kompletný obsah súboru build.bat.
|
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
|
||||||
@ -2,7 +2,11 @@
|
|||||||
<html lang="">
|
<html lang="">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Nutrio</title>
|
<title>Nutrio</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 66 KiB |
BIN
frontend/public/icons/icon-16.png
Normal file
|
After Width: | Height: | Size: 874 B |
BIN
frontend/public/icons/icon-180.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/public/icons/icon-192.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
frontend/public/icons/icon-32.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
frontend/public/icons/icon-48.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
frontend/public/icons/icon-512.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
20
frontend/public/manifest.json
Normal 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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||