File size: 5,697 Bytes
1f8085b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css"/>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer" />

"""
  email = request.form.get('email')
  password = request.form.get('password') 
  if password:
    return redirect(url_for('Handler.Handler_Main'))
  else:
    return "Failed
  """" 

template_folder='OnlineMain/P_Web_App/FileHandler/templates',
    static_folder='static'

"../../static/css/login.css"



  #resp=json.dumps(data)
  #data=data.replace("\'", "\"")
  #data=json.dumps(data)


,
        {
            "src": "/icon-256x256.png",
            "sizes": "256x256",
            "type": "image/png"
        },
        {
            "src": "/icon-384x384.png",
            "sizes": "384x384",
            "type": "image/png"
        },
        {
            "src": "/icon-512x512.png",
            "sizes": "512x512",
            "type": "image/png"
        }

"css/cover.css"

self.addEventListener("fetch", (event) => {
    console.log("Service Worker : fetch!")
    event.respondWith(
        // we are sending the request to the server. if network is down, then sending the res
        // from the cache.
        fetch(event.request)
        .catch(() => {
            caches.match(event.request)
        })
        
    )
})


self.addEventListener('fetch', (e) => {
  console.log('[ServiceWorker] Fetch', e.request.url);
  e.respondWith((async () => {
    const r = await caches.match(e.request);
    console.log(`[Service Worker] Fetching resource: ${e.request.url}`);
    if (r) { return r; }

    try {
      const response = await fetch(e.request);
  
      // We could cache this new resource if we wanted to.
      // const cache = await caches.open(cacheName);
      // console.log(`[Service Worker] Caching new resource: ${e.request.url}`);
      // cache.put(e.request, response.clone());
      return response;
    } catch(error) {
      console.log('Fetch failed; returning offline page instead.', error);
      // In reality you'd have many different
      // fallbacks, depending on URL & headers.
      // Eg, a fallback silhouette image for avatars.
      let url = e.request.url;
      let extension = url.split('.').pop();
      console.log('URL: ', url);

      if (extension === 'jpg' || extension === 'png') {
          const FALLBACK_IMAGE = `<svg xmlns="http://www.w3.org/2000/svg" width="200" height="180" stroke-linejoin="round">
            <path stroke="#DDD" stroke-width="25" d="M99,18 15,162H183z"/>
            <path stroke-width="17" fill="#FFF" d="M99,18 15,162H183z" stroke="#eee"/>
            <path d="M91,70a9,9 0 0,1 18,0l-5,50a4,4 0 0,1-8,0z" fill="#aaa"/>
            <circle cy="138" r="9" cx="100" fill="#aaa"/>
            </svg>`;
          // const FALLBACK_IMAGE = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path class="heroicon-ui" d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm16 8.59V6H4v6.59l4.3-4.3a1 1 0 0 1 1.4 0l5.3 5.3 2.3-2.3a1 1 0 0 1 1.4 0l1.3 1.3zm0 2.82l-2-2-2.3 2.3a1 1 0 0 1-1.4 0L9 10.4l-5 5V18h16v-2.59zM15 10a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/></svg>`;
          return Promise.resolve(new Response(FALLBACK_IMAGE, {
              headers: {
                  'Content-Type': 'image/svg+xml'
              }
          }));
      }
      const cache = await caches.open(cacheName);
      const cachedResponse = await cache.match('offline.html');
      return cachedResponse;
    }
  })());
});
Footer


  '../../static/android-chrome-192x192.png',
  '../../static/android-chrome-512x512.png',
  '../../static/apple-touch-icon.png',
  '../../static/favicon-16x16.png',
  '../../static/favicon-32x32.png',
  '../../static/favicon.ico',
  
  '../../static/css/style.css',
  '../../static/css/addedStyle.css',
  
  '../../static/javascript/app.js',
  '../../static/javascript/services.js',
  '../../static/javascript/script.js',
  '../../static/javascript/pass-show-hide.js',

  '../../static/images/img.png',
  '../../static/images/background-img.jpg',
  '../../static/images/do-img1.png',
  '../../static/images/do-img2.png',
  '../../static/images/do-img3.png',
  '../../static/images/doc2.png',
  '../../static/images/doc3.png',
  '../../static/images/dont-img1.png',
  '../../static/images/dont-img2.png',
  '../../static/images/dont-img3.png',
  '../../static/images/home-bg.jpg',
  '../../static/images/main-symp-img.png',
  '../../static/images/main-wash-img.png',
  '../../static/images/pre-1.png',
  '../../static/images/pre-2.png',
  '../../static/images/pre-3.png',
  '../../static/images/pre-4.png',
  '../../static/images/pre-5.png',
  '../../static/images/pre-6.png',
  '../../static/images/scroll-img.png',
  '../../static/images/symp-a.png',
  '../../static/images/symp-b.png',
  '../../static/images/symp-c.png',
  '../../static/images/symp-d.png',
  '../../static/images/symp-e.png',
  '../../static/images/symp-f.png',
  '../../static/images/virus.png',
  '../../static/images/wash-a.png',
  '../../static/images/wash-b.png',
  '../../static/images/wash-c.png',
  '../../static/images/wash-d.png',
  '../../static/images/wash-e.png',
  '../../static/images/wash-f.png'



self.addEventListener('install', (e) => {
  console.log('[Service Worker] Install');
  e.waitUntil((async () => {
    const cache = await caches.open(cacheName);
    console.log('[Service Worker] Caching all: app shell and content');
    await cache.addAll(contentToCache);
  })());
});