diff --git a/index.html b/index.html new file mode 100644 index 0000000..ae3ede3 --- /dev/null +++ b/index.html @@ -0,0 +1,158 @@ + + + + Exchange Rate Calculator + + + + + +

Exchange Rate Calculator

+
+ + + + + +
+

+ +
+

Recent Calculations

+ +
+ + + + + + + diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..42bc95a --- /dev/null +++ b/manifest.json @@ -0,0 +1,16 @@ +{ + "name": "EUR-DZD Calculator", + "short_name": "Exchange Calculator", + "icons": [ + { + "src": "icon.png", + "sizes": "192x192", + "type": "image/png" + } + ], + "start_url": "/index.html", + "display": "standalone", + "background_color": "#f5f5f5", + "theme_color": "#4CAF50" + } + \ No newline at end of file diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 0000000..7fc11d4 --- /dev/null +++ b/service-worker.js @@ -0,0 +1,26 @@ +const CACHE_NAME = 'eur-dzd-calculator-v1'; + +self.addEventListener('install', function(event) { + event.waitUntil( + caches.open(CACHE_NAME) + .then(function(cache) { + return cache.addAll([ + '/index.html', + '/manifest.json', + '/icon.png', + ]); + }) + ); +}); + +self.addEventListener('fetch', function(event) { + event.respondWith( + caches.match(event.request) + .then(function(response) { + if (response) { + return response; + } + return fetch(event.request); + }) + ); +});