Ottimizza layout mobile e setup icone APK Android

- Forza orientamento landscape e blocca scroll su mobile
- Aggiunge media queries responsive per schermi <768px
- Usa 100dvh e position:fixed per layout fullscreen
- Crea setup-android-icons.sh per generazione automatica icone Android
- Configura Capacitor per landscape, disabilita splash screen
- Refactoring Dockerfile con ImageMagick per icone multi-densità
This commit is contained in:
2026-01-24 11:23:45 +01:00
parent 9346117603
commit 1f71846e23
5 changed files with 137 additions and 8 deletions

View File

@@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y \
wget \
openjdk-17-jdk \
build-essential \
imagemagick \
&& rm -rf /var/lib/apt/lists/*
# Installa Node.js 18.x (LTS compatibile con Vite)
@@ -67,4 +68,15 @@ RUN npm ci --legacy-peer-deps || npm install --legacy-peer-deps
COPY . .
# Build script
CMD ["bash", "-c", "npm run build && npx cap add android && npx cap sync && cd android && ./gradlew assembleDebug --no-daemon && mkdir -p /app/output && cp app/build/outputs/apk/debug/app-debug.apk /app/output/segnapunti-debug.apk && echo '\n✅ APK generato: /app/output/segnapunti-debug.apk'"]
CMD ["bash", "-c", "\
npm run build && \
npx cap add android && \
npx cap sync && \
sed -i 's/android:configChanges=\"\\([^\"]*\\)\"/android:configChanges=\"\\1\" android:screenOrientation=\"landscape\"/g' android/app/src/main/AndroidManifest.xml && \
bash setup-android-icons.sh && \
cd android && ./gradlew assembleDebug --no-daemon && \
mkdir -p /app/output && \
cp app/build/outputs/apk/debug/app-debug.apk /app/output/segnapunti-debug.apk && \
echo '' && \
echo 'APK generato: /app/output/segnapunti-debug.apk'\
"]