-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the splash screen for iOS and Meta tags to Android and Win8
- Loading branch information
1 parent
d86732b
commit 053afe1
Showing
19 changed files
with
161 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,48 @@ | ||
<!-- Path to manifest.json --> | ||
<link rel="manifest" href="/manifest.json"> | ||
|
||
<!-- Icons for Apple Devices --> | ||
{% for icon in PWA_APP_ICONS %} | ||
<link rel="apple-touch-icon" href="{{ icon.src }}" sizes="{{ icon.sizes }}"> | ||
{% endfor %} | ||
<!-- Add to homescreen for Chrome on Android --> | ||
<meta name="mobile-web-app-capable" content="yes"> | ||
<meta name="application-name" content="{{ PWA_APP_NAME }}"> | ||
|
||
|
||
<!-- Chrome for Android theme color --> | ||
<meta name="theme-color" content="{{ PWA_APP_THEME_COLOR }}"> | ||
|
||
<!-- Add to homescreen for Safari on iOS --> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="apple-mobile-web-app-title" content="{{ PWA_APP_NAME }}"> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="default"> | ||
{% for icon in PWA_APP_ICONS %} | ||
<link rel="apple-touch-icon" href="{{ icon.src }}" sizes="{{ icon.size }}"> | ||
{% endfor %} | ||
|
||
|
||
{% for splash in PWA_APP_SPLASH_SCREEN%} | ||
<link href="{{ splash.src }}" media="{{ splash.media }}" rel="apple-touch-startup-image"/> | ||
{% endfor %} | ||
|
||
|
||
<!-- Tile for Win8 --> | ||
<meta name="msapplication-TileColor" content="{{ PWA_APP_BACKGROUND_COLOR }}"> | ||
{% with PWA_APP_ICONS|last as icon %} | ||
<meta name="msapplication-TileImage" content="{{ icon.src }}"> | ||
|
||
|
||
<link rel="icon" sizes="{{ icon.size }}" href="{{ icon.src }}"> | ||
{% endwith %} | ||
|
||
<script type="text/javascript"> | ||
// Initialize the service worker | ||
if ('serviceWorker' in navigator) { | ||
navigator.serviceWorker.register('/serviceworker.js', { | ||
scope: '.' // <--- THIS BIT IS REQUIRED | ||
scope: '.' | ||
}).then(function (registration) { | ||
// Registration was successful | ||
console.log('django-progressive-web-app: ServiceWorker registration successful with scope: ', registration.scope); | ||
console.log('django-pwa: ServiceWorker registration successful with scope: ', registration.scope); | ||
}, function (err) { | ||
// registration failed :( | ||
console.log('django-progressive-web-app: ServiceWorker registration failed: ', err); | ||
console.log('django-pwa: ServiceWorker registration failed: ', err); | ||
}); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
[tox] | ||
envlist = | ||
py35-django{20} | ||
py35-django{21} | ||
py36-django{20} | ||
py36-django{21} | ||
py37-django{20} | ||
py37-django{21} | ||
|
||
[testenv] | ||
commands = python runtests.py | ||
setenv = | ||
DJANGO_SETTINGS_MODULE=tests.settings | ||
PYTHONPATH={toxinidir} | ||
basepython = py36: python3.6 | ||
basepython = | ||
py35: python3.5 | ||
py36: python3.6 | ||
py37: python3.7 | ||
deps = | ||
django20: Django==2.0 | ||
django21: Django==2.1 | ||
django21: Django==2.1 | ||
pypandoc==1.3.3 |