Add more customisable options

This commit is contained in:
joextodd
2017-02-14 21:54:26 +00:00
parent cdf73f87c6
commit 2977302cf9
3 changed files with 6 additions and 2 deletions

View File

@@ -35,6 +35,8 @@ Configure your app name, description, and icons in settings.py:
PWA_APP_NAME = 'My Kickass App'
PWA_APP_DESCRIPTION = "Do kickass things all day long without that pesky browser chrome"
PWA_APP_THEME_COLOR = '#0A0302'
PWA_APP_DISPLAY = 'standalone'
PWA_APP_START_URL = '/'
PWA_APP_ICONS = [
{
'src': '/static/images/my_app_icon.png',

View File

@@ -11,6 +11,8 @@ PWA_APP_NAME = getattr(settings, 'PWA_APP_NAME', 'MyApp')
PWA_APP_DESCRIPTION = getattr(settings, 'PWA_APP_DESCRIPTION', 'My Progressive Web App')
PWA_APP_ROOT_URL = getattr(settings, 'PWA_APP_ROOT_URL', '/')
PWA_APP_THEME_COLOR = getattr(settings, 'PWA_APP_THEME_COLOR', '#000')
PWA_APP_DISPLAY = getattr(settings, 'PWA_APP_DISPLAY', 'standalone')
PWA_APP_START_URL = getattr(settings, 'PWA_APP_START_URL', '/')
PWA_APP_ICONS = getattr(settings, 'PWA_APP_ICONS', [
{
'src': '/',

View File

@@ -3,8 +3,8 @@
"name": {{ PWA_APP_NAME|js }},
"short_name": {{ PWA_APP_NAME|js }},
"description": {{ PWA_APP_DESCRIPTION|js }},
"start_url": "/",
"display": "standalone",
"start_url": {{ PWA_APP_START_URL|js }},
"display": {{ PWA_APP_DISPLAY|js }},
"background_color": "#fff",
"theme_color": {{ PWA_APP_THEME_COLOR|js }},
"icons": {{ PWA_APP_ICONS|js }}