📝 Commit Details:
BIN
backend/static/icons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 551 B |
BIN
backend/static/icons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 178 B |
BIN
backend/static/icons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 271 B |
75
backend/static/icons/generate_icons.py
Normal file
@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Icon-Generator für Mercedes-Benz MYP Platform
|
||||
Generiert PWA-Icons in verschiedenen Größen
|
||||
"""
|
||||
|
||||
import os
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
def create_mercedes_icon(size, output_path):
|
||||
"""
|
||||
Erstellt ein einfaches Mercedes-Benz-Logo-Icon
|
||||
|
||||
Args:
|
||||
size: Größe des Icons (quadratisch)
|
||||
output_path: Ausgabepfad für das Icon
|
||||
"""
|
||||
# Erstelle ein schwarzes quadratisches Bild
|
||||
img = Image.new('RGB', (size, size), color='#000000')
|
||||
draw = ImageDraw.Draw(img)
|
||||
|
||||
# Berechne Kreis-Dimensionen
|
||||
center = size // 2
|
||||
radius = int(size * 0.4) # 80% der Größe für den äußeren Kreis
|
||||
|
||||
# Äußerer weißer Kreis
|
||||
draw.ellipse([center - radius, center - radius, center + radius, center + radius],
|
||||
outline='#FFFFFF', width=max(2, size // 50))
|
||||
|
||||
# Mercedes-Stern (vereinfacht)
|
||||
star_radius = int(radius * 0.7)
|
||||
|
||||
# Drei Linien für den Mercedes-Stern
|
||||
# Linie nach oben
|
||||
draw.line([center, center, center, center - star_radius],
|
||||
fill='#FFFFFF', width=max(2, size // 40))
|
||||
|
||||
# Linie nach rechts unten (60°)
|
||||
import math
|
||||
angle1 = math.radians(60)
|
||||
x1 = center + int(star_radius * math.sin(angle1))
|
||||
y1 = center + int(star_radius * math.cos(angle1))
|
||||
draw.line([center, center, x1, y1],
|
||||
fill='#FFFFFF', width=max(2, size // 40))
|
||||
|
||||
# Linie nach links unten (120°)
|
||||
angle2 = math.radians(120)
|
||||
x2 = center + int(star_radius * math.sin(angle2))
|
||||
y2 = center + int(star_radius * math.cos(angle2))
|
||||
draw.line([center, center, x2, y2],
|
||||
fill='#FFFFFF', width=max(2, size // 40))
|
||||
|
||||
# Speichere das Bild
|
||||
img.save(output_path, 'PNG', optimize=True)
|
||||
print(f"✅ Icon erstellt: {output_path} ({size}x{size})")
|
||||
|
||||
def main():
|
||||
"""Generiert alle benötigten Icon-Größen"""
|
||||
sizes = [72, 96, 128, 144, 152, 192, 384, 512]
|
||||
|
||||
# Stelle sicher, dass das Verzeichnis existiert
|
||||
os.makedirs('static/icons', exist_ok=True)
|
||||
|
||||
for size in sizes:
|
||||
output_path = f'icon-{size}x{size}.png'
|
||||
try:
|
||||
create_mercedes_icon(size, output_path)
|
||||
except Exception as e:
|
||||
print(f"❌ Fehler beim Erstellen von {output_path}: {str(e)}")
|
||||
|
||||
print("\n🎯 Alle Icons wurden erfolgreich generiert!")
|
||||
print("📁 Verzeichnis: static/icons/")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
BIN
backend/static/icons/icon-128x128.png
Normal file
After Width: | Height: | Size: 718 B |
BIN
backend/static/icons/icon-144x144.png
Normal file
After Width: | Height: | Size: 804 B |
BIN
backend/static/icons/icon-152x152.png
Normal file
After Width: | Height: | Size: 887 B |
BIN
backend/static/icons/icon-192x192.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
backend/static/icons/icon-384x384.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
backend/static/icons/icon-512x512.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
backend/static/icons/icon-72x72.png
Normal file
After Width: | Height: | Size: 435 B |
BIN
backend/static/icons/icon-96x96.png
Normal file
After Width: | Height: | Size: 551 B |
6
backend/static/icons/mercedes-logo.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 192" width="192" height="192">
|
||||
<circle cx="96" cy="96" r="96" fill="#000000"/>
|
||||
<path d="M96 12c46.392 0 84 37.608 84 84s-37.608 84-84 84-84-37.608-84-84 37.608-84 84-84m0-12C42.98 0 0 42.98 0 96s42.98 96 96 96 96-42.98 96-96S149.02 0 96 0z" fill="#ffffff"/>
|
||||
<path d="M96 30l21.65 57.68L174 96l-56.35 8.32L96 162l-21.65-57.68L18 96l56.35-8.32L96 30z" fill="#ffffff"/>
|
||||
</svg>
|
After Width: | Height: | Size: 476 B |