diff --git a/site_under_construction_landing.js b/site_under_construction_landing.js new file mode 100644 index 0000000..3558aa2 --- /dev/null +++ b/site_under_construction_landing.js @@ -0,0 +1,85 @@ +/* + * This script simply returns a static page to show that a given + * site is under construction. + * You can use it to serve any static page, even a proper landing. + */ + +const html = ` + + + + Site Under Construction + + + + + + + +
+
+ +
+
We're sorry, we're still working on our site.
+
Please check back soon!
+
+ + +` + +async function handleRequest(request) { + return new Response(html, { + headers: { + 'content-type': 'text/html;charset=UTF-8' + } + }) +} + +addEventListener('fetch', event => { + return event.respondWith(handleRequest(event.request)) +})