mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-06 22:14:12 +00:00
nem sei pq tantos arquivos
This commit is contained in:
59
gestao_raul/Lib/site-packages/pwa/templates/pwa.html
Normal file
59
gestao_raul/Lib/site-packages/pwa/templates/pwa.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!-- Path to manifest.json -->
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
|
||||
<!-- 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="{{ PWA_APP_STATUS_BAR_COLOR }}">
|
||||
|
||||
{% if PWA_APP_ICONS_APPLE %}
|
||||
{% for icon in PWA_APP_ICONS_APPLE %}
|
||||
<link rel="apple-touch-icon" href="{{ icon.src }}" sizes="{{ icon.sizes }}">
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for icon in PWA_APP_ICONS %}
|
||||
<link rel="apple-touch-icon" href="{{ icon.src }}" sizes="{{ icon.sizes }}">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% 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.sizes }}" href="{{ icon.src }}">
|
||||
{% endwith %}
|
||||
|
||||
<script type="text/javascript">
|
||||
// Initialize the service worker
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/serviceworker.js', {
|
||||
scope: '{{ PWA_APP_SCOPE }}'
|
||||
}).then(function (registration) {
|
||||
// Registration was successful
|
||||
{% if PWA_APP_DEBUG_MODE %}
|
||||
console.log('django-pwa: ServiceWorker registration successful with scope: ', registration.scope);
|
||||
{% endif %}
|
||||
}, function (err) {
|
||||
// registration failed :(
|
||||
{% if PWA_APP_DEBUG_MODE %}
|
||||
console.log('django-pwa: ServiceWorker registration failed: ', err);
|
||||
{% endif %}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user