me / FlaskWebApp /Abc.txt
BinaryONe
InitialCommit
1f8085b
<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);
})());
});