Skip to content

Home Information - Your home, your data, organized.

Python

Added missing icons for PWA installs.

Tony Cassandra1997d28fe38b
diff --git a/src/hi/templates/manifest.json b/src/hi/templates/manifest.json
new file mode 100644
index 00000000..ec40eb54
--- /dev/null
+++ b/src/hi/templates/manifest.json
@@ -0,0 +1,59 @@
+{% load static %}{
+ "name": "Home Information",
+ "short_name": "Hi",
+ "description": "Smart home monitoring and control system",
+ "start_url": "/",
+ "scope": "/",
+ "display": "fullscreen",
+ "orientation": "landscape",
+ "theme_color": "#177072",
+ "background_color": "#fdfdfd",
+ "icons": [
+ {
+ "src": "{% static 'img/hi-icon-16x16.png' %}",
+ "sizes": "16x16",
+ "type": "image/png"
+ },
+ {
+ "src": "{% static 'img/hi-icon-32x32.png' %}",
+ "sizes": "32x32",
+ "type": "image/png"
+ },
+ {
+ "src": "{% static 'img/hi-icon-96x96.png' %}",
+ "sizes": "96x96",
+ "type": "image/png"
+ },
+ {
+ "src": "{% static 'img/hi-icon-120x120.png' %}",
+ "sizes": "120x120",
+ "type": "image/png"
+ },
+ {
+ "src": "{% static 'img/hi-icon-128x128.png' %}",
+ "sizes": "128x128",
+ "type": "image/png"
+ },
+ {
+ "src": "{% static 'img/hi-icon-152x152.png' %}",
+ "sizes": "152x152",
+ "type": "image/png"
+ },
+ {
+ "src": "{% static 'img/hi-icon-180x180.png' %}",
+ "sizes": "180x180",
+ "type": "image/png"
+ },
+ {
+ "src": "{% static 'img/hi-icon-196x196.png' %}",
+ "sizes": "196x196",
+ "type": "image/png"
+ },
+ {
+ "src": "{% static 'img/hi-icon-512x512.png' %}",
+ "sizes": "512x512",
+ "type": "image/png",
+ "purpose": "any maskable"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/hi/templates/pages/base.html b/src/hi/templates/pages/base.html
index 7c22c674..beb2328e 100644
--- a/src/hi/templates/pages/base.html
+++ b/src/hi/templates/pages/base.html
@@ -27,7 +27,9 @@
<link rel="icon" type="image/png" href="{% static 'img/hi-icon-512x512.png' %}" sizes="512x512">
<!-- Apple Touch Icons -->
- <link rel="apple-touch-icon" href="{% static 'img/hi-icon-128x128.png' %}" sizes="128x128">
+ <link rel="apple-touch-icon" href="{% static 'img/hi-icon-120x120.png' %}" sizes="120x120">
+ <link rel="apple-touch-icon" href="{% static 'img/hi-icon-152x152.png' %}" sizes="152x152">
+ <link rel="apple-touch-icon" href="{% static 'img/hi-icon-180x180.png' %}" sizes="180x180">
<link rel="apple-touch-icon" href="{% static 'img/hi-icon-196x196.png' %}" sizes="196x196">
<link rel="apple-touch-icon" href="{% static 'img/hi-icon-512x512.png' %}" sizes="512x512">
{% stylesheet 'css_head' %}
diff --git a/src/hi/views.py b/src/hi/views.py
index ed8e5501..268e792c 100644
--- a/src/hi/views.py
+++ b/src/hi/views.py
@@ -211,50 +211,5 @@ class ManifestView( View ):
Serves the PWA manifest.json for full screen mode support.
Configured for landscape orientation (tablet primary use case).
"""
- manifest_data = {
- "name": "Home Information",
- "short_name": "Hi",
- "description": "Smart home monitoring and control system",
- "start_url": "/",
- "scope": "/",
- "display": "fullscreen",
- "orientation": "landscape",
- "theme_color": "#177072",
- "background_color": "#fdfdfd",
- "icons": [
- {
- "src": "/static/img/hi-icon-16x16.png",
- "sizes": "16x16",
- "type": "image/png"
- },
- {
- "src": "/static/img/hi-icon-32x32.png",
- "sizes": "32x32",
- "type": "image/png"
- },
- {
- "src": "/static/img/hi-icon-96x96.png",
- "sizes": "96x96",
- "type": "image/png"
- },
- {
- "src": "/static/img/hi-icon-128x128.png",
- "sizes": "128x128",
- "type": "image/png"
- },
- {
- "src": "/static/img/hi-icon-196x196.png",
- "sizes": "196x196",
- "type": "image/png"
- },
- {
- "src": "/static/img/hi-icon-512x512.png",
- "sizes": "512x512",
- "type": "image/png",
- "purpose": "any maskable"
- }
- ]
- }
-
- return JsonResponse( manifest_data, json_dumps_params={'indent': 2} )
+ return render(request, 'manifest.json', {}, content_type="application/json")