Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c0e3ac1fe0
|
|||
|
370c16eb42
|
|||
|
fd1d5c4f31
|
@@ -5,7 +5,7 @@ import os
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from fastapi import FastAPI, Request
|
from fastapi import FastAPI, Request
|
||||||
from fastapi.responses import HTMLResponse, JSONResponse
|
from fastapi.responses import HTMLResponse, JSONResponse, FileResponse
|
||||||
from fastapi.staticfiles import StaticFiles
|
from fastapi.staticfiles import StaticFiles
|
||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
|
|
||||||
@@ -49,6 +49,44 @@ static_dir.mkdir(exist_ok=True)
|
|||||||
app.mount("/static", StaticFiles(directory=str(static_dir)), name="static")
|
app.mount("/static", StaticFiles(directory=str(static_dir)), name="static")
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/apple-touch-icon.png")
|
||||||
|
async def apple_touch_icon():
|
||||||
|
"""Serve Apple Touch Icon with proper headers."""
|
||||||
|
icon_path = static_dir / "apple-touch-icon.png"
|
||||||
|
return FileResponse(
|
||||||
|
path=icon_path,
|
||||||
|
media_type="image/png",
|
||||||
|
headers={
|
||||||
|
"Cache-Control": "public, max-age=31536000",
|
||||||
|
"Content-Type": "image/png"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/favicon.ico")
|
||||||
|
async def favicon():
|
||||||
|
"""Serve favicon."""
|
||||||
|
icon_path = static_dir / "apple-touch-icon.png"
|
||||||
|
return FileResponse(
|
||||||
|
path=icon_path,
|
||||||
|
media_type="image/png"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/manifest.json")
|
||||||
|
async def manifest():
|
||||||
|
"""Serve Web App Manifest with proper headers."""
|
||||||
|
manifest_path = static_dir / "manifest.json"
|
||||||
|
return FileResponse(
|
||||||
|
path=manifest_path,
|
||||||
|
media_type="application/manifest+json",
|
||||||
|
headers={
|
||||||
|
"Cache-Control": "public, max-age=86400",
|
||||||
|
"Content-Type": "application/manifest+json"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/health")
|
@app.get("/health")
|
||||||
async def health() -> JSONResponse:
|
async def health() -> JSONResponse:
|
||||||
"""Health check endpoint for Kubernetes/Docker.
|
"""Health check endpoint for Kubernetes/Docker.
|
||||||
|
|||||||
BIN
apps/ui/static/apple-touch-icon-114x114.png
Normal file
|
After Width: | Height: | Size: 618 B |
BIN
apps/ui/static/apple-touch-icon-120x120.png
Normal file
|
After Width: | Height: | Size: 639 B |
BIN
apps/ui/static/apple-touch-icon-144x144.png
Normal file
|
After Width: | Height: | Size: 827 B |
BIN
apps/ui/static/apple-touch-icon-152x152.png
Normal file
|
After Width: | Height: | Size: 884 B |
BIN
apps/ui/static/apple-touch-icon-16x16.png
Normal file
|
After Width: | Height: | Size: 153 B |
BIN
apps/ui/static/apple-touch-icon-180x180.png
Normal file
|
After Width: | Height: | Size: 1018 B |
BIN
apps/ui/static/apple-touch-icon-32x32.png
Normal file
|
After Width: | Height: | Size: 210 B |
BIN
apps/ui/static/apple-touch-icon-57x57.png
Normal file
|
After Width: | Height: | Size: 336 B |
BIN
apps/ui/static/apple-touch-icon-60x60.png
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
apps/ui/static/apple-touch-icon-72x72.png
Normal file
|
After Width: | Height: | Size: 413 B |
BIN
apps/ui/static/apple-touch-icon-76x76.png
Normal file
|
After Width: | Height: | Size: 432 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 1018 B |
BIN
apps/ui/static/garage-icon-114x114.png
Normal file
|
After Width: | Height: | Size: 519 B |
BIN
apps/ui/static/garage-icon-120x120.png
Normal file
|
After Width: | Height: | Size: 547 B |
BIN
apps/ui/static/garage-icon-144x144.png
Normal file
|
After Width: | Height: | Size: 641 B |
BIN
apps/ui/static/garage-icon-152x152.png
Normal file
|
After Width: | Height: | Size: 695 B |
BIN
apps/ui/static/garage-icon-16x16.png
Normal file
|
After Width: | Height: | Size: 126 B |
BIN
apps/ui/static/garage-icon-180x180.png
Normal file
|
After Width: | Height: | Size: 808 B |
BIN
apps/ui/static/garage-icon-32x32.png
Normal file
|
After Width: | Height: | Size: 192 B |
BIN
apps/ui/static/garage-icon-57x57.png
Normal file
|
After Width: | Height: | Size: 257 B |
BIN
apps/ui/static/garage-icon-60x60.png
Normal file
|
After Width: | Height: | Size: 271 B |
BIN
apps/ui/static/garage-icon-72x72.png
Normal file
|
After Width: | Height: | Size: 347 B |
BIN
apps/ui/static/garage-icon-76x76.png
Normal file
|
After Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 808 B |
43
apps/ui/static/manifest.json
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"name": "Home Automation",
|
||||||
|
"short_name": "Home",
|
||||||
|
"description": "Smart Home Automation System",
|
||||||
|
"start_url": "/",
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#667eea",
|
||||||
|
"theme_color": "#667eea",
|
||||||
|
"orientation": "portrait",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/static/apple-touch-icon-180x180.png",
|
||||||
|
"sizes": "180x180",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any maskable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/static/apple-touch-icon-152x152.png",
|
||||||
|
"sizes": "152x152",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/static/apple-touch-icon-120x120.png",
|
||||||
|
"sizes": "120x120",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/static/apple-touch-icon-76x76.png",
|
||||||
|
"sizes": "76x76",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/static/apple-touch-icon-32x32.png",
|
||||||
|
"sizes": "32x32",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/static/apple-touch-icon-16x16.png",
|
||||||
|
"sizes": "16x16",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -4,7 +4,19 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Home Automation</title>
|
<title>Home Automation</title>
|
||||||
|
|
||||||
|
<!-- Apple Touch Icon -->
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="152x152" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Dashboard">
|
||||||
|
<meta name="theme-color" content="#667eea">
|
||||||
|
<link rel="manifest" href="/static/manifest.json">
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -4,6 +4,18 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Gerät - Home Automation</title>
|
<title>Gerät - Home Automation</title>
|
||||||
|
|
||||||
|
<!-- Apple Touch Icon -->
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="152x152" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/apple-touch-icon.png">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Gerät">
|
||||||
|
<meta name="theme-color" content="#667eea">
|
||||||
|
<link rel="manifest" href="/static/manifest.json">
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -6,11 +6,17 @@
|
|||||||
<title>Garage - Home Automation</title>
|
<title>Garage - Home Automation</title>
|
||||||
|
|
||||||
<!-- Apple Touch Icon -->
|
<!-- Apple Touch Icon -->
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/static/garage-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/garage-icon-180x180.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/garage-icon.png">
|
<link rel="apple-touch-icon" sizes="152x152" href="/static/garage-icon-152x152.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" href="/static/garage-icon-120x120.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="76x76" href="/static/garage-icon-76x76.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/garage-icon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/garage-icon-16x16.png">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="Garage">
|
<meta name="apple-mobile-web-app-title" content="Garage">
|
||||||
|
<meta name="theme-color" content="#667eea">
|
||||||
|
<link rel="manifest" href="/manifest.json">
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -4,6 +4,19 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Home Automation</title>
|
<title>Home Automation</title>
|
||||||
|
|
||||||
|
<!-- Apple Touch Icon -->
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon-180x180.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="152x152" href="/static/apple-touch-icon-152x152.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" href="/static/apple-touch-icon-120x120.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="76x76" href="/static/apple-touch-icon-76x76.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/apple-touch-icon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/apple-touch-icon-16x16.png">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Home Automation">
|
||||||
|
<meta name="theme-color" content="#667eea">
|
||||||
|
<link rel="manifest" href="/static/manifest.json">
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -4,6 +4,18 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{{ room_name }} - Home Automation</title>
|
<title>{{ room_name }} - Home Automation</title>
|
||||||
|
|
||||||
|
<!-- Apple Touch Icon -->
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="152x152" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/apple-touch-icon.png">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
|
<meta name="apple-mobile-web-app-title" content="{{ room_name }}">
|
||||||
|
<meta name="theme-color" content="#667eea">
|
||||||
|
<link rel="manifest" href="/static/manifest.json">
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -6,11 +6,17 @@
|
|||||||
<title>Räume - Home Automation</title>
|
<title>Räume - Home Automation</title>
|
||||||
|
|
||||||
<!-- Apple Touch Icon -->
|
<!-- Apple Touch Icon -->
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon-180x180.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="152x152" href="/static/apple-touch-icon-152x152.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" href="/static/apple-touch-icon-120x120.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="76x76" href="/static/apple-touch-icon-76x76.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/apple-touch-icon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/apple-touch-icon-16x16.png">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="Home Automation">
|
<meta name="apple-mobile-web-app-title" content="Räume">
|
||||||
|
<meta name="theme-color" content="#667eea">
|
||||||
|
<link rel="manifest" href="/manifest.json">
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
30
create_icons.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
"""
|
||||||
|
Script to create additional PNG icon sizes for better iOS compatibility
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
def create_icon_sizes():
|
||||||
|
static_dir = Path("/Users/wn/Workspace/home-automation/apps/ui/static")
|
||||||
|
|
||||||
|
# Sizes that iOS might need
|
||||||
|
sizes = [16, 32, 57, 60, 72, 76, 114, 120, 144, 152, 180]
|
||||||
|
|
||||||
|
# Create home icons
|
||||||
|
base_icon = Image.open(static_dir / "apple-touch-icon.png")
|
||||||
|
for size in sizes:
|
||||||
|
resized = base_icon.resize((size, size), Image.Resampling.LANCZOS)
|
||||||
|
resized.save(static_dir / f"apple-touch-icon-{size}x{size}.png")
|
||||||
|
print(f"Created apple-touch-icon-{size}x{size}.png")
|
||||||
|
|
||||||
|
# Create garage icons
|
||||||
|
garage_icon = Image.open(static_dir / "garage-icon.png")
|
||||||
|
for size in sizes:
|
||||||
|
resized = garage_icon.resize((size, size), Image.Resampling.LANCZOS)
|
||||||
|
resized.save(static_dir / f"garage-icon-{size}x{size}.png")
|
||||||
|
print(f"Created garage-icon-{size}x{size}.png")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
create_icon_sizes()
|
||||||
118
create_proper_icons.py
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
"""
|
||||||
|
Script to create proper PNG icons with house and car symbols
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
|
||||||
|
def create_proper_icons():
|
||||||
|
static_dir = Path("/Users/wn/Workspace/home-automation/apps/ui/static")
|
||||||
|
|
||||||
|
# Create home icon with house symbol
|
||||||
|
def create_home_icon(size):
|
||||||
|
img = Image.new('RGBA', (size, size), color=(102, 126, 234, 255)) # #667EEA
|
||||||
|
draw = ImageDraw.Draw(img)
|
||||||
|
|
||||||
|
# Calculate proportions
|
||||||
|
margin = size // 10
|
||||||
|
house_size = size - 2 * margin
|
||||||
|
|
||||||
|
# Draw house shape
|
||||||
|
# Base rectangle
|
||||||
|
base_height = house_size // 2
|
||||||
|
base_y = size - margin - base_height
|
||||||
|
draw.rectangle([margin, base_y, size - margin, size - margin], fill='white')
|
||||||
|
|
||||||
|
# Roof triangle
|
||||||
|
roof_height = house_size // 3
|
||||||
|
roof_points = [
|
||||||
|
(size // 2, margin), # top point
|
||||||
|
(margin, base_y), # bottom left
|
||||||
|
(size - margin, base_y) # bottom right
|
||||||
|
]
|
||||||
|
draw.polygon(roof_points, fill='white')
|
||||||
|
|
||||||
|
# Door
|
||||||
|
door_width = house_size // 6
|
||||||
|
door_height = base_height // 2
|
||||||
|
door_x = size // 2 - door_width // 2
|
||||||
|
door_y = size - margin - door_height
|
||||||
|
draw.rectangle([door_x, door_y, door_x + door_width, size - margin], fill=(102, 126, 234, 255))
|
||||||
|
|
||||||
|
# Window
|
||||||
|
window_size = house_size // 8
|
||||||
|
window_x = margin + house_size // 4
|
||||||
|
window_y = base_y + base_height // 4
|
||||||
|
draw.rectangle([window_x, window_y, window_x + window_size, window_y + window_size], fill=(102, 126, 234, 255))
|
||||||
|
|
||||||
|
return img
|
||||||
|
|
||||||
|
# Create car icon with car symbol
|
||||||
|
def create_car_icon(size):
|
||||||
|
img = Image.new('RGBA', (size, size), color=(102, 126, 234, 255)) # #667EEA
|
||||||
|
draw = ImageDraw.Draw(img)
|
||||||
|
|
||||||
|
# Calculate proportions
|
||||||
|
margin = size // 8
|
||||||
|
car_width = size - 2 * margin
|
||||||
|
car_height = car_width // 2
|
||||||
|
car_y = size // 2 - car_height // 2
|
||||||
|
|
||||||
|
# Draw car body
|
||||||
|
draw.rounded_rectangle([margin, car_y, size - margin, car_y + car_height],
|
||||||
|
radius=size//20, fill='white')
|
||||||
|
|
||||||
|
# Draw car roof
|
||||||
|
roof_margin = car_width // 4
|
||||||
|
roof_height = car_height // 2
|
||||||
|
roof_y = car_y - roof_height // 2
|
||||||
|
draw.rounded_rectangle([margin + roof_margin, roof_y,
|
||||||
|
size - margin - roof_margin, car_y + roof_height // 2],
|
||||||
|
radius=size//30, fill='white')
|
||||||
|
|
||||||
|
# Draw wheels
|
||||||
|
wheel_radius = car_height // 4
|
||||||
|
wheel_y = car_y + car_height - wheel_radius // 2
|
||||||
|
|
||||||
|
# Left wheel
|
||||||
|
left_wheel_x = margin + car_width // 4
|
||||||
|
draw.ellipse([left_wheel_x - wheel_radius, wheel_y - wheel_radius,
|
||||||
|
left_wheel_x + wheel_radius, wheel_y + wheel_radius],
|
||||||
|
fill=(102, 126, 234, 255))
|
||||||
|
|
||||||
|
# Right wheel
|
||||||
|
right_wheel_x = size - margin - car_width // 4
|
||||||
|
draw.ellipse([right_wheel_x - wheel_radius, wheel_y - wheel_radius,
|
||||||
|
right_wheel_x + wheel_radius, wheel_y + wheel_radius],
|
||||||
|
fill=(102, 126, 234, 255))
|
||||||
|
|
||||||
|
return img
|
||||||
|
|
||||||
|
# Sizes to create
|
||||||
|
sizes = [16, 32, 57, 60, 72, 76, 114, 120, 144, 152, 180]
|
||||||
|
|
||||||
|
# Create home icons
|
||||||
|
for size in sizes:
|
||||||
|
home_icon = create_home_icon(size)
|
||||||
|
home_icon.save(static_dir / f"apple-touch-icon-{size}x{size}.png")
|
||||||
|
print(f"Created apple-touch-icon-{size}x{size}.png")
|
||||||
|
|
||||||
|
# Also create the main apple-touch-icon.png
|
||||||
|
main_icon = create_home_icon(180)
|
||||||
|
main_icon.save(static_dir / "apple-touch-icon.png")
|
||||||
|
print("Created apple-touch-icon.png")
|
||||||
|
|
||||||
|
# Create garage icons
|
||||||
|
for size in sizes:
|
||||||
|
car_icon = create_car_icon(size)
|
||||||
|
car_icon.save(static_dir / f"garage-icon-{size}x{size}.png")
|
||||||
|
print(f"Created garage-icon-{size}x{size}.png")
|
||||||
|
|
||||||
|
# Also create the main garage-icon.png
|
||||||
|
main_garage = create_car_icon(180)
|
||||||
|
main_garage.save(static_dir / "garage-icon.png")
|
||||||
|
print("Created garage-icon.png")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
create_proper_icons()
|
||||||
77
icon-test.html
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Icon Test</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
padding: 20px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
|
.icon-container {
|
||||||
|
display: flex;
|
||||||
|
gap: 20px;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
.icon-test {
|
||||||
|
background: white;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
.icon-test img {
|
||||||
|
display: block;
|
||||||
|
margin: 10px auto;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
.icon-sizes {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Apple Touch Icon Test</h1>
|
||||||
|
|
||||||
|
<div class="icon-container">
|
||||||
|
<div class="icon-test">
|
||||||
|
<h3>Home Icon</h3>
|
||||||
|
<img src="apps/ui/static/apple-touch-icon.png" alt="Home Icon" width="120" height="120">
|
||||||
|
<p>Haupticon für die Home Automation App</p>
|
||||||
|
<div class="icon-sizes">
|
||||||
|
<img src="apps/ui/static/apple-touch-icon-76x76.png" alt="Home 76px" width="76" height="76">
|
||||||
|
<img src="apps/ui/static/apple-touch-icon-60x60.png" alt="Home 60px" width="60" height="60">
|
||||||
|
<img src="apps/ui/static/apple-touch-icon-32x32.png" alt="Home 32px" width="32" height="32">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="icon-test">
|
||||||
|
<h3>Garage Icon</h3>
|
||||||
|
<img src="apps/ui/static/garage-icon.png" alt="Garage Icon" width="120" height="120">
|
||||||
|
<p>Icon für die Garage-Seite</p>
|
||||||
|
<div class="icon-sizes">
|
||||||
|
<img src="apps/ui/static/garage-icon-76x76.png" alt="Garage 76px" width="76" height="76">
|
||||||
|
<img src="apps/ui/static/garage-icon-60x60.png" alt="Garage 60px" width="60" height="60">
|
||||||
|
<img src="apps/ui/static/garage-icon-32x32.png" alt="Garage 32px" width="32" height="32">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>iPhone Homescreen Test</h2>
|
||||||
|
<p>Um die Icons auf dem iPhone zu testen:</p>
|
||||||
|
<ol>
|
||||||
|
<li>Öffnen Sie Ihre Home Automation App im Safari</li>
|
||||||
|
<li>Tippen Sie auf das Teilen-Symbol</li>
|
||||||
|
<li>Wählen Sie "Zum Home-Bildschirm hinzufügen"</li>
|
||||||
|
<li>Das Icon sollte jetzt als Haus-Symbol erscheinen</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<p><strong>Hinweis:</strong> Falls das alte Icon noch angezeigt wird, löschen Sie die bestehende App vom Homescreen und fügen Sie sie neu hinzu.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
29
test-icons.sh
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Script to test icon accessibility over HTTPS/mTLS
|
||||||
|
|
||||||
|
echo "Testing Apple Touch Icon accessibility..."
|
||||||
|
|
||||||
|
# Test base icons
|
||||||
|
echo "1. Testing main apple-touch-icon.png:"
|
||||||
|
curl -I "https://your-domain.com/static/apple-touch-icon-180x180.png" || echo "FAILED"
|
||||||
|
|
||||||
|
echo "2. Testing garage icon:"
|
||||||
|
curl -I "https://your-domain.com/static/garage-icon-180x180.png" || echo "FAILED"
|
||||||
|
|
||||||
|
echo "3. Testing manifest:"
|
||||||
|
curl -I "https://your-domain.com/manifest.json" || echo "FAILED"
|
||||||
|
|
||||||
|
echo "4. Testing favicon route:"
|
||||||
|
curl -I "https://your-domain.com/favicon.ico" || echo "FAILED"
|
||||||
|
|
||||||
|
echo "5. Testing apple-touch-icon route:"
|
||||||
|
curl -I "https://your-domain.com/apple-touch-icon.png" || echo "FAILED"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Testing mTLS with client certificate:"
|
||||||
|
echo "6. Testing with client cert:"
|
||||||
|
curl -I --cert client.crt --key client.key "https://your-domain.com/static/apple-touch-icon-180x180.png" || echo "FAILED"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Note: Replace 'your-domain.com' with your actual domain"
|
||||||
|
echo "Note: Use actual client certificate files if testing mTLS"
|
||||||