diff --git a/public/assets/css/fonts.css b/public/assets/css/fonts.css new file mode 100644 index 0000000..afd0844 --- /dev/null +++ b/public/assets/css/fonts.css @@ -0,0 +1,17 @@ +@font-face { + font-family: "Roboto Mono"; + font-weight: 400; + src: local("Roboto Mono Regular"), + local("RobotoMono-Regular"), + url("../fonts/RobotoMono-Regular.woff2"), + url("../fonts/RobotoMono-Regular.ttf"); +} + +@font-face { + font-family: "Roboto Mono"; + font-weight: 700; + src: local("Roboto Mono Bold"), + local("RobotoMono-Bold"), + url("../fonts/RobotoMono-Bold.woff2"), + url("../fonts/RobotoMono-Bold.ttf"); +} \ No newline at end of file diff --git a/public/assets/css/style.css b/public/assets/css/style.css index c9f34da..2e634a1 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -1,27 +1,11 @@ +@import url("fonts.css"); + :root { --color: #212121; --color-accent: white; --color-highlight: #f4f2ff; } -@font-face { - font-family: "Roboto Mono"; - font-weight: 400; - src: local("Roboto Mono Regular"), - local("RobotoMono-Regular"), - url("../fonts/RobotoMono-Regular.woff2"), - url("../fonts/RobotoMono-Regular.ttf"); -} - -@font-face { - font-family: "Roboto Mono"; - font-weight: 700; - src: local("Roboto Mono Bold"), - local("RobotoMono-Bold"), - url("../fonts/RobotoMono-Bold.woff2"), - url("../fonts/RobotoMono-Bold.ttf"); -} - /* Cornerstones */ * { @@ -234,4 +218,3 @@ nav a:hover { } } -/* Victor Westerlund */ diff --git a/public/assets/css/style.min.css b/public/assets/css/style.min.css deleted file mode 100644 index 3152bb8..0000000 --- a/public/assets/css/style.min.css +++ /dev/null @@ -1 +0,0 @@ -:root{--color: #212121;--color-accent: white;--color-highlight: #f4f2ff}@font-face{font-family:"Roboto Mono";font-weight:400;src:local("Roboto Mono Regular"),local("RobotoMono-Regular"),url(/assets/fonts/RobotoMono-Regular.woff2),url(/assets/fonts/RobotoMono-Regular.ttf)}@font-face{font-family:"Roboto Mono";font-weight:700;src:local("Roboto Mono Bold"),local("RobotoMono-Bold"),url(/assets/fonts/RobotoMono-Bold.woff2),url(/assets/fonts/RobotoMono-Bold.ttf)}*{margin:0;font-family:"Roboto Mono","Arial",sans-serif;color:var(--color)}::selection{background:var(--color-highlight);color:var(--color)}body,html,main,main>div{width:100%;height:100%}.logo,.logo::after{width:0;height:0;border-left:var(--skew) solid transparent;border-right:var(--skew) solid transparent;border-top:var(--size) solid var(--color)}.logo{--size: 5em;--skew: calc(var(--size) / 1.7)}.logo::after{content:"";opacity:.3}h1{font-size:2em}h2{font-weight:400;font-size:1.42em}h2 span{color:var(--color-accent);background:var(--color)}main{--grid-spacing: 30px;margin:auto;max-width:200vh;background:radial-gradient(circle,rgba(0,0,0,.2) 1px,transparent 1px),url(/assets/img/pattern.gif);background-size:var(--grid-spacing) var(--grid-spacing),auto 90%;background-position:100% 100%;background-repeat:repeat,no-repeat;background-blend-mode:multiply;image-rendering:pixelated;image-rendering:-moz-crisp-edges}main *{image-rendering:initial}main>div{position:absolute;width:50%}#intro{left:0;width:100vh;box-sizing:border-box;padding:5vw;display:flex;align-items:center;z-index:1}#intro .inner{display:flex;flex-wrap:wrap;height:100%}#intro .logo{--size: 7vh;margin-bottom:2em}#intro .block{width:100%;font-size:3vh}#intro .block:last-child{display:flex;align-items:flex-end}#intro .block p{font-size:.7em;margin-bottom:1.5em}#intro .block p span{background:var(--color-accent);margin-right:.9em}nav a{text-decoration:none;margin-right:2em;font-size:.9em}nav a::after{content:"→";padding-left:.5em}nav a:hover{background:var(--color-highlight);font-weight:700}#myface{right:0;width:50%;display:flex;justify-content:center}#myface img,#myface picture{position:absolute;height:80%;bottom:0;pointer-events:none;display:flex;justify-content:center}#myface img{height:100%}@media screen and (max-width:1010px){#myface{display:none}}@media screen and (max-width:800px){h1{font-size:7vw}h2{font-size:5vw}main{max-width:unset;background-size:auto 100vw}#intro{width:initial;padding:10vw;text-align:center}#intro p{text-align:justify}#intro .block p:last-of-type{text-align:initial}nav a{text-decoration:none;margin-right:5vw;font-size:5vw}} diff --git a/public/assets/img/favicon.png b/public/assets/img/favicon.png index 9b5f6b2..081d24b 100644 Binary files a/public/assets/img/favicon.png and b/public/assets/img/favicon.png differ diff --git a/public/assets/img/myface/fallback.jpg b/public/assets/img/myface/fallback.jpg deleted file mode 100644 index b0c95d8..0000000 Binary files a/public/assets/img/myface/fallback.jpg and /dev/null differ diff --git a/public/assets/img/myface/highres.avif b/public/assets/img/myface/highres.avif new file mode 100644 index 0000000..85c50e9 Binary files /dev/null and b/public/assets/img/myface/highres.avif differ diff --git a/public/assets/img/myface/highres.png b/public/assets/img/myface/highres.png deleted file mode 100644 index 57f0649..0000000 Binary files a/public/assets/img/myface/highres.png and /dev/null differ diff --git a/public/assets/img/myface/mediumres.avif b/public/assets/img/myface/mediumres.avif new file mode 100644 index 0000000..190a9b0 Binary files /dev/null and b/public/assets/img/myface/mediumres.avif differ diff --git a/public/assets/img/pattern.txt b/public/assets/img/pattern.txt deleted file mode 100644 index d30e08e..0000000 --- a/public/assets/img/pattern.txt +++ /dev/null @@ -1,29 +0,0 @@ -+--------------------------------------------------------------------------------------------+ -Size comparison for 6x6 monochrome image ranking from best to worst - -pattern.gif: 49 bytes - - Dithering level: 7 (doesn't really matter) - - Transparency threshold: 128 (doesn't really matter) - -pattern.bmp: 86 bytes - - Bit depth: 4 - - Dirthering level: 7 (doesn't really matter) - -pattern.png: 151 bytes - - Bit depth: 4 - - Dirthering level: 7 (doesn't really matter) - - Transparency threshold: 192 (doesn't really matter) - - Interlaced (saves 1 byte) - -pattern.webp: 248 bytes - - Quality: 100 - -pattern.jpg: 800 bytes - - Chroma Subsampling: 4:2:2 (saves 6 bytes from 4:4:4) -+--------------------------------------------------------------------------------------------+ - --- Here's the image used for the test -- -data:image/gif;base64,R0lGODlhBgAGAHAAACwAAAAABgAGAIH////08v8AAAAAAAACCgRiGciL9mA6ExQAOw== - - -Unfortunately after all response headers are set, the total ends up at 317 bytes. diff --git a/public/assets/js/nomodule.js b/public/assets/js/nomodule.js new file mode 100644 index 0000000..2e68d64 --- /dev/null +++ b/public/assets/js/nomodule.js @@ -0,0 +1,7 @@ +// Promote IE to Edge +if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { + window.location = 'microsoft-edge:' + window.location; + setTimeout(function() { + window.location = 'https://go.microsoft.com/fwlink/?linkid=2135547'; + },1); +} diff --git a/public/assets/js/script.js b/public/assets/js/script.js new file mode 100644 index 0000000..083e7f5 --- /dev/null +++ b/public/assets/js/script.js @@ -0,0 +1,6 @@ +// Register SW if supported by browser +if(navigator.serviceWorker) { + navigator.serviceWorker.register("sw.js",{ + scope: "/" + }); +} diff --git a/public/index.html b/public/index.html index e783852..5259755 100644 --- a/public/index.html +++ b/public/index.html @@ -33,29 +33,15 @@
- - - - - + + + + +
- + + diff --git a/public/netwatch/PAGE_NOT_FOUND.html b/public/netwatch/PAGE_NOT_FOUND.html deleted file mode 100644 index ae798c1..0000000 --- a/public/netwatch/PAGE_NOT_FOUND.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - NETDIR://PAGE_NOT_FOUND - - -
-
- - -
-
- -
-
- -

THIS PAGE CANNOT BE DISPLAYED. FOR HELP, PLEASE CONTACT NETWATCH

-

REMEMBER: Never access private domains with the extension .web. Surf ONLY domains with approved URL extensions (e.g. CORP, PUB, LAW). DO NOT upload daemons on public-access computers. If you encounter a rouge AI, contact a NetWatch officer IMMEDIATELY and follow their instructions.

-
-
-
-
- - \ No newline at end of file diff --git a/public/netwatch/assets/css/style.css b/public/netwatch/assets/css/style.css deleted file mode 100644 index 5347096..0000000 --- a/public/netwatch/assets/css/style.css +++ /dev/null @@ -1,240 +0,0 @@ -@font-face { - font-family: "NetWatch"; - src: url("/netwatch/assets/fonts/netwatch-normal.woff2"); - font-weight: 300; -} - -:root { - --color-frame: #18635F; - --color-text: #d7fffa; - --color-text-distortion: #03554d40; -} - -::selection { - background: var(--color-frame); - color: var(--color-text); -} - -* { - margin: 0; - color: var(--color-text); -} - -html, -body { - width: 100%; - height: 100%; - margin: 0; - font-family: "NetWatch",sans-serif; - background: black; - display: flex; - align-items: center; - justify-content: center; - -webkit-filter: saturate(2); - filter: saturate(2); - cursor: url("/netwatch/assets/img/cursor.png") 32 32, auto; -} - -/* ---- */ - -.center { - display: flex; - align-items: center; - justify-content: center; -} - -.centerX { - display: flex; - justify-content: center; -} - -.centerY { - display: flex; - align-items: center; -} - -/* ---- */ - -#keystone { - --header-height: 80px; - --header-content-offset: var(--header-height); - - width: calc(100% - 50px); - height: calc(100% - 50px); - border: solid 2px var(--color-frame); -} - -#keystone header { - --gadient-dark: #052c2a; - --gradient-light: #072e29; - - position: relative; - top: 2px; - height: 80px; - background: #033A35; - background: repeating-linear-gradient(0,var(--gadient-dark),var(--gadient-dark) 5px,var(--gradient-light) 5px,var(--gradient-light) 10px); - border-top: solid 2px var(--color-frame); - border-bottom: solid 2px var(--color-frame); - z-index: 1; - display: flex; -} - -#keystoneLogo { - width: 400px; - min-width: 400px; - height: 100%; - background: #0a484541; - border-right: solid 2px var(--color-frame); -} - -#keystoneLogo img:first-child { - height: 35px; - margin-right: 20px; -} - -#keystoneLogo img { - height: 30px; - filter: drop-shadow(5px 3px 1px var(--color-text-distortion)); -} - -/* ---- */ - -#searchbox { - position: relative; - width: 100%; -} - -#urlbox { - position: absolute; - right: var(--header-content-offset); - width: calc(100% - 200px); - height: calc(var(--header-content-offset) / 2); - background: #0A4845CC; -} - -#urlbox > p { - font-size: 30px; - margin-left: 20px; -} - -#poweredby { - position: absolute; - height: 100%; - right: var(--header-content-offset); - display: flex; -} - -#poweredby p { - opacity: .3; - font-weight: 700; -} - -#poweredby svg { - height: 10px; - margin-left: 10px; - fill: var(--color-text); -} - -/* ---- */ - -main { - --color-glow: #d5ffea94; - - width: 100%; - height: calc(100% - var(--header-height) - 4px); - box-sizing: border-box; - padding: 10px; -} - -#banner { - position: relative; - margin-top: 50px; - width: 50%; - box-sizing: border-box; - padding: 10px; - padding-left: 15px; - height: var(--header-height); - background: #f4fefc; - box-shadow: 0 0 20px 17px #36c2b126; -} - -#banner img { - height: 100%; - margin-right: 15px; - filter: drop-shadow(0px 0px 17px var(--color-glow)); - pointer-events: none; -} - -#banner h1 { - color: #002823; - font-size: 55px; - font-weight: 300; - word-spacing: 5px; - text-shadow: 0 0 17px var(--color-glow); -} - -/* ---- */ - -#content { - height: calc(100% - var(--header-height) - 50px); -} - -#content > div { - flex-wrap: wrap; - width: 50%; -} - -#content img { - filter: drop-shadow(0px 0px 17px #91eabe36); - pointer-events: none; -} - -#content h2, -#content p { - width: 100%; - text-align: center; - text-shadow: 0 0 17px var(--color-glow); -} - -#content h2 { - margin-top: 15px; - margin-bottom: 30px; -} - -@media screen and (max-width: 1400px) { - #urlbox > p { - display: none; - } - - #banner { - width: 100%; - } -} - -@media screen and (max-width: 950px) { - #keystoneLogo { - width: 100%; - } - - #searchbox { - display: none; - } - - #banner { - display: none; - } - - #content > div { - width: calc(100% - 20px); - } -} - -@media screen and (max-height: 750px) { - #banner { - display: none; - } - - #content { - height: calc(100% - var(--header-height)); - } -} \ No newline at end of file diff --git a/public/netwatch/assets/fonts/netwatch-bold.woff2 b/public/netwatch/assets/fonts/netwatch-bold.woff2 deleted file mode 100644 index 121beb8..0000000 Binary files a/public/netwatch/assets/fonts/netwatch-bold.woff2 and /dev/null differ diff --git a/public/netwatch/assets/fonts/netwatch-normal.woff2 b/public/netwatch/assets/fonts/netwatch-normal.woff2 deleted file mode 100644 index cb49791..0000000 Binary files a/public/netwatch/assets/fonts/netwatch-normal.woff2 and /dev/null differ diff --git a/public/netwatch/assets/img/Keystone_Logo_2077.svg b/public/netwatch/assets/img/Keystone_Logo_2077.svg deleted file mode 100644 index 966f1bd..0000000 --- a/public/netwatch/assets/img/Keystone_Logo_2077.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/netwatch/assets/img/Keystone_icon_2077.svg b/public/netwatch/assets/img/Keystone_icon_2077.svg deleted file mode 100644 index 792521e..0000000 --- a/public/netwatch/assets/img/Keystone_icon_2077.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/public/netwatch/assets/img/NetWatch_Logo_2077.svg b/public/netwatch/assets/img/NetWatch_Logo_2077.svg deleted file mode 100644 index 5ae9ed7..0000000 --- a/public/netwatch/assets/img/NetWatch_Logo_2077.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/netwatch/assets/img/NetWatch_badge_2077.png b/public/netwatch/assets/img/NetWatch_badge_2077.png deleted file mode 100644 index d7e2557..0000000 Binary files a/public/netwatch/assets/img/NetWatch_badge_2077.png and /dev/null differ diff --git a/public/netwatch/assets/img/cursor.png b/public/netwatch/assets/img/cursor.png deleted file mode 100644 index 86ae6da..0000000 Binary files a/public/netwatch/assets/img/cursor.png and /dev/null differ diff --git a/public/netwatch/assets/img/no_entry_icon_2077.svg b/public/netwatch/assets/img/no_entry_icon_2077.svg deleted file mode 100644 index cd971b2..0000000 --- a/public/netwatch/assets/img/no_entry_icon_2077.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/public/sw.js b/public/sw.js index 212857a..868c19d 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,23 +1,32 @@ -const version = "1620928311"; +const version = "1622708674"; const root = "/"; let activeCaches = [ `content-${version}` ]; +let cacheManifest = [ + "index.html", + "assets/css/style.css", + "assets/css/fonts.css", + "assets/img/favicon.png", + "assets/img/pattern.gif", + "assets/fonts/RobotoMono-Bold.woff2", + "assets/fonts/RobotoMono-Regular.woff2", + "assets/js/script.js" +]; + +// Download assets and install ServiceWorker self.addEventListener("install", event => { event.waitUntil( - caches.open(`content-${version}`).then(cache => cache.addAll([ - root + "index.html", - root + "assets/css/style.css", - root + "assets/img/favicon.png", - root + "assets/img/pattern.gif", - root + "assets/fonts/RobotoMono-Bold.woff2", - root + "assets/fonts/RobotoMono-Regular.woff2" - ])) + caches.open(`content-${version}`).then(cache => cache.addAll(cacheManifest.map(asset => { + // Append the root path to all assets + return root + asset; + }))) ) }); +// Wipe old assets from Cache Storage self.addEventListener("activate", event => { event.waitUntil( // Delete inactive caches @@ -33,7 +42,7 @@ self.addEventListener("activate", event => { ) }); -// Fetch and cache content to bucket +// Fetch and cache an asset not defined in the manifest async function fetchToCache(event) { const networkFetch = fetch(event.request); @@ -73,7 +82,7 @@ self.addEventListener("fetch", event => { return; } - // Fetch cross-origin none-asset content + // Fetch cross-origin content using the network if(!origin || (url.pathname.substring(1,7) != "assets")) { event.respondWith(fetchContent(url.href)); return; @@ -86,9 +95,8 @@ self.addEventListener("fetch", event => { return; } - // Respond with content for cache or fetch and save + // Respond with content from cache or fetch and save event.respondWith( caches.match(event.request).then(response => response || fetchToCache(event)) ); }); -// Victor Westerlund