This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pwa app, serviceworker, offline fallback and appicons
- Loading branch information
1 parent
28d7bf2
commit 260ef0e
Showing
10 changed files
with
75 additions
and
0 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<title>DIG-IT | Offline</title> | ||
<link rel="stylesheet" type="text/css" href="/static/css/oneplus.css"> | ||
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"> | ||
</head> | ||
<body> | ||
<article class="container"> | ||
<article class="content pale-teal-accent"> | ||
<h1 class="color-accent center-font">No Internet Connection</h1> | ||
<h2 class="center-font">Please connect and try again</h2> | ||
<br /> | ||
<a onClick="window.location.reload()" class="button">Reload</a> | ||
</article> | ||
</article> | ||
</body> |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
var CACHE = 'app-cache'; | ||
|
||
self.addEventListener('install', function(evt) { | ||
evt.waitUntil(precache()); | ||
}); | ||
|
||
self.addEventListener('fetch', function(evt) { | ||
evt.respondWith(fetch(evt.request).catch(function () { | ||
return caches.open(CACHE).then(function(cache) { | ||
return cache.match('/media/offline.html'); | ||
}); | ||
})); | ||
}); | ||
|
||
function precache() { | ||
return caches.open(CACHE).then(function (cache) { | ||
return cache.addAll([ | ||
'/', | ||
'/media/offline.html', | ||
'/static/css/oneplus.css', | ||
'/media/img/appicons/dig-it_icon_96.png', | ||
'/media/img/appicons/dig-it_icon_144.png', | ||
'/media/img/appicons/dig-it_icon_192.png' | ||
]); | ||
}); | ||
} |
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 |
---|---|---|
|
@@ -15,3 +15,4 @@ coverage==4.2 | |
django-boolean-sum | ||
elasticsearch | ||
django-haystack==2.4.1 | ||
django-progressive-web-app==0.1 |