From 447aa7c06d51fab085228525d6dab0767d1a9981 Mon Sep 17 00:00:00 2001 From: Jonathan Weth Date: Sat, 4 Jan 2020 12:47:28 +0100 Subject: [PATCH] Extend support for apple devices Add option to specify special icons for apple devices because icons on apple devices are tailored to size differently --- README.md | 6 ++++++ pwa/templates/pwa.html | 15 +++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9c43b62..95ecf64 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,12 @@ PWA_APP_ICONS = [ 'sizes': '160x160' } ] +PWA_APP_ICONS_APPLE = [ + { + 'src': '/static/images/my_apple_icon.png', + 'sizes': '160x160' + } +] PWA_APP_SPLASH_SCREEN = [ { 'src': '/static/images/icons/splash-640x1136.png', diff --git a/pwa/templates/pwa.html b/pwa/templates/pwa.html index fb4b8f1..6338ccd 100644 --- a/pwa/templates/pwa.html +++ b/pwa/templates/pwa.html @@ -13,12 +13,19 @@ -{% for icon in PWA_APP_ICONS %} - -{% endfor %} + +{% if PWA_APP_ICONS_APPLE %} + {% for icon in PWA_APP_ICONS_APPLE %} + + {% endfor %} +{% else %} + {% for icon in PWA_APP_ICONS %} + + {% endfor %} +{% endif %} -{% for splash in PWA_APP_SPLASH_SCREEN%} +{% for splash in PWA_APP_SPLASH_SCREEN %} {% endfor %}